storage

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	DB  string `toml:"db"`
	DSN string `toml:"dsn"`
}

type Storage

type Storage interface {
	Connect(ctx context.Context) error
	Close(ctx context.Context) error
	GetShows(ctx context.Context) ([]models.Show, error)
	CreateShows(ctx context.Context, shows []models.Show) ([]models.Show, error)
	CreateShow(ctx context.Context, shows models.Show) (models.Show, error)
	GetEvents(ctx context.Context) ([]models.Event, error)
	CreateEvents(ctx context.Context, events []models.Event) ([]models.Event, error)
	CreateEvent(ctx context.Context, event models.Event) (models.Event, error)
	GetPlaces(ctx context.Context) ([]models.Place, error)
	CreatePlaces(ctx context.Context, places []models.Place) ([]models.Place, error)
	CreatePlace(ctx context.Context, place models.Place) (models.Place, error)
}

func NewStorage

func NewStorage(conf Conf) Storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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