sheet

package
v0.0.0-...-652937c Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SheetToSQL

func SheetToSQL(sheet *Sheet) *sql.Sheet

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

func SQLToSheet(sheet *sql.Sheet) *Sheet

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 (*SheetService) CreateSheetByName

func (s *SheetService) CreateSheetByName(ctx context.Context, name string) (*Sheet, error)

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 (s *SheetService) GetSheetById(ctx context.Context, id int) (*Sheet, error)

func (*SheetService) Ping

func (s *SheetService) Ping(ctx context.Context) error

func (*SheetService) UpdateSheetById

func (s *SheetService) UpdateSheetById(ctx context.Context, id int, sheet *Sheet) (*Sheet, error)

Jump to

Keyboard shortcuts

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