service

package
v0.0.0-...-f2c6537 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(db *gorm.DB, c *config.Config) *API

func (*API) CreateSession

func (api *API) CreateSession(i model.SessionInput) (*model.Session, error)

func (*API) DeleteSessionById

func (api *API) DeleteSessionById(id string) error

func (*API) EditSessionById

func (api *API) EditSessionById(id string, i model.SessionInput) (*model.Session, error)

func (*API) GetAllSessions

func (api *API) GetAllSessions() (*[]model.Session, error)

func (*API) GetSessionById

func (api *API) GetSessionById(id string) (*model.Session, error)

type SessionAPI

type SessionAPI interface {
	GetAllSessions() (*[]model.Session, error)
	CreateSession(i model.SessionInput) (*model.Session, error)
	GetSessionById(id string) (*model.Session, error)
	EditSessionById(id string, i model.SessionInput) (*model.Session, error)
	DeleteSessionById(id string) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL