Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultSecretKey = "polarissssiralop"
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, driver MiddlewareDriver) error
Types ¶
type Middleware ¶
type Middleware interface { ProcessRequest(env *context.Env) error ProcessResponse(env *context.Env) error }
func Open ¶
func Open(name string, configJson json.RawMessage) (Middleware, error)
type MiddlewareDriver ¶
type MiddlewareDriver interface {
Open(jsonConfig json.RawMessage) (Middleware, error)
}
type SessionConfig ¶
type SessionConfig struct { CookieName string `json:"name"` CookiePath string `json:"path"` CookieMaxAge int `json:"maxage"` CookieSecure bool `json:"secure"` CookieHttpOnly bool `json:"httponly"` SecretKey string `json:"secret_key"` StoreName string `json:"store"` StoreConfig json.RawMessage `json:"store_config"` // contains filtered or unexported fields }
type SessionMiddleware ¶
type SessionMiddleware struct {
// contains filtered or unexported fields
}
func (*SessionMiddleware) ProcessRequest ¶
func (m *SessionMiddleware) ProcessRequest(env *context.Env) error
func (*SessionMiddleware) ProcessResponse ¶
func (m *SessionMiddleware) ProcessResponse(env *context.Env) error
type SessoionMiddlewareDriver ¶
type SessoionMiddlewareDriver struct { }
func (SessoionMiddlewareDriver) Open ¶
func (d SessoionMiddlewareDriver) Open(jsonConfig json.RawMessage) (Middleware, error)
Click to show internal directories.
Click to hide internal directories.