Documentation ¶
Index ¶
- func SheetToSQL(sheet *Sheet) *sql.Sheet
- type Service
- type Sheet
- type SheetService
- func (s *SheetService) CreateSheetByName(ctx context.Context, name string) (*Sheet, error)
- func (s *SheetService) DeleteSheetById(ctx context.Context, id int) error
- func (s *SheetService) GetAllSheets(ctx context.Context) ([]Sheet, error)
- func (s *SheetService) GetSheetById(ctx context.Context, id int) (*Sheet, error)
- func (s *SheetService) Ping(ctx context.Context) error
- func (s *SheetService) UpdateSheetById(ctx context.Context, id int, sheet *Sheet) (*Sheet, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SheetToSQL ¶
SheetToSQL converts a Sheet object to a SQL Sheet object. If the input sheet is nil, it returns nil.
Types ¶
type Service ¶
type Service interface { CreateSheetByName(ctx context.Context, name string) (*Sheet, error) GetSheetById(ctx context.Context, id int) (*Sheet, error) GetAllSheets(ctx context.Context) ([]Sheet, error) UpdateSheetById(ctx context.Context, id int, sheet *Sheet) (*Sheet, error) DeleteSheetById(ctx context.Context, id int) error Ping(ctx context.Context) error }
type Sheet ¶
type Sheet struct { // The id for the sheet Id int `json:"id"` // The name for the sheet Name string `json:"name"` // The creation date of the sheet CreatedAt *time.Time `json:"created_at"` // The last update date of the sheet UpdatedAt *time.Time `json:"updated_at"` }
Sheet
Represents a sheet for this application ¶
A sheet is a collection of shots. It's used to group shots together in a logical way.
swagger:model
func SQLToSheet ¶
SQLToSheet converts a sql.Sheet object to a Sheet object. If the input sheet is nil, it returns nil.
type SheetService ¶
type SheetService struct {
// contains filtered or unexported fields
}
func New ¶
func New(repo repository.SheetRepository) *SheetService
func (*SheetService) CreateSheetByName ¶
func (*SheetService) DeleteSheetById ¶
func (s *SheetService) DeleteSheetById(ctx context.Context, id int) error
func (*SheetService) GetAllSheets ¶
func (s *SheetService) GetAllSheets(ctx context.Context) ([]Sheet, error)
func (*SheetService) GetSheetById ¶
func (*SheetService) UpdateSheetById ¶
Click to show internal directories.
Click to hide internal directories.