Documentation ¶
Index ¶
- func IsImageExtension(ext string) bool
- func NewDynamicHandler(o *DynamicConfig) http.Handler
- func NewExpirationHandler(h httprouter.Handle) httprouter.Handle
- func NewFailsafeHandler(h http.Handler) http.Handler
- func NewGZipDynamicHandler(h http.Handler) http.Handler
- func NewGZipHandler(h httprouter.Handle, o *GZipConfig) httprouter.Handle
- func NewImageResizeHandler(h httprouter.Handle, o *ResizeConfig) httprouter.Handle
- func NewLanguageHandler(h http.Handler, o *LanguageConfig) http.Handler
- func NewMissingExtHandler(h httprouter.Handle) httprouter.Handle
- func NewRetinaHandler(h httprouter.Handle, o *RetinaConfig) httprouter.Handle
- func NewStaticHandler(o *StaticConfig) httprouter.Handle
- func NewWebPHandler(h httprouter.Handle, c *WebPConfig) httprouter.Handle
- type DynamicConfig
- type FailsafeHandler
- type GZipConfig
- type GZipDynamicHandler
- type LanguageConfig
- type LanguageHandler
- type MissingExtHandler
- type ResizeConfig
- type RetinaConfig
- type RetinaHandler
- type StaticConfig
- type WebPConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsImageExtension ¶
func NewDynamicHandler ¶
func NewDynamicHandler(o *DynamicConfig) http.Handler
func NewExpirationHandler ¶
func NewExpirationHandler(h httprouter.Handle) httprouter.Handle
NewMissingExtHandler creates a new handler that uses the default webp-extension for files without one
func NewGZipHandler ¶
func NewGZipHandler(h httprouter.Handle, o *GZipConfig) httprouter.Handle
func NewImageResizeHandler ¶
func NewImageResizeHandler(h httprouter.Handle, o *ResizeConfig) httprouter.Handle
func NewLanguageHandler ¶
func NewLanguageHandler(h http.Handler, o *LanguageConfig) http.Handler
NewLanguageHandler creates a new handler that handles internationalization with the given configuration
func NewMissingExtHandler ¶
func NewMissingExtHandler(h httprouter.Handle) httprouter.Handle
NewMissingExtHandler creates a new handler that uses the default webp-extension for files without one
func NewRetinaHandler ¶
func NewRetinaHandler(h httprouter.Handle, o *RetinaConfig) httprouter.Handle
NewRetinaHandler creates a new handler that handles internationalization with the given configuration
func NewStaticHandler ¶
func NewStaticHandler(o *StaticConfig) httprouter.Handle
func NewWebPHandler ¶
func NewWebPHandler(h httprouter.Handle, c *WebPConfig) httprouter.Handle
Types ¶
type DynamicConfig ¶
type DynamicConfig struct { Locales *map[string]int Language *map[int]map[string]string URLs *map[int]map[int]string DefaultLocale string ContextNameLocale string ProjectView string Mux http.Handler GetUser func(r *http.Request) authentication.User CookieStore *sessions.CookieStore LoginUrl string ErrorTemplate string ForbiddenURL string Failsafe bool }
type FailsafeHandler ¶
type FailsafeHandler struct {
// contains filtered or unexported fields
}
func (*FailsafeHandler) ServeHTTP ¶
func (f *FailsafeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GZipConfig ¶
type GZipDynamicHandler ¶
type GZipDynamicHandler struct {
// contains filtered or unexported fields
}
func (*GZipDynamicHandler) ServeHTTP ¶
func (h *GZipDynamicHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type LanguageConfig ¶
type LanguageHandler ¶
type LanguageHandler struct {
// contains filtered or unexported fields
}
func (*LanguageHandler) ServeHTTP ¶
func (h *LanguageHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type MissingExtHandler ¶
type MissingExtHandler struct {
// contains filtered or unexported fields
}
type ResizeConfig ¶
type RetinaConfig ¶
type RetinaConfig struct {
ContextName string
}
type RetinaHandler ¶
type RetinaHandler struct {
// contains filtered or unexported fields
}
type StaticConfig ¶
type WebPConfig ¶
Click to show internal directories.
Click to hide internal directories.