Documentation ¶
Index ¶
- type AddCarbonFootprintGoalParams
- type AddDeviceParams
- type AddFoodItemToLogParams
- type AggregateFoodItem
- type CarbonFootprintGoal
- type CfTypes
- type CreateFoodItemParams
- type CreateLifeCycleParams
- type CreateSourceParams
- type CreateTypologyParams
- type CreateUserParams
- type DBTX
- type DailyUserAverage
- type DailyUserAverageByDietaryRequirement
- type DeleteCarbonFootprintGoalParams
- type DeleteDeviceBatchResults
- type DeleteFoodItemFromLogParams
- type Device
- type FoodItem
- type FoodItemLog
- type GetDailyCarbonFootprintByDateRangeParams
- type GetDailyCarbonFootprintByDateRangeRow
- type GetFoodItemInfoByRegionParams
- type GetFoodItemInfoByRegionRow
- type GetFoodItemInfoRow
- type GetFoodItemLogByDateParams
- type GetFoodItemLogByDateRow
- type GetFoodItemLogStreakRow
- type GetLoggedDaysInMonthParams
- type GetRegionalAggregateFoodItemParams
- type LifeCycle
- type ListAggregateFoodItemsByRegionRow
- type ListAggregateFoodItemsRow
- type ListAggregateSubTypologiesByRegionRow
- type ListAggregateTypologiesByRegionRow
- type ListSourcesByFoodItemAndRegionParams
- type ListSourcesByFoodItemAndRegionRow
- type ListSourcesByFoodItemRow
- type NullCfTypes
- type Queries
- func (q *Queries) AddCarbonFootprintGoal(ctx context.Context, arg AddCarbonFootprintGoalParams) (int32, error)
- func (q *Queries) AddDevice(ctx context.Context, arg AddDeviceParams) error
- func (q *Queries) AddFoodItemToLog(ctx context.Context, arg AddFoodItemToLogParams) (int32, error)
- func (q *Queries) CreateFoodItem(ctx context.Context, arg CreateFoodItemParams) (int32, error)
- func (q *Queries) CreateLifeCycle(ctx context.Context, arg CreateLifeCycleParams) (int32, error)
- func (q *Queries) CreateSource(ctx context.Context, arg CreateSourceParams) (int32, error)
- func (q *Queries) CreateSubTypology(ctx context.Context, name string) (int32, error)
- func (q *Queries) CreateTypology(ctx context.Context, arg CreateTypologyParams) (int32, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (int32, error)
- func (q *Queries) DeleteCarbonFootprintGoal(ctx context.Context, arg DeleteCarbonFootprintGoalParams) error
- func (q *Queries) DeleteDevice(ctx context.Context, id []int32) *DeleteDeviceBatchResults
- func (q *Queries) DeleteDeviceByUser(ctx context.Context, userID int32) error
- func (q *Queries) DeleteFoodItemFromLog(ctx context.Context, arg DeleteFoodItemFromLogParams) error
- func (q *Queries) DeleteUserByFirebaseUID(ctx context.Context, firebaseUid string) error
- func (q *Queries) GetActiveCarbonFootprintGoals(ctx context.Context, userID int32) ([]CarbonFootprintGoal, error)
- func (q *Queries) GetAggregateFoodItem(ctx context.Context, foodItemID int32) (AggregateFoodItem, error)
- func (q *Queries) GetCarbonFootprintGoals(ctx context.Context, userID int32) ([]CarbonFootprintGoal, error)
- func (q *Queries) GetDailyAverageCarbonFootprint(ctx context.Context) (decimal.Decimal, error)
- func (q *Queries) GetDailyAverageCarbonFootprintByDietaryRequirement(ctx context.Context, dietaryRequirement int32) (decimal.Decimal, error)
- func (q *Queries) GetDailyCarbonFootprintByDateRange(ctx context.Context, arg GetDailyCarbonFootprintByDateRangeParams) ([]GetDailyCarbonFootprintByDateRangeRow, error)
- func (q *Queries) GetDevices(ctx context.Context) ([]Device, error)
- func (q *Queries) GetFoodItemIdByLogId(ctx context.Context, id int32) (int32, error)
- func (q *Queries) GetFoodItemInfo(ctx context.Context, foodItemID int32) (GetFoodItemInfoRow, error)
- func (q *Queries) GetFoodItemInfoByRegion(ctx context.Context, arg GetFoodItemInfoByRegionParams) (GetFoodItemInfoByRegionRow, error)
- func (q *Queries) GetFoodItemLogByDate(ctx context.Context, arg GetFoodItemLogByDateParams) ([]GetFoodItemLogByDateRow, error)
- func (q *Queries) GetFoodItemLogStreak(ctx context.Context, userID int32) (GetFoodItemLogStreakRow, error)
- func (q *Queries) GetLoggedDaysInMonth(ctx context.Context, arg GetLoggedDaysInMonthParams) ([]int32, error)
- func (q *Queries) GetRegionalAggregateFoodItem(ctx context.Context, arg GetRegionalAggregateFoodItemParams) (RegionalAggregateFoodItem, error)
- func (q *Queries) GetUserByFirebaseUID(ctx context.Context, firebaseUid string) (User, error)
- func (q *Queries) GetUserDailyAverageCarbonFootprint(ctx context.Context, userID int32) (decimal.Decimal, error)
- func (q *Queries) GetUserIDs(ctx context.Context) ([]int32, error)
- func (q *Queries) ListAggregateFoodItems(ctx context.Context) ([]ListAggregateFoodItemsRow, error)
- func (q *Queries) ListAggregateFoodItemsByRegion(ctx context.Context, region int32) ([]ListAggregateFoodItemsByRegionRow, error)
- func (q *Queries) ListAggregateSubTypologiesByRegion(ctx context.Context, region int32) ([]ListAggregateSubTypologiesByRegionRow, error)
- func (q *Queries) ListAggregateTypologiesByRegion(ctx context.Context, region int32) ([]ListAggregateTypologiesByRegionRow, error)
- func (q *Queries) ListSourcesByFoodItem(ctx context.Context, foodItemID int32) ([]ListSourcesByFoodItemRow, error)
- func (q *Queries) ListSourcesByFoodItemAndRegion(ctx context.Context, arg ListSourcesByFoodItemAndRegionParams) ([]ListSourcesByFoodItemAndRegionRow, error)
- func (q *Queries) ListSubTypologyNames(ctx context.Context) ([]string, error)
- func (q *Queries) ListTypologyNames(ctx context.Context) ([]string, error)
- func (q *Queries) UpdateCarbonFootprintGoal(ctx context.Context, arg UpdateCarbonFootprintGoalParams) error
- func (q *Queries) UpdateFoodItemFromLog(ctx context.Context, arg UpdateFoodItemFromLogParams) error
- func (q *Queries) UpdateUserSettings(ctx context.Context, arg UpdateUserSettingsParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type RegionalAggregateFoodItem
- type Source
- type SubTypology
- type Typology
- type UpdateCarbonFootprintGoalParams
- type UpdateFoodItemFromLogParams
- type UpdateUserSettingsParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddDeviceParams ¶
type AddFoodItemToLogParams ¶
type AggregateFoodItem ¶
type CarbonFootprintGoal ¶
type CreateFoodItemParams ¶
type CreateLifeCycleParams ¶
type CreateSourceParams ¶
type CreateTypologyParams ¶
type CreateUserParams ¶
type DailyUserAverage ¶
type DeleteDeviceBatchResults ¶
type DeleteDeviceBatchResults struct {
// contains filtered or unexported fields
}
func (*DeleteDeviceBatchResults) Close ¶
func (b *DeleteDeviceBatchResults) Close() error
func (*DeleteDeviceBatchResults) Exec ¶
func (b *DeleteDeviceBatchResults) Exec(f func(int, error))
type Device ¶
type Device struct { ID int32 UserID int32 FcmToken string CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz }
type FoodItemLog ¶
type GetFoodItemInfoRow ¶
type GetFoodItemLogByDateRow ¶
type GetFoodItemLogStreakRow ¶
type NullCfTypes ¶
func (*NullCfTypes) Scan ¶
func (ns *NullCfTypes) Scan(value interface{}) error
Scan implements the Scanner interface.
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddCarbonFootprintGoal ¶
func (*Queries) AddDevice ¶
func (q *Queries) AddDevice(ctx context.Context, arg AddDeviceParams) error
func (*Queries) AddFoodItemToLog ¶
func (*Queries) CreateFoodItem ¶
func (*Queries) CreateLifeCycle ¶
func (*Queries) CreateSource ¶
func (*Queries) CreateSubTypology ¶
func (*Queries) CreateTypology ¶
func (*Queries) CreateUser ¶
func (*Queries) DeleteCarbonFootprintGoal ¶
func (q *Queries) DeleteCarbonFootprintGoal(ctx context.Context, arg DeleteCarbonFootprintGoalParams) error
func (*Queries) DeleteDevice ¶
func (q *Queries) DeleteDevice(ctx context.Context, id []int32) *DeleteDeviceBatchResults
func (*Queries) DeleteDeviceByUser ¶
func (*Queries) DeleteFoodItemFromLog ¶
func (q *Queries) DeleteFoodItemFromLog(ctx context.Context, arg DeleteFoodItemFromLogParams) error
func (*Queries) DeleteUserByFirebaseUID ¶
func (*Queries) GetActiveCarbonFootprintGoals ¶
func (*Queries) GetAggregateFoodItem ¶
func (*Queries) GetCarbonFootprintGoals ¶
func (*Queries) GetDailyAverageCarbonFootprint ¶
func (*Queries) GetDailyAverageCarbonFootprintByDietaryRequirement ¶
func (*Queries) GetDailyCarbonFootprintByDateRange ¶
func (q *Queries) GetDailyCarbonFootprintByDateRange(ctx context.Context, arg GetDailyCarbonFootprintByDateRangeParams) ([]GetDailyCarbonFootprintByDateRangeRow, error)
func (*Queries) GetFoodItemIdByLogId ¶
func (*Queries) GetFoodItemInfo ¶
func (*Queries) GetFoodItemInfoByRegion ¶
func (q *Queries) GetFoodItemInfoByRegion(ctx context.Context, arg GetFoodItemInfoByRegionParams) (GetFoodItemInfoByRegionRow, error)
func (*Queries) GetFoodItemLogByDate ¶
func (q *Queries) GetFoodItemLogByDate(ctx context.Context, arg GetFoodItemLogByDateParams) ([]GetFoodItemLogByDateRow, error)
func (*Queries) GetFoodItemLogStreak ¶
func (q *Queries) GetFoodItemLogStreak(ctx context.Context, userID int32) (GetFoodItemLogStreakRow, error)
Generate "groups" of dates by subtracting the date's row number (no gaps) from the date itself (with potential gaps). Whenever there is a gap, there will be a new group
func (*Queries) GetLoggedDaysInMonth ¶
func (*Queries) GetRegionalAggregateFoodItem ¶
func (q *Queries) GetRegionalAggregateFoodItem(ctx context.Context, arg GetRegionalAggregateFoodItemParams) (RegionalAggregateFoodItem, error)
func (*Queries) GetUserByFirebaseUID ¶
func (*Queries) GetUserDailyAverageCarbonFootprint ¶
func (*Queries) ListAggregateFoodItems ¶
func (q *Queries) ListAggregateFoodItems(ctx context.Context) ([]ListAggregateFoodItemsRow, error)
func (*Queries) ListAggregateFoodItemsByRegion ¶
func (*Queries) ListAggregateSubTypologiesByRegion ¶
func (*Queries) ListAggregateTypologiesByRegion ¶
func (*Queries) ListSourcesByFoodItem ¶
func (*Queries) ListSourcesByFoodItemAndRegion ¶
func (q *Queries) ListSourcesByFoodItemAndRegion(ctx context.Context, arg ListSourcesByFoodItemAndRegionParams) ([]ListSourcesByFoodItemAndRegionRow, error)
func (*Queries) ListSubTypologyNames ¶
func (*Queries) ListTypologyNames ¶
func (*Queries) UpdateCarbonFootprintGoal ¶
func (q *Queries) UpdateCarbonFootprintGoal(ctx context.Context, arg UpdateCarbonFootprintGoalParams) error
func (*Queries) UpdateFoodItemFromLog ¶
func (q *Queries) UpdateFoodItemFromLog(ctx context.Context, arg UpdateFoodItemFromLogParams) error
func (*Queries) UpdateUserSettings ¶
func (q *Queries) UpdateUserSettings(ctx context.Context, arg UpdateUserSettingsParams) error
type SubTypology ¶
Click to show internal directories.
Click to hide internal directories.