Documentation
¶
Index ¶
- func SetupPostgres(cfg *config.ServerConfiguration) (types.Storage, error)
- type PostgresStorage
- func (p *PostgresStorage) CreateFoodLogEntry(ctx context.Context, arg types.CreateFoodLogEntryParams) (*uuid.UUID, error)
- func (p *PostgresStorage) DeleteFoodLogEntry(ctx context.Context, arg types.DeleteFoodLogEntryParams) error
- func (p *PostgresStorage) ExportFoodLogEntries(ctx context.Context, userID string) ([]types.UserFoodlogentry, error)
- func (p *PostgresStorage) GetFoodLogEntry(ctx context.Context, arg types.GetFoodLogEntryParams) (*types.UserFoodlogentry, error)
- func (p *PostgresStorage) GetTestData(ctx context.Context) (*string, error)
- func (p *PostgresStorage) GetUserConfig(ctx context.Context, arg types.GetUserConfigParams) (*types.UserConfig, error)
- func (p *PostgresStorage) PurgeFoodLogEntries(ctx context.Context, userID string) error
- func (p *PostgresStorage) QueryFoodLogEntries(ctx context.Context, arg types.QueryFoodLogEntriesParams) ([]types.UserFoodlogentry, error)
- func (p *PostgresStorage) StoreUserConfig(ctx context.Context, arg types.StoreUserConfigParams) error
- func (p *PostgresStorage) UpdateFoodLogEntry(ctx context.Context, arg types.UpdateFoodLogEntryParams) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupPostgres ¶
func SetupPostgres(cfg *config.ServerConfiguration) (types.Storage, error)
Types ¶
type PostgresStorage ¶
func (*PostgresStorage) CreateFoodLogEntry ¶
func (p *PostgresStorage) CreateFoodLogEntry(ctx context.Context, arg types.CreateFoodLogEntryParams) (*uuid.UUID, error)
CreateFoodLogEntry implements types.Storage.
func (*PostgresStorage) DeleteFoodLogEntry ¶
func (p *PostgresStorage) DeleteFoodLogEntry(ctx context.Context, arg types.DeleteFoodLogEntryParams) error
DeleteFoodLogEntry implements types.Storage.
func (*PostgresStorage) ExportFoodLogEntries ¶
func (p *PostgresStorage) ExportFoodLogEntries(ctx context.Context, userID string) ([]types.UserFoodlogentry, error)
ExportFoodLogEntries implements types.Storage.
func (*PostgresStorage) GetFoodLogEntry ¶
func (p *PostgresStorage) GetFoodLogEntry(ctx context.Context, arg types.GetFoodLogEntryParams) (*types.UserFoodlogentry, error)
GetFoodLogEntry implements types.Storage.
func (*PostgresStorage) GetTestData ¶
func (p *PostgresStorage) GetTestData(ctx context.Context) (*string, error)
GetTestData implements types.Storage.
func (*PostgresStorage) GetUserConfig ¶
func (p *PostgresStorage) GetUserConfig(ctx context.Context, arg types.GetUserConfigParams) (*types.UserConfig, error)
GetUserConfig implements types.Storage.
func (*PostgresStorage) PurgeFoodLogEntries ¶
func (p *PostgresStorage) PurgeFoodLogEntries(ctx context.Context, userID string) error
PurgeFoodLogEntries implements types.Storage.
func (*PostgresStorage) QueryFoodLogEntries ¶
func (p *PostgresStorage) QueryFoodLogEntries(ctx context.Context, arg types.QueryFoodLogEntriesParams) ([]types.UserFoodlogentry, error)
QueryFoodLogEntries implements types.Storage.
func (*PostgresStorage) StoreUserConfig ¶
func (p *PostgresStorage) StoreUserConfig(ctx context.Context, arg types.StoreUserConfigParams) error
StoreUserConfig implements types.Storage.
func (*PostgresStorage) UpdateFoodLogEntry ¶
func (p *PostgresStorage) UpdateFoodLogEntry(ctx context.Context, arg types.UpdateFoodLogEntryParams) error
UpdateFoodLogEntry implements types.Storage.