Documentation ¶
Index ¶
- func CreateRecipe(createRecipe createRecipe) *api.Endpoint
- func GetRecipe(getRecipe getRecipe, getIngredientsForRecipe getIngredientsForRecipe, ...) *api.Endpoint
- func ListRecipes(listRecipes listRecipes) *api.Endpoint
- type ByIngredientNumber
- type ByStepNumber
- type CreateRecipeRequest
- type CreateRecipeResponse
- type RecipeListResponse
- type RecipeResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRecipe ¶
func ListRecipes ¶
Types ¶
type ByIngredientNumber ¶
type ByIngredientNumber []*repositories.Ingredient
func (ByIngredientNumber) Len ¶
func (a ByIngredientNumber) Len() int
func (ByIngredientNumber) Less ¶
func (a ByIngredientNumber) Less(i, j int) bool
func (ByIngredientNumber) Swap ¶
func (a ByIngredientNumber) Swap(i, j int)
type ByStepNumber ¶
type ByStepNumber []*repositories.Step
func (ByStepNumber) Len ¶
func (a ByStepNumber) Len() int
func (ByStepNumber) Less ¶
func (a ByStepNumber) Less(i, j int) bool
func (ByStepNumber) Swap ¶
func (a ByStepNumber) Swap(i, j int)
type CreateRecipeRequest ¶
type CreateRecipeRequest struct { Name string `json:"name"` Description string `json:"description"` Servings int `json:"servings"` PrepTime string `json:"prep_time"` CookTime string `json:"cook_time"` CoolTime string `json:"cool_time"` TotalTime string `json:"total_time"` Source string `json:"source"` }
func (*CreateRecipeRequest) Validate ¶
func (a *CreateRecipeRequest) Validate() map[string]string
type CreateRecipeResponse ¶
type RecipeListResponse ¶
type RecipeListResponse struct {
Recipes []*repositories.Recipe `json:"recipes"`
}
type RecipeResponse ¶
type RecipeResponse struct { repositories.Recipe Ingredients []*repositories.Ingredient `json:"ingredients"` Steps []*repositories.Step `json:"steps"` }
Click to show internal directories.
Click to hide internal directories.