middleware

package
v0.0.0-...-ea61863 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2014 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSecretKey = "polarissssiralop"

Variables

This section is empty.

Functions

func DecodeSignID

func DecodeSignID(src string, key []byte) (string, error)

func EncodeSignID

func EncodeSignID(id string, key []byte) (string, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL