Documentation ¶
Index ¶
- type CategoryHandlers
- func (h *CategoryHandlers) Create(w http.ResponseWriter, r *http.Request)
- func (h *CategoryHandlers) Delete(w http.ResponseWriter, r *http.Request, categoryID string)
- func (h *CategoryHandlers) Get(w http.ResponseWriter, r *http.Request, categoryID string)
- func (h *CategoryHandlers) GetAll(w http.ResponseWriter, r *http.Request)
- func (h *CategoryHandlers) Update(w http.ResponseWriter, r *http.Request, categoryID string)
- type CategoryService
- type HanderUtils
- type ImageService
- type IngredientHandlers
- func (h IngredientHandlers) Create(w http.ResponseWriter, r *http.Request)
- func (h IngredientHandlers) Delete(w http.ResponseWriter, r *http.Request, ingredientID string)
- func (h IngredientHandlers) GetAll(w http.ResponseWriter, r *http.Request)
- func (h IngredientHandlers) GetSingle(w http.ResponseWriter, r *http.Request, ingredientID string)
- func (h IngredientHandlers) GetUnits(w http.ResponseWriter, r *http.Request)
- func (h IngredientHandlers) Update(w http.ResponseWriter, r *http.Request, ingredientID string)
- type IngredientService
- type LoggerInterface
- type RecipeHandlers
- func (h RecipeHandlers) Create(user *m.User, w http.ResponseWriter, r *http.Request)
- func (h RecipeHandlers) CreateIngredientLink(w http.ResponseWriter, r *http.Request, recipeID string)
- func (h RecipeHandlers) CreateInstruction(w http.ResponseWriter, r *http.Request, recipeID string)
- func (h RecipeHandlers) Delete(w http.ResponseWriter, r *http.Request, recipeID string)
- func (h RecipeHandlers) DeleteIngredientLink(w http.ResponseWriter, r *http.Request, recipeID string)
- func (h RecipeHandlers) DeleteInstruction(w http.ResponseWriter, r *http.Request, recipeID string)
- func (h RecipeHandlers) Get(w http.ResponseWriter, r *http.Request, recipeID string)
- func (h RecipeHandlers) GetAll(w http.ResponseWriter, r *http.Request)
- func (h RecipeHandlers) GetIngredientLink(w http.ResponseWriter, r *http.Request, recipeID string)
- func (h RecipeHandlers) GetInstruction(w http.ResponseWriter, r *http.Request, recipeID string)
- func (h RecipeHandlers) ImageUpload(w http.ResponseWriter, r *http.Request, recipeID string)
- func (h RecipeHandlers) Update(w http.ResponseWriter, r *http.Request, recipeID string)
- func (h RecipeHandlers) UpdateIngredientLink(w http.ResponseWriter, r *http.Request, recipeID string)
- func (h RecipeHandlers) UpdateInstruction(w http.ResponseWriter, r *http.Request, recipeID string)
- type RecipeService
- type TagHandlers
- func (h *TagHandlers) Create(w http.ResponseWriter, r *http.Request)
- func (h *TagHandlers) Delete(w http.ResponseWriter, r *http.Request, tagID string)
- func (h *TagHandlers) Get(w http.ResponseWriter, r *http.Request, tagID string)
- func (h *TagHandlers) GetAll(w http.ResponseWriter, r *http.Request)
- func (h *TagHandlers) Update(w http.ResponseWriter, r *http.Request, tagID string)
- type TagService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryHandlers ¶
type CategoryHandlers struct {
// contains filtered or unexported fields
}
func NewCategoryHandlers ¶
func NewCategoryHandlers(categorys CategoryService, logger LoggerInterface) *CategoryHandlers
func (*CategoryHandlers) Create ¶
func (h *CategoryHandlers) Create(w http.ResponseWriter, r *http.Request)
func (*CategoryHandlers) Delete ¶
func (h *CategoryHandlers) Delete(w http.ResponseWriter, r *http.Request, categoryID string)
func (*CategoryHandlers) Get ¶
func (h *CategoryHandlers) Get(w http.ResponseWriter, r *http.Request, categoryID string)
func (*CategoryHandlers) GetAll ¶
func (h *CategoryHandlers) GetAll(w http.ResponseWriter, r *http.Request)
func (*CategoryHandlers) Update ¶
func (h *CategoryHandlers) Update(w http.ResponseWriter, r *http.Request, categoryID string)
type CategoryService ¶
type HanderUtils ¶
type HanderUtils struct {
// contains filtered or unexported fields
}
func NewHanderUtils ¶
func NewHanderUtils(logger LoggerInterface) *HanderUtils
type ImageService ¶
type IngredientHandlers ¶
type IngredientHandlers struct {
// contains filtered or unexported fields
}
func NewIngredientHandlers ¶
func NewIngredientHandlers(ingredients IngredientService, logger LoggerInterface) *IngredientHandlers
func (IngredientHandlers) Create ¶
func (h IngredientHandlers) Create(w http.ResponseWriter, r *http.Request)
Create an ingredient
func (IngredientHandlers) Delete ¶
func (h IngredientHandlers) Delete(w http.ResponseWriter, r *http.Request, ingredientID string)
Delete an ingredient
func (IngredientHandlers) GetAll ¶
func (h IngredientHandlers) GetAll(w http.ResponseWriter, r *http.Request)
Get all ingredients
func (IngredientHandlers) GetSingle ¶
func (h IngredientHandlers) GetSingle(w http.ResponseWriter, r *http.Request, ingredientID string)
Get a single ingredient
func (IngredientHandlers) GetUnits ¶
func (h IngredientHandlers) GetUnits(w http.ResponseWriter, r *http.Request)
Get all units
func (IngredientHandlers) Update ¶
func (h IngredientHandlers) Update(w http.ResponseWriter, r *http.Request, ingredientID string)
type IngredientService ¶
type IngredientService interface { FindAll() ([]m.Ingredient, error) FindUnits() ([]m.Unit, error) FindSingle(ingredientID uint) (m.Ingredient, error) Create(ingredient m.Ingredient) (m.Ingredient, error) Update(ingredient m.Ingredient, ingredientID uint) (m.Ingredient, error) Delete(ingredientID uint) error }
type LoggerInterface ¶
type RecipeHandlers ¶
type RecipeHandlers struct {
// contains filtered or unexported fields
}
func NewRecipeHandlers ¶
func NewRecipeHandlers(recipes RecipeService, imageService ImageService, logger LoggerInterface) *RecipeHandlers
func (RecipeHandlers) Create ¶
func (h RecipeHandlers) Create(user *m.User, w http.ResponseWriter, r *http.Request)
func (RecipeHandlers) CreateIngredientLink ¶
func (h RecipeHandlers) CreateIngredientLink(w http.ResponseWriter, r *http.Request, recipeID string)
func (RecipeHandlers) CreateInstruction ¶
func (h RecipeHandlers) CreateInstruction(w http.ResponseWriter, r *http.Request, recipeID string)
func (RecipeHandlers) Delete ¶
func (h RecipeHandlers) Delete(w http.ResponseWriter, r *http.Request, recipeID string)
func (RecipeHandlers) DeleteIngredientLink ¶
func (h RecipeHandlers) DeleteIngredientLink(w http.ResponseWriter, r *http.Request, recipeID string)
func (RecipeHandlers) DeleteInstruction ¶
func (h RecipeHandlers) DeleteInstruction(w http.ResponseWriter, r *http.Request, recipeID string)
func (RecipeHandlers) Get ¶
func (h RecipeHandlers) Get(w http.ResponseWriter, r *http.Request, recipeID string)
func (RecipeHandlers) GetAll ¶
func (h RecipeHandlers) GetAll(w http.ResponseWriter, r *http.Request)
func (RecipeHandlers) GetIngredientLink ¶
func (h RecipeHandlers) GetIngredientLink(w http.ResponseWriter, r *http.Request, recipeID string)
func (RecipeHandlers) GetInstruction ¶
func (h RecipeHandlers) GetInstruction(w http.ResponseWriter, r *http.Request, recipeID string)
func (RecipeHandlers) ImageUpload ¶
func (h RecipeHandlers) ImageUpload(w http.ResponseWriter, r *http.Request, recipeID string)
func (RecipeHandlers) Update ¶
func (h RecipeHandlers) Update(w http.ResponseWriter, r *http.Request, recipeID string)
func (RecipeHandlers) UpdateIngredientLink ¶
func (h RecipeHandlers) UpdateIngredientLink(w http.ResponseWriter, r *http.Request, recipeID string)
func (RecipeHandlers) UpdateInstruction ¶
func (h RecipeHandlers) UpdateInstruction(w http.ResponseWriter, r *http.Request, recipeID string)
type RecipeService ¶
type RecipeService interface { FindAll() ([]m.Recipe, error) FindSingle(recipeID uint) (m.Recipe, error) Create(recipe m.Recipe) (m.Recipe, error) Update(recipe m.Recipe, recipeID uint) (m.Recipe, error) Delete(recipeID uint) error FindInstruction(recipeID uint) (m.Instruction, error) CreateInstruction(instruction m.Instruction, recipeID uint) (m.Instruction, error) UpdateInstruction(instruction m.Instruction, recipeID uint) (m.Instruction, error) DeleteInstruction(recipeID uint) error FindIngredientLink(recipeID uint) ([]m.RecipeIngredient, error) CreateIngredientLink(link []m.RecipeIngredient, recipeID uint) ([]m.RecipeIngredient, error) UpdateIngredientLink(link []m.RecipeIngredient, recipeID uint) ([]m.RecipeIngredient, error) DeleteIngredientLink(link []m.RecipeIngredient, recipeID uint) error }
type TagHandlers ¶
type TagHandlers struct {
// contains filtered or unexported fields
}
func NewTagHandlers ¶
func NewTagHandlers(tags TagService, logger LoggerInterface) *TagHandlers
func (*TagHandlers) Create ¶
func (h *TagHandlers) Create(w http.ResponseWriter, r *http.Request)
func (*TagHandlers) Delete ¶
func (h *TagHandlers) Delete(w http.ResponseWriter, r *http.Request, tagID string)
func (*TagHandlers) Get ¶
func (h *TagHandlers) Get(w http.ResponseWriter, r *http.Request, tagID string)
func (*TagHandlers) GetAll ¶
func (h *TagHandlers) GetAll(w http.ResponseWriter, r *http.Request)
func (*TagHandlers) Update ¶
func (h *TagHandlers) Update(w http.ResponseWriter, r *http.Request, tagID string)
Click to show internal directories.
Click to hide internal directories.