Documentation ¶
Index ¶
- type PostgresStorage
- func (e *PostgresStorage) AddEvent(ctx context.Context, event models.Event) error
- func (e *PostgresStorage) DelEvent(ctx context.Context, id uuid.UUID) error
- func (e *PostgresStorage) GetEventByID(ctx context.Context, id uuid.UUID) (models.Event, error)
- func (e *PostgresStorage) ListAllEvents(ctx context.Context) ([]models.Event, error)
- func (e *PostgresStorage) ListEvents(ctx context.Context, startdate time.Time, enddate time.Time) ([]models.Event, error)
- func (e *PostgresStorage) UpdateEvent(ctx context.Context, id uuid.UUID, newEvent models.Event) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresStorage ¶
type PostgresStorage struct {
// contains filtered or unexported fields
}
PostgresStorage struct
func NewPostgresStorage ¶
func NewPostgresStorage(config utilities.Config) (*PostgresStorage, error)
NewPostgresStorage create new psql connection
func (*PostgresStorage) GetEventByID ¶
GetEventByID Get event by ID
func (*PostgresStorage) ListAllEvents ¶
ListAllEvents Get slice of all events
func (*PostgresStorage) ListEvents ¶
func (e *PostgresStorage) ListEvents(ctx context.Context, startdate time.Time, enddate time.Time) ([]models.Event, error)
ListEvents Get slice of events
func (*PostgresStorage) UpdateEvent ¶
func (e *PostgresStorage) UpdateEvent(ctx context.Context, id uuid.UUID, newEvent models.Event) error
UpdateEvent Edit event
Click to show internal directories.
Click to hide internal directories.