Documentation ¶
Index ¶
- Variables
- func HybridPage(cfg HybridPageConfig) echo.MiddlewareFunc
- func PageSelector(cfg PageSelectorConfig) echo.MiddlewareFunc
- func SessionMiddleware(cfg SessionConfig) echo.MiddlewareFunc
- func SiteSelector(cfg SiteSelectorConfig) echo.MiddlewareFunc
- type HybridPageConfig
- type PageSelectorConfig
- type Response
- func (r *Response) Header() http.Header
- func (r *Response) Hijack() (net.Conn, *bufio.ReadWriter, error)
- func (r *Response) Pusher() http.Pusher
- func (r *Response) Reset(w http.ResponseWriter, b *bytes.Buffer)
- func (r *Response) StatusCode() int
- func (r *Response) Unwrap() http.ResponseWriter
- func (r *Response) Write(b []byte) (n int, err error)
- func (r *Response) WriteHeader(status int)
- type SessionConfig
- type SiteSelectorConfig
Constants ¶
This section is empty.
Variables ¶
var ErrHeaderAlreadyCommitted = errors.New("response already committed")
Functions ¶
func HybridPage ¶
func HybridPage(cfg HybridPageConfig) echo.MiddlewareFunc
func PageSelector ¶
func PageSelector(cfg PageSelectorConfig) echo.MiddlewareFunc
func SessionMiddleware ¶ added in v0.0.9
func SessionMiddleware(cfg SessionConfig) echo.MiddlewareFunc
func SiteSelector ¶
func SiteSelector(cfg SiteSelectorConfig) echo.MiddlewareFunc
Types ¶
type HybridPageConfig ¶
type HybridPageConfig struct { Skipper middleware.Skipper PageHandler cms.PageHandler CfgRepository repository.Configuration }
type PageSelectorConfig ¶
type PageSelectorConfig struct { Skipper middleware.Skipper PageHandler cms.PageHandler CfgRepository repository.Configuration PageRepository repository.Page }
type Response ¶
type Response struct { Writer http.ResponseWriter Buffer *bytes.Buffer Status int Size int64 Committed bool }
func (*Response) Header ¶
Header returns the header map for the writer that will be sent by WriteHeader. Changing the header after a call to WriteHeader (or Write) has no effect unless the modified headers were declared as trailers by setting the "Trailer" header before the call to WriteHeader (see example) To suppress implicit response headers, set their value to nil. Example: https://golang.org/pkg/net/http/#example_ResponseWriter_trailers
func (*Response) Hijack ¶
Hijack implements the http.Hijacker interface to allow an HTTP handler to take over the connection. See http.Hijacker(https://golang.org/pkg/net/http/#Hijacker)
func (*Response) Pusher ¶
Pusher implements the http.Pusher interface to allow an HTTP handler to constructs a synthetic request using the given target and options. See http.Pusher(https://golang.org/pkg/net/http/#Pusher)
func (*Response) StatusCode ¶
func (*Response) Unwrap ¶
func (r *Response) Unwrap() http.ResponseWriter
Unwrap returns the original http.ResponseWriter. ResponseController can be used to access the original http.ResponseWriter. See [https://go.dev/blog/go1.20]
func (*Response) WriteHeader ¶
type SessionConfig ¶ added in v0.0.9
type SessionConfig struct { Skipper middleware.Skipper `json:"-" yaml:"-"` Manager *scs.SessionManager `json:"-" yaml:"-"` CleanupInterval time.Duration `json:"cleanupInterval,omitempty" yaml:"cleanupInterval,omitempty"` IdleTimeout time.Duration `json:"idleTimeout,omitempty" yaml:"idleTimeout,omitempty"` Lifetime time.Duration `json:"lifetime,omitempty" yaml:"lifetime,omitempty"` Cookie struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Domain string `json:"domain,omitempty" yaml:"domain,omitempty"` Path string `json:"path,omitempty" yaml:"path,omitempty"` Persist bool `json:"persist,omitempty" yaml:"persist,omitempty"` Secure bool `json:"secure,omitempty" yaml:"secure,omitempty"` HTTPOnly bool `json:"httpOnly,omitempty" yaml:"httpOnly,omitempty"` SameSite echox.SameSiteType `json:"sameSite,omitempty" yaml:"sameSite,omitempty"` } `json:"cookie,omitempty" yaml:"cookie,omitempty"` }
func (*SessionConfig) SetDefaults ¶ added in v0.0.9
func (cfg *SessionConfig) SetDefaults()
type SiteSelectorConfig ¶
type SiteSelectorConfig struct { Skipper middleware.Skipper SiteSelector cms.SiteSelector CfgRepository repository.Configuration }