Documentation ¶
Index ¶
- Constants
- type AboutInstance
- type CatalogInstance
- type CommonInstance
- type Constants
- type EquipmentInstance
- type Handler
- func (h *Handler) About() live.Handler
- func (h *Handler) Catalog() live.Handler
- func (h *Handler) Equipment() live.Handler
- func (h *Handler) HandleError(ctx context.Context, err error)
- func (h *Handler) Home() live.Handler
- func (h *Handler) Ingredient() live.Handler
- func (h *Handler) NewAboutInstance(s live.Socket) *AboutInstance
- func (h *Handler) NewCatalogInstance(s live.Socket) *CatalogInstance
- func (h *Handler) NewCommon(s live.Socket, currentView string) *CommonInstance
- func (h *Handler) NewConstants() *Constants
- func (h *Handler) NewEquipmentInstance(s live.Socket) *EquipmentInstance
- func (h *Handler) NewHomeInstance(s live.Socket) *HomeInstance
- func (h *Handler) NewIngredientInstance(s live.Socket) *IngredientInstance
- func (h *Handler) NewNotFoundInstance(s live.Socket) *NotFoundInstance
- func (h *Handler) NewPrivacyInstance(s live.Socket) *PrivacyInstance
- func (h *Handler) NewRecipeInstance(s live.Socket) *RecipeInstance
- func (h *Handler) NewTagInstance(s live.Socket) *TagInstance
- func (h *Handler) NewTermsInstance(s live.Socket) *TermsInstance
- func (h *Handler) NotFound() live.Handler
- func (h *Handler) NotFoundRedirect(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Privacy() live.Handler
- func (h *Handler) Recipe() live.Handler
- func (h *Handler) RobotsHandler() http.HandlerFunc
- func (h *Handler) SitemapHandler() http.HandlerFunc
- func (h *Handler) Tag() live.Handler
- func (h *Handler) Terms() live.Handler
- type HomeInstance
- type IngredientInstance
- type NotFoundInstance
- type Pagination
- type PrivacyInstance
- type RecipeInstance
- type Sitemap
- type SitemapURL
- type TagInstance
- type TermsInstance
Constants ¶
View Source
const ( DefaultDisplayTime = time.RFC822 // exported params ParamRecipeSlug = "recipeSlug" ParamTagSlug = "tagSlug" ParamIngredientSlug = "ingredientSlug" ParamEquipmentSlug = "equipmentSlug" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AboutInstance ¶
type AboutInstance struct {
*CommonInstance
}
type CatalogInstance ¶
type CatalogInstance struct { *CommonInstance Tags []*recipe.Tag Ingredients []*recipe.Ingredient Equipment []*recipe.Equipment }
type CommonInstance ¶
type CommonInstance struct { Env string Domain string Session string Error error Message *string CurrentView string Version string GoogleAnalyticsID string CommentsID string UI *locale.UITranslation // contains filtered or unexported fields }
func (*CommonInstance) CloseError ¶
func (c *CommonInstance) CloseError()
func (*CommonInstance) CloseMessage ¶
func (c *CommonInstance) CloseMessage()
func (*CommonInstance) Locale ¶
func (c *CommonInstance) Locale() string
func (*CommonInstance) SetLocale ¶
func (c *CommonInstance) SetLocale(l string)
type EquipmentInstance ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) Ingredient ¶
func (*Handler) NewAboutInstance ¶
func (h *Handler) NewAboutInstance(s live.Socket) *AboutInstance
func (*Handler) NewCatalogInstance ¶
func (h *Handler) NewCatalogInstance(s live.Socket) *CatalogInstance
func (*Handler) NewCommon ¶
func (h *Handler) NewCommon(s live.Socket, currentView string) *CommonInstance
func (*Handler) NewConstants ¶
func (*Handler) NewEquipmentInstance ¶
func (h *Handler) NewEquipmentInstance(s live.Socket) *EquipmentInstance
func (*Handler) NewHomeInstance ¶
func (h *Handler) NewHomeInstance(s live.Socket) *HomeInstance
func (*Handler) NewIngredientInstance ¶
func (h *Handler) NewIngredientInstance(s live.Socket) *IngredientInstance
func (*Handler) NewNotFoundInstance ¶
func (h *Handler) NewNotFoundInstance(s live.Socket) *NotFoundInstance
func (*Handler) NewPrivacyInstance ¶
func (h *Handler) NewPrivacyInstance(s live.Socket) *PrivacyInstance
func (*Handler) NewRecipeInstance ¶
func (h *Handler) NewRecipeInstance(s live.Socket) *RecipeInstance
func (*Handler) NewTagInstance ¶
func (h *Handler) NewTagInstance(s live.Socket) *TagInstance
func (*Handler) NewTermsInstance ¶
func (h *Handler) NewTermsInstance(s live.Socket) *TermsInstance
func (*Handler) NotFoundRedirect ¶
func (h *Handler) NotFoundRedirect(w http.ResponseWriter, r *http.Request)
func (*Handler) RobotsHandler ¶
func (h *Handler) RobotsHandler() http.HandlerFunc
func (*Handler) SitemapHandler ¶
func (h *Handler) SitemapHandler() http.HandlerFunc
type HomeInstance ¶
type HomeInstance struct { *CommonInstance Recipes []*recipe.Recipe RecipesCount int Tags []*recipe.Tag TagGroups []string SelectedGroup string FilteredTags []*recipe.Tag Ingredients []*recipe.Ingredient Equipment []*recipe.Equipment Filter recipe.Filter NewFirst bool Pagination Pagination }
func (*HomeInstance) WithUpdateRecipes ¶
func (ins *HomeInstance) WithUpdateRecipes( ctx context.Context, h *Handler, s live.Socket, resetOffset bool, ) (*HomeInstance, error)
type IngredientInstance ¶
type IngredientInstance struct { *CommonInstance Ingredient *recipe.Ingredient Recipes []*recipe.Recipe RecipesCount int Type string Title string Filter recipe.Filter }
type NotFoundInstance ¶
type NotFoundInstance struct {
*CommonInstance
}
type Pagination ¶
type PrivacyInstance ¶
type PrivacyInstance struct {
*CommonInstance
}
type RecipeInstance ¶
type Sitemap ¶
type Sitemap struct { XMLName xml.Name `xml:"urlset"` XmlNS string `xml:"xmlns,attr"` URLs []SitemapURL `xml:"url"` }
type SitemapURL ¶
type TagInstance ¶
type TermsInstance ¶
type TermsInstance struct {
*CommonInstance
}
Click to show internal directories.
Click to hide internal directories.