Documentation ¶
Index ¶
- type AddImageToReviewParams
- type AddMultipleImagesToReviewParams
- type AddMultipleOccurrenceSideDishesParams
- type AddMultipleOccurrenceTagsParams
- type AddOccurrenceSideDishParams
- type AddOccurrenceTagParams
- type CreateDishAliasParams
- type CreateDishParams
- type CreateOccurrenceParams
- type CreateReviewParams
- type CreateTagParams
- type DBTX
- type Dish
- type DishAlias
- type GetDishReviewMetadataParams
- type GetDishReviewMetadataRow
- type GetDishReviewsParams
- type GetFilteredOccurrencesParams
- type GetOccurrenceReviewMetadataParams
- type GetOccurrenceReviewMetadataRow
- type GetOccurrenceReviewsParams
- type Image
- type Location
- type NullOccurrenceStatus
- type NullPriority
- type Occurrence
- type OccurrenceSideDish
- type OccurrenceStatus
- type OccurrenceTag
- type Priority
- type Querier
- type Queries
- func (q *Queries) AddImageToReview(ctx context.Context, arg *AddImageToReviewParams) (*Image, error)
- func (q *Queries) AddMultipleImagesToReview(ctx context.Context, arg []*AddMultipleImagesToReviewParams) (int64, error)
- func (q *Queries) AddMultipleOccurrenceSideDishes(ctx context.Context, arg []*AddMultipleOccurrenceSideDishesParams) (int64, error)
- func (q *Queries) AddMultipleOccurrenceTags(ctx context.Context, arg []*AddMultipleOccurrenceTagsParams) (int64, error)
- func (q *Queries) AddOccurrenceSideDish(ctx context.Context, arg *AddOccurrenceSideDishParams) (*OccurrenceSideDish, error)
- func (q *Queries) AddOccurrenceTag(ctx context.Context, arg *AddOccurrenceTagParams) (*OccurrenceTag, error)
- func (q *Queries) CreateDish(ctx context.Context, arg *CreateDishParams) (*Dish, error)
- func (q *Queries) CreateDishAlias(ctx context.Context, arg *CreateDishAliasParams) (*DishAlias, error)
- func (q *Queries) CreateOccurrence(ctx context.Context, arg *CreateOccurrenceParams) (*Occurrence, error)
- func (q *Queries) CreateReview(ctx context.Context, arg *CreateReviewParams) (*Review, error)
- func (q *Queries) CreateTag(ctx context.Context, arg *CreateTagParams) (*Tag, error)
- func (q *Queries) DeleteDishAlias(ctx context.Context, aliasName string) (*DishAlias, error)
- func (q *Queries) DeleteImage(ctx context.Context, id uuid.UUID) (*Image, error)
- func (q *Queries) DeleteOccurrence(ctx context.Context, id uuid.UUID) (*Occurrence, error)
- func (q *Queries) DeleteReview(ctx context.Context, id uuid.UUID) (*Review, error)
- func (q *Queries) GetAliasesForDish(ctx context.Context, dish uuid.UUID) ([]string, error)
- func (q *Queries) GetAllAliases(ctx context.Context) ([]*DishAlias, error)
- func (q *Queries) GetAllDishes(ctx context.Context) ([]*Dish, error)
- func (q *Queries) GetAllImages(ctx context.Context) ([]*Image, error)
- func (q *Queries) GetAllLocations(ctx context.Context) ([]*Location, error)
- func (q *Queries) GetAllOccurrences(ctx context.Context) ([]*Occurrence, error)
- func (q *Queries) GetAllReviews(ctx context.Context, approved sql.NullBool) ([]*Review, error)
- func (q *Queries) GetAllTags(ctx context.Context) ([]*Tag, error)
- func (q *Queries) GetDishByID(ctx context.Context, id uuid.UUID) (*Dish, error)
- func (q *Queries) GetDishReviewMetadata(ctx context.Context, arg *GetDishReviewMetadataParams) (*GetDishReviewMetadataRow, error)
- func (q *Queries) GetDishReviews(ctx context.Context, arg *GetDishReviewsParams) ([]*Review, error)
- func (q *Queries) GetFilteredOccurrences(ctx context.Context, arg *GetFilteredOccurrencesParams) ([]*Occurrence, error)
- func (q *Queries) GetImageByID(ctx context.Context, id uuid.UUID) (*Image, error)
- func (q *Queries) GetImageHashByID(ctx context.Context, id uuid.UUID) (string, error)
- func (q *Queries) GetImagesByDish(ctx context.Context, id uuid.UUID) ([]*Image, error)
- func (q *Queries) GetImagesByOccurrence(ctx context.Context, id uuid.UUID) ([]*Image, error)
- func (q *Queries) GetImagesByReview(ctx context.Context, id uuid.UUID) ([]*Image, error)
- func (q *Queries) GetImagesForOccurrence(ctx context.Context, id uuid.UUID) ([]*Image, error)
- func (q *Queries) GetLocationByID(ctx context.Context, id uuid.UUID) (*Location, error)
- func (q *Queries) GetOccurrenceByID(ctx context.Context, id uuid.UUID) (*Occurrence, error)
- func (q *Queries) GetOccurrenceReviewMetadata(ctx context.Context, arg *GetOccurrenceReviewMetadataParams) (*GetOccurrenceReviewMetadataRow, error)
- func (q *Queries) GetOccurrenceReviews(ctx context.Context, arg *GetOccurrenceReviewsParams) ([]*Review, error)
- func (q *Queries) GetOccurrencesAfterInclusiveDate(ctx context.Context, date time.Time) ([]*Occurrence, error)
- func (q *Queries) GetOccurrencesByDate(ctx context.Context, date time.Time) ([]*Occurrence, error)
- func (q *Queries) GetReviewByID(ctx context.Context, id uuid.UUID) (*Review, error)
- func (q *Queries) GetReviewByImage(ctx context.Context, id uuid.UUID) (*Review, error)
- func (q *Queries) GetSideDishesForOccurrence(ctx context.Context, occurrence uuid.UUID) ([]*Dish, error)
- func (q *Queries) GetTagByKey(ctx context.Context, key string) (*Tag, error)
- func (q *Queries) GetTagsForOccurrence(ctx context.Context, occurrence uuid.UUID) ([]*Tag, error)
- func (q *Queries) GetUserByEmail(ctx context.Context, email string) (*User, error)
- func (q *Queries) GetUserByID(ctx context.Context, id uuid.UUID) (*User, error)
- func (q *Queries) RemoveOccurrenceSideDish(ctx context.Context, arg *RemoveOccurrenceSideDishParams) (*OccurrenceSideDish, error)
- func (q *Queries) RemoveOccurrenceTag(ctx context.Context, arg *RemoveOccurrenceTagParams) (*OccurrenceTag, error)
- func (q *Queries) SetReviewApproval(ctx context.Context, arg *SetReviewApprovalParams) (*Review, error)
- func (q *Queries) UpdateDish(ctx context.Context, arg *UpdateDishParams) (*Dish, error)
- func (q *Queries) UpdateDishAlias(ctx context.Context, arg *UpdateDishAliasParams) (*DishAlias, error)
- func (q *Queries) UpdateOccurrence(ctx context.Context, arg *UpdateOccurrenceParams) (*Occurrence, error)
- func (q *Queries) UpdateReview(ctx context.Context, arg *UpdateReviewParams) (*Review, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type RemoveOccurrenceSideDishParams
- type RemoveOccurrenceTagParams
- type Review
- type SetReviewApprovalParams
- type Tag
- type UpdateDishAliasParams
- type UpdateDishParams
- type UpdateOccurrenceParams
- type UpdateReviewParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddImageToReviewParams ¶
type AddOccurrenceTagParams ¶
type CreateDishAliasParams ¶
type CreateDishParams ¶
type CreateDishParams struct { NameDe string `json:"name_de"` NameEn sql.NullString `json:"name_en"` }
type CreateOccurrenceParams ¶
type CreateOccurrenceParams struct { Location uuid.UUID `json:"location"` Dish uuid.UUID `json:"dish"` Date time.Time `json:"date"` Status OccurrenceStatus `json:"status"` Kj sql.NullInt32 `json:"kj"` Kcal sql.NullInt32 `json:"kcal"` Fat sql.NullInt32 `json:"fat"` SaturatedFat sql.NullInt32 `json:"saturated_fat"` Carbohydrates sql.NullInt32 `json:"carbohydrates"` Sugar sql.NullInt32 `json:"sugar"` Fiber sql.NullInt32 `json:"fiber"` Protein sql.NullInt32 `json:"protein"` Salt sql.NullInt32 `json:"salt"` PriceStudent sql.NullInt32 `json:"price_student"` PriceStaff sql.NullInt32 `json:"price_staff"` PriceGuest sql.NullInt32 `json:"price_guest"` }
type CreateReviewParams ¶
type CreateReviewParams struct { Occurrence uuid.UUID `json:"occurrence"` DisplayName sql.NullString `json:"display_name"` Stars int32 `json:"stars"` Text sql.NullString `json:"text"` }
type CreateTagParams ¶
type DBTX ¶
type DBTX interface { Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) Query(context.Context, string, ...interface{}) (pgx.Rows, error) QueryRow(context.Context, string, ...interface{}) pgx.Row CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) }
type Dish ¶
type Dish struct { ID uuid.UUID `json:"id"` NameDe string `json:"name_de"` NameEn sql.NullString `json:"name_en"` }
type GetDishReviewsParams ¶
type NullOccurrenceStatus ¶
type NullOccurrenceStatus struct { OccurrenceStatus OccurrenceStatus Valid bool // Valid is true if String is not NULL }
func (*NullOccurrenceStatus) Scan ¶
func (ns *NullOccurrenceStatus) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullPriority ¶
func (*NullPriority) Scan ¶
func (ns *NullPriority) Scan(value interface{}) error
Scan implements the Scanner interface.
type Occurrence ¶
type Occurrence struct { ID uuid.UUID `json:"id"` Location uuid.UUID `json:"location"` Dish uuid.UUID `json:"dish"` Date time.Time `json:"date"` Status OccurrenceStatus `json:"status"` Kj sql.NullInt32 `json:"kj"` Kcal sql.NullInt32 `json:"kcal"` Fat sql.NullInt32 `json:"fat"` SaturatedFat sql.NullInt32 `json:"saturated_fat"` Carbohydrates sql.NullInt32 `json:"carbohydrates"` Sugar sql.NullInt32 `json:"sugar"` Fiber sql.NullInt32 `json:"fiber"` Protein sql.NullInt32 `json:"protein"` Salt sql.NullInt32 `json:"salt"` PriceStudent sql.NullInt32 `json:"price_student"` PriceStaff sql.NullInt32 `json:"price_staff"` PriceGuest sql.NullInt32 `json:"price_guest"` }
type OccurrenceSideDish ¶
type OccurrenceStatus ¶
type OccurrenceStatus string
const ( OccurrenceStatusCONFIRMED OccurrenceStatus = "CONFIRMED" OccurrenceStatusAPPROVED OccurrenceStatus = "APPROVED" OccurrenceStatusAWAITINGAPPROVAL OccurrenceStatus = "AWAITING_APPROVAL" OccurrenceStatusUPDATED OccurrenceStatus = "UPDATED" OccurrenceStatusPENDINGDELETION OccurrenceStatus = "PENDING_DELETION" )
func (*OccurrenceStatus) Scan ¶
func (e *OccurrenceStatus) Scan(src interface{}) error
type OccurrenceTag ¶
type Querier ¶
type Querier interface { AddImageToReview(ctx context.Context, arg *AddImageToReviewParams) (*Image, error) AddMultipleImagesToReview(ctx context.Context, arg []*AddMultipleImagesToReviewParams) (int64, error) AddMultipleOccurrenceSideDishes(ctx context.Context, arg []*AddMultipleOccurrenceSideDishesParams) (int64, error) AddMultipleOccurrenceTags(ctx context.Context, arg []*AddMultipleOccurrenceTagsParams) (int64, error) AddOccurrenceSideDish(ctx context.Context, arg *AddOccurrenceSideDishParams) (*OccurrenceSideDish, error) AddOccurrenceTag(ctx context.Context, arg *AddOccurrenceTagParams) (*OccurrenceTag, error) CreateDish(ctx context.Context, arg *CreateDishParams) (*Dish, error) CreateDishAlias(ctx context.Context, arg *CreateDishAliasParams) (*DishAlias, error) CreateOccurrence(ctx context.Context, arg *CreateOccurrenceParams) (*Occurrence, error) CreateReview(ctx context.Context, arg *CreateReviewParams) (*Review, error) CreateTag(ctx context.Context, arg *CreateTagParams) (*Tag, error) DeleteDishAlias(ctx context.Context, aliasName string) (*DishAlias, error) DeleteImage(ctx context.Context, id uuid.UUID) (*Image, error) DeleteOccurrence(ctx context.Context, id uuid.UUID) (*Occurrence, error) DeleteReview(ctx context.Context, id uuid.UUID) (*Review, error) GetAliasesForDish(ctx context.Context, dish uuid.UUID) ([]string, error) GetAllAliases(ctx context.Context) ([]*DishAlias, error) GetAllDishes(ctx context.Context) ([]*Dish, error) GetAllImages(ctx context.Context) ([]*Image, error) GetAllLocations(ctx context.Context) ([]*Location, error) GetAllOccurrences(ctx context.Context) ([]*Occurrence, error) GetAllReviews(ctx context.Context, approved sql.NullBool) ([]*Review, error) GetAllTags(ctx context.Context) ([]*Tag, error) GetDishByID(ctx context.Context, id uuid.UUID) (*Dish, error) GetDishReviewMetadata(ctx context.Context, arg *GetDishReviewMetadataParams) (*GetDishReviewMetadataRow, error) GetDishReviews(ctx context.Context, arg *GetDishReviewsParams) ([]*Review, error) GetFilteredOccurrences(ctx context.Context, arg *GetFilteredOccurrencesParams) ([]*Occurrence, error) GetImageByID(ctx context.Context, id uuid.UUID) (*Image, error) GetImageHashByID(ctx context.Context, id uuid.UUID) (string, error) GetImagesByDish(ctx context.Context, id uuid.UUID) ([]*Image, error) GetImagesByOccurrence(ctx context.Context, id uuid.UUID) ([]*Image, error) GetImagesByReview(ctx context.Context, id uuid.UUID) ([]*Image, error) GetImagesForOccurrence(ctx context.Context, id uuid.UUID) ([]*Image, error) GetLocationByID(ctx context.Context, id uuid.UUID) (*Location, error) GetOccurrenceByID(ctx context.Context, id uuid.UUID) (*Occurrence, error) GetOccurrenceReviewMetadata(ctx context.Context, arg *GetOccurrenceReviewMetadataParams) (*GetOccurrenceReviewMetadataRow, error) GetOccurrenceReviews(ctx context.Context, arg *GetOccurrenceReviewsParams) ([]*Review, error) GetOccurrencesAfterInclusiveDate(ctx context.Context, date time.Time) ([]*Occurrence, error) GetOccurrencesByDate(ctx context.Context, date time.Time) ([]*Occurrence, error) GetReviewByID(ctx context.Context, id uuid.UUID) (*Review, error) GetReviewByImage(ctx context.Context, id uuid.UUID) (*Review, error) GetSideDishesForOccurrence(ctx context.Context, occurrence uuid.UUID) ([]*Dish, error) GetTagByKey(ctx context.Context, key string) (*Tag, error) GetTagsForOccurrence(ctx context.Context, occurrence uuid.UUID) ([]*Tag, error) GetUserByEmail(ctx context.Context, email string) (*User, error) GetUserByID(ctx context.Context, id uuid.UUID) (*User, error) RemoveOccurrenceSideDish(ctx context.Context, arg *RemoveOccurrenceSideDishParams) (*OccurrenceSideDish, error) RemoveOccurrenceTag(ctx context.Context, arg *RemoveOccurrenceTagParams) (*OccurrenceTag, error) SetReviewApproval(ctx context.Context, arg *SetReviewApprovalParams) (*Review, error) UpdateDish(ctx context.Context, arg *UpdateDishParams) (*Dish, error) UpdateDishAlias(ctx context.Context, arg *UpdateDishAliasParams) (*DishAlias, error) UpdateOccurrence(ctx context.Context, arg *UpdateOccurrenceParams) (*Occurrence, error) UpdateReview(ctx context.Context, arg *UpdateReviewParams) (*Review, error) }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddImageToReview ¶
func (*Queries) AddMultipleImagesToReview ¶
func (*Queries) AddMultipleOccurrenceSideDishes ¶
func (*Queries) AddMultipleOccurrenceTags ¶
func (*Queries) AddOccurrenceSideDish ¶
func (q *Queries) AddOccurrenceSideDish(ctx context.Context, arg *AddOccurrenceSideDishParams) (*OccurrenceSideDish, error)
func (*Queries) AddOccurrenceTag ¶
func (q *Queries) AddOccurrenceTag(ctx context.Context, arg *AddOccurrenceTagParams) (*OccurrenceTag, error)
func (*Queries) CreateDish ¶
func (*Queries) CreateDishAlias ¶
func (*Queries) CreateOccurrence ¶
func (q *Queries) CreateOccurrence(ctx context.Context, arg *CreateOccurrenceParams) (*Occurrence, error)
func (*Queries) CreateReview ¶
func (*Queries) DeleteDishAlias ¶
func (*Queries) DeleteImage ¶
func (*Queries) DeleteOccurrence ¶
func (*Queries) DeleteReview ¶
func (*Queries) GetAliasesForDish ¶
func (*Queries) GetAllAliases ¶
func (*Queries) GetAllImages ¶
func (*Queries) GetAllLocations ¶
func (*Queries) GetAllOccurrences ¶
func (q *Queries) GetAllOccurrences(ctx context.Context) ([]*Occurrence, error)
func (*Queries) GetAllReviews ¶
func (*Queries) GetDishByID ¶
func (*Queries) GetDishReviewMetadata ¶
func (q *Queries) GetDishReviewMetadata(ctx context.Context, arg *GetDishReviewMetadataParams) (*GetDishReviewMetadataRow, error)
func (*Queries) GetDishReviews ¶
func (*Queries) GetFilteredOccurrences ¶
func (q *Queries) GetFilteredOccurrences(ctx context.Context, arg *GetFilteredOccurrencesParams) ([]*Occurrence, error)
func (*Queries) GetImageByID ¶
func (*Queries) GetImageHashByID ¶ added in v0.4.0
func (*Queries) GetImagesByDish ¶
func (*Queries) GetImagesByOccurrence ¶
func (*Queries) GetImagesByReview ¶
func (*Queries) GetImagesForOccurrence ¶
func (*Queries) GetLocationByID ¶
func (*Queries) GetOccurrenceByID ¶
func (*Queries) GetOccurrenceReviewMetadata ¶
func (q *Queries) GetOccurrenceReviewMetadata(ctx context.Context, arg *GetOccurrenceReviewMetadataParams) (*GetOccurrenceReviewMetadataRow, error)
func (*Queries) GetOccurrenceReviews ¶
func (*Queries) GetOccurrencesAfterInclusiveDate ¶
func (*Queries) GetOccurrencesByDate ¶
func (*Queries) GetReviewByID ¶
func (*Queries) GetReviewByImage ¶
func (*Queries) GetSideDishesForOccurrence ¶
func (*Queries) GetTagByKey ¶
func (*Queries) GetTagsForOccurrence ¶
func (*Queries) GetUserByEmail ¶
func (*Queries) GetUserByID ¶
func (*Queries) RemoveOccurrenceSideDish ¶
func (q *Queries) RemoveOccurrenceSideDish(ctx context.Context, arg *RemoveOccurrenceSideDishParams) (*OccurrenceSideDish, error)
func (*Queries) RemoveOccurrenceTag ¶
func (q *Queries) RemoveOccurrenceTag(ctx context.Context, arg *RemoveOccurrenceTagParams) (*OccurrenceTag, error)
func (*Queries) SetReviewApproval ¶
func (*Queries) UpdateDish ¶
func (*Queries) UpdateDishAlias ¶
func (*Queries) UpdateOccurrence ¶
func (q *Queries) UpdateOccurrence(ctx context.Context, arg *UpdateOccurrenceParams) (*Occurrence, error)
func (*Queries) UpdateReview ¶
type Review ¶
type Review struct { ID uuid.UUID `json:"id"` Occurrence uuid.UUID `json:"occurrence"` DisplayName sql.NullString `json:"display_name"` Stars int32 `json:"stars"` Text sql.NullString `json:"text"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` AcceptedAt sql.NullTime `json:"accepted_at"` }
type SetReviewApprovalParams ¶
type UpdateDishAliasParams ¶
type UpdateDishAliasParams struct { AliasName string `json:"alias_name"` NewAliasName sql.NullString `json:"new_alias_name"` NormalizedAliasName sql.NullString `json:"normalized_alias_name"` Dish uuid.NullUUID `json:"dish"` }
type UpdateDishParams ¶
type UpdateDishParams struct { ID uuid.UUID `json:"id"` NameDe sql.NullString `json:"name_de"` NameEn sql.NullString `json:"name_en"` }
type UpdateOccurrenceParams ¶
type UpdateOccurrenceParams struct { ID uuid.UUID `json:"id"` Dish uuid.NullUUID `json:"dish"` Date sql.NullTime `json:"date"` Status NullOccurrenceStatus `json:"status"` Kj sql.NullInt32 `json:"kj"` Kcal sql.NullInt32 `json:"kcal"` Fat sql.NullInt32 `json:"fat"` SaturatedFat sql.NullInt32 `json:"saturated_fat"` Carbohydrates sql.NullInt32 `json:"carbohydrates"` Sugar sql.NullInt32 `json:"sugar"` Fiber sql.NullInt32 `json:"fiber"` Protein sql.NullInt32 `json:"protein"` Salt sql.NullInt32 `json:"salt"` PriceStudent sql.NullInt32 `json:"price_student"` PriceStaff sql.NullInt32 `json:"price_staff"` PriceGuest sql.NullInt32 `json:"price_guest"` }
type UpdateReviewParams ¶
Click to show internal directories.
Click to hide internal directories.