Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddPrefix ¶
type AddPrefix struct {
Prefix string `cfg:"prefix"`
}
func (*AddPrefix) Middleware ¶
func (a *AddPrefix) Middleware() echo.MiddlewareFunc
type Auth ¶
type Auth struct { Provider auth.Provider `cfg:"provider"` SkipSuffixes []string `cfg:"skip_suffixes"` Redirect *authecho.RedirectSetting `cfg:"redirect"` ClaimsHeader *authecho.ClaimsHeader `cfg:"claims_header"` }
type BasicAuth ¶
type BasicAuth struct { Users []string `cfg:"users"` Realm string `cfg:"realm"` // HeaderField is the name of the header field to set with the username HeaderField string `cfg:"header_field"` // RemoveHeader removes the Authorization header from the request RemoveHeader bool `cfg:"remove_header"` }
func (*BasicAuth) Middleware ¶
type Block ¶
type Block struct {
Methods []string `cfg:"methods"`
}
func (*Block) Middleware ¶
func (b *Block) Middleware() echo.MiddlewareFunc
type Cors ¶
type Cors struct { AllowOrigins []string `cfg:"allow_origins"` AllowHeaders []string `cfg:"allow_headers"` AllowCredentials bool `cfg:"allow_credentials"` UnsafeWildcardOriginWithAllowCredentials bool `cfg:"unsafe_wildcard_origin_with_allow_credentials"` ExposeHeaders []string `cfg:"expose_headers"` MaxAge int `cfg:"max_age"` }
func (*Cors) Middleware ¶
func (c *Cors) Middleware() echo.MiddlewareFunc
type Folder ¶
type Folder struct { // Path is the path to the folder Path string `cfg:"path"` // Index is automatically redirect to index.html Index bool `cfg:"index"` // StripIndexName is strip index name from url StripIndexName bool `cfg:"strip_index_name"` // IndexName is the name of the index file, default is index.html IndexName string `cfg:"index_name"` // SPA is automatically redirect to index.html SPA bool `cfg:"spa"` // SPAIndex is set the index.html location, default is IndexName SPAIndex string `cfg:"spa_index"` // Browse is enable directory browsing Browse bool `cfg:"browse"` // UTC browse time format UTC bool `cfg:"utc"` // contains filtered or unexported fields }
func (*Folder) Middleware ¶
func (f *Folder) Middleware() echo.MiddlewareFunc
type Headers ¶
type Headers struct { CustomRequestHeaders map[string]string `cfg:"custom_request_headers"` CustomResponseHeaders map[string]string `cfg:"custom_response_headers"` }
Headers is a middleware that allows to add custom headers to the request and response.
Delete the header, set empty values.
func (*Headers) Middleware ¶
func (h *Headers) Middleware() echo.MiddlewareFunc
type Hello ¶
type Hello struct { // Message to return, default is "OK" Message string `cfg:"message"` // Status code to return, default is 200 StatusCode int `cfg:"status_code"` Headers map[string]string `cfg:"headers"` // Type of return (json, json-pretty, html, string), default is string Type string `cfg:"type"` }
func (*Hello) Middleware ¶
func (h *Hello) Middleware() echo.MiddlewareFunc
type Info ¶
type Info struct { // Cookie to show. Cookie string `cfg:"cookie"` // Base64 decode when reading cookie. Base64 bool `cfg:"base64"` }
func (*Info) Middleware ¶
func (s *Info) Middleware() echo.MiddlewareFunc
type LoadBalancer ¶
type LoadBalancer struct {
Servers []Server `cfg:"servers"`
}
type Role ¶
func (*Role) Middleware ¶
func (m *Role) Middleware() echo.MiddlewareFunc
type Scope ¶
func (*Scope) Middleware ¶
func (m *Scope) Middleware() echo.MiddlewareFunc
type Service ¶
type Service struct {
LoadBalancer LoadBalancer `cfg:"loadbalancer"`
}
func (*Service) Middleware ¶
type Set ¶
type Set struct {
Values []string `cfg:"values"`
}
Set to set flag.
Usable for other middlewares.
func (*Set) Middleware ¶
func (s *Set) Middleware() echo.MiddlewareFunc
type StripPrefix ¶
type StripPrefix struct { // ForceSlash default is true ForceSlash *bool `cfg:"force_slash"` Prefixes []string `cfg:"prefixes"` Prefix string `cfg:"prefix"` }
func (*StripPrefix) Middleware ¶
func (a *StripPrefix) Middleware() echo.MiddlewareFunc
Click to show internal directories.
Click to hide internal directories.