Documentation
¶
Index ¶
- type Course
- type CreateRecipeParams
- type Cuisine
- type DBTX
- type FoodCategory
- type Footnote
- type Ingredient
- type Level
- type ListRecipesParams
- type Measurement
- type Menu
- type MenuRecipe
- type NutritionalInfo
- type PGStore
- type Querier
- type Queries
- func (q *Queries) CreateRecipe(ctx context.Context, arg CreateRecipeParams) (Recipe, error)
- func (q *Queries) DeleteRecipe(ctx context.Context, id int32) error
- func (q *Queries) GetRecipeById(ctx context.Context, id int32) (Recipe, error)
- func (q *Queries) GetRecipeForUpdate(ctx context.Context, id int32) (Recipe, error)
- func (q *Queries) ListRecipes(ctx context.Context, arg ListRecipesParams) ([]Recipe, error)
- func (q *Queries) UpdateRecipe(ctx context.Context, arg UpdateRecipeParams) (Recipe, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Recipe
- type RecipeCourse
- type RecipeFoodCategory
- type RecipeIngredient
- type RecipeNutritionalInfo
- type RecipePart
- type RecipeStep
- type Store
- type UpdateRecipeParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRecipeParams ¶
type CreateRecipeParams struct {
Title string `json:"title"`
Description string `json:"description"`
PrepTime int32 `json:"prep_time"`
CookTime int32 `json:"cook_time"`
ReadyIn int32 `json:"ready_in"`
Yelds int32 `json:"yelds"`
LevelID int32 `json:"level_id"`
CaloriesPerSrv int32 `json:"calories_per_srv"`
CuisineID int32 `json:"cuisine_id"`
Source sql.NullString `json:"source"`
Rating sql.NullInt32 `json:"rating"`
ImagePath string `json:"image_path"`
}
type FoodCategory ¶
type Ingredient ¶
type ListRecipesParams ¶
type Measurement ¶
type MenuRecipe ¶
type NutritionalInfo ¶
type PGStore ¶
type PGStore struct {
*Queries
// contains filtered or unexported fields
}
Store provides all function to execure db queries and transactons
func (*PGStore) UpdateRecipeProc ¶
type Querier ¶
type Querier interface {
CreateRecipe(ctx context.Context, arg CreateRecipeParams) (Recipe, error)
DeleteRecipe(ctx context.Context, id int32) error
GetRecipeById(ctx context.Context, id int32) (Recipe, error)
GetRecipeForUpdate(ctx context.Context, id int32) (Recipe, error)
ListRecipes(ctx context.Context, arg ListRecipesParams) ([]Recipe, error)
UpdateRecipe(ctx context.Context, arg UpdateRecipeParams) (Recipe, error)
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateRecipe ¶
func (*Queries) GetRecipeById ¶
func (*Queries) GetRecipeForUpdate ¶
func (*Queries) ListRecipes ¶
func (*Queries) UpdateRecipe ¶
type Recipe ¶
type Recipe struct {
ID int32 `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
PrepTime int32 `json:"prep_time"`
CookTime int32 `json:"cook_time"`
ReadyIn int32 `json:"ready_in"`
Yelds int32 `json:"yelds"`
LevelID int32 `json:"level_id"`
CaloriesPerSrv int32 `json:"calories_per_srv"`
CuisineID int32 `json:"cuisine_id"`
Source sql.NullString `json:"source"`
Rating sql.NullInt32 `json:"rating"`
ImagePath string `json:"image_path"`
}
type RecipeCourse ¶
type RecipeFoodCategory ¶
type RecipeIngredient ¶
type RecipeNutritionalInfo ¶
type RecipePart ¶
type RecipeStep ¶
type Store ¶
type UpdateRecipeParams ¶
type UpdateRecipeParams struct {
ID int32 `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
PrepTime int32 `json:"prep_time"`
CookTime int32 `json:"cook_time"`
ReadyIn int32 `json:"ready_in"`
Yelds int32 `json:"yelds"`
LevelID int32 `json:"level_id"`
CaloriesPerSrv int32 `json:"calories_per_srv"`
CuisineID int32 `json:"cuisine_id"`
Source sql.NullString `json:"source"`
Rating sql.NullInt32 `json:"rating"`
ImagePath string `json:"image_path"`
}
Click to show internal directories.
Click to hide internal directories.