Documentation ¶
Index ¶
- Variables
- type ContentController
- type Controller
- func (c Controller) Context(r *http.Request) (context.Context, context.CancelFunc)
- func (c Controller) Err(rw http.ResponseWriter, r *http.Request, sc int, err error)
- func (c *Controller) HTML(rw http.ResponseWriter, r *http.Request, tmpl *template.Template, ...)
- func (c Controller) ServeHTTP(rw http.ResponseWriter, r *http.Request)
- type ListController
- type SearchController
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ContentNotFoundErr = services.NewContentFake("404 Not Found", "Return to <a href='/'>homepage</a>.") ContentInternalServerErr = services.NewContentFake("500 Internal Server Error", "Return to <a href='/'>homepage</a>.") )
Functions ¶
This section is empty.
Types ¶
type ContentController ¶
type ContentController struct { Controller // contains filtered or unexported fields }
func NewContentController ¶
func NewContentController(c Controller, defaultSlug string, pageCategory, postCategory uint) (ContentController, error)
func (ContentController) ServeHTTP ¶
func (cc ContentController) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(logger *log.Logger, data services.DataService, v views.View) Controller
func (Controller) Context ¶
func (c Controller) Context(r *http.Request) (context.Context, context.CancelFunc)
func (Controller) Err ¶
func (c Controller) Err(rw http.ResponseWriter, r *http.Request, sc int, err error)
func (*Controller) HTML ¶
func (c *Controller) HTML(rw http.ResponseWriter, r *http.Request, tmpl *template.Template, data interface{})
func (Controller) ServeHTTP ¶
func (c Controller) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type ListController ¶
type ListController struct { Controller // contains filtered or unexported fields }
func NewListController ¶
func NewListController(c Controller, parentCategory uint, ns string) (ListController, error)
func (ListController) ServeHTTP ¶
func (lc ListController) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type SearchController ¶
type SearchController struct { Controller // contains filtered or unexported fields }
func NewSearchController ¶
func NewSearchController(c Controller, pageCategory, postCategory uint) (SearchController, error)
func (SearchController) ServeHTTP ¶
func (c SearchController) ServeHTTP(rw http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.