sqlstorage

package
v0.0.0-...-e6f2c53 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrShowNotFound = errors.New("show not found")

Functions

func ConvertSQLShowToStorageShow

func ConvertSQLShowToStorageShow(s ShowSQL) (show model.ShowResponse)

Types

type ShowSQL

type ShowSQL struct {
	ID   sql.NullInt64
	Name sql.NullString
}

type Storage

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

func New

func New(dsn string) *Storage

func (*Storage) Close

func (s *Storage) Close(ctx context.Context) error

func (*Storage) Connect

func (s *Storage) Connect(ctx context.Context) error

func (*Storage) CreateEvent

func (s *Storage) CreateEvent(ctx context.Context, event models.Event) (models.Event, error)

CreateEvent creates a event.

func (*Storage) CreateEvents

func (s *Storage) CreateEvents(ctx context.Context, events []models.Event) ([]models.Event, error)

CreateEvents creates events.

func (*Storage) CreatePlace

func (s *Storage) CreatePlace(ctx context.Context, place models.Place) (models.Place, error)

CreatePlace creates a place.

func (*Storage) CreatePlaces

func (s *Storage) CreatePlaces(ctx context.Context, places []models.Place) ([]models.Place, error)

CreatePlaces creates places.

func (*Storage) CreateShow

func (s *Storage) CreateShow(ctx context.Context, show models.Show) (models.Show, error)

CreateShow creates a show.

func (*Storage) CreateShows

func (s *Storage) CreateShows(ctx context.Context, shows []models.Show) ([]models.Show, error)

CreateShows creates shows.

func (*Storage) GetEvents

func (s *Storage) GetEvents(ctx context.Context) ([]models.Event, error)

GetEvents returns events.

func (*Storage) GetPlaces

func (s *Storage) GetPlaces(ctx context.Context) ([]models.Place, error)

GetPlaces returns places.

func (*Storage) GetShows

func (s *Storage) GetShows(ctx context.Context) ([]models.Show, error)

GetShows returns shows.

Jump to

Keyboard shortcuts

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