Documentation ¶
Index ¶
- func Handler(files map[string]*Content, redirects map[string]string, next http.Handler) http.Handler
- type Blob
- type Collection
- func (c *Collection) Add(b *Collection)
- func (c *Collection) Extend(b *Collection)
- func (c Collection) FuncMap(hashify bool, prefix string) map[string]interface{}
- func (c *Collection) Handler(hashify bool, next http.Handler) http.Handler
- func (c *Collection) Middleware(hashify bool) func(http.Handler) http.Handler
- func (c Collection) View(hashify bool) (v *View)
- type Content
- type Entry
- type PageInfo
- type PageRedirect
- type View
- func (v View) Match(rctx *chi.Context, method, path string) bool
- func (v View) Middlewares() (m chi.Middlewares)
- func (v View) PageInfo(r *http.Request) (interface{}, bool)
- func (v View) Routes() []chi.Route
- func (v View) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (v View) TryServeHTTP(w http.ResponseWriter, r *http.Request) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collection ¶
type Collection struct { Files map[string]*Content Hashified map[string]*Content Redirects map[string]string }
func NewCollection ¶
func NewCollection(entries ...Entry) *Collection
func (*Collection) Add ¶ added in v0.22.0
func (c *Collection) Add(b *Collection)
Add() adds elements from one collection, replacing those using the same key
func (*Collection) Extend ¶ added in v0.22.0
func (c *Collection) Extend(b *Collection)
Extend() adds elements from one collection that aren't present already
func (Collection) FuncMap ¶
func (c Collection) FuncMap(hashify bool, prefix string) map[string]interface{}
func (*Collection) Middleware ¶
func (Collection) View ¶ added in v0.15.0
func (c Collection) View(hashify bool) (v *View)
type PageRedirect ¶ added in v0.19.0
type PageRedirect struct {
// contains filtered or unexported fields
}
func (PageRedirect) Canonical ¶ added in v0.19.0
func (p PageRedirect) Canonical() string
func (PageRedirect) Error ¶ added in v0.19.0
func (p PageRedirect) Error() error
func (PageRedirect) Handler ¶ added in v0.19.0
func (p PageRedirect) Handler() http.Handler
func (PageRedirect) Location ¶ added in v0.19.0
func (p PageRedirect) Location() string
type View ¶ added in v0.15.0
type View struct {
// contains filtered or unexported fields
}
func (View) Middlewares ¶ added in v0.15.0
func (v View) Middlewares() (m chi.Middlewares)
func (View) ServeHTTP ¶ added in v0.15.0
func (v View) ServeHTTP(w http.ResponseWriter, r *http.Request)
http.Handler
func (View) TryServeHTTP ¶ added in v0.19.0
web.Handler
Click to show internal directories.
Click to hide internal directories.