Versions in this module Expand all Collapse all v0 v0.3.0 Jul 19, 2018 Changes in this version + type Authorizer struct + func NewAuthorizer(clientFactory ClientFactory, sessionHandler SessionHandler) *Authorizer + func (ar Authorizer) Wrap(inner http.Handler) http.Handler + type Client interface + Close func() error + Do func(req *Request) (resp *ResponsePipe, err error) + type ClientFactory func() (Client, error) + func SimpleClientFactory(connFactory ConnFactory, limit uint32) ClientFactory + type ClientFunc func(req *Request) (resp *ResponsePipe, err error) + func (c ClientFunc) Close() error + func (c ClientFunc) Do(req *Request) (resp *ResponsePipe, err error) + type ClientPool struct + func NewClientPool(clientFactory ClientFactory, scale uint, expires time.Duration) *ClientPool + func (p *ClientPool) CreateClient() (c Client, err error) + type ConnFactory func() (net.Conn, error) + func SimpleConnFactory(network, address string) ConnFactory + type FileSystemRouter struct + DirIndex []string + DocRoot string + Exts []string + func (fs *FileSystemRouter) Router() Middleware + type Handler interface + SetLogger func(logger *log.Logger) + func NewHandler(sessionHandler SessionHandler, clientFactory ClientFactory) Handler + type Middleware func(SessionHandler) SessionHandler + func Chain(middlewares ...Middleware) Middleware + func MapEndpoint(endpointFile string) Middleware + func MapFilterRequest(fs http.FileSystem) Middleware + func NewAuthPrepare() Middleware + func NewFileEndpoint(endpointFile string) Middleware + func NewFilterFS(fs http.FileSystem) Middleware + func NewFilterLocalFS(root string) Middleware + func NewPHPFS(root string) Middleware + type PoolClient struct + Err error + func (pc *PoolClient) Close() error + func (pc *PoolClient) Expired() bool + type Request struct + Data io.ReadCloser + KeepConn bool + Params map[string]string + Raw *http.Request + Role Role + Stdin io.ReadCloser + func NewAuthRequest(orgl *http.Request) (r *http.Request, req *Request, err error) + func NewRequest(r *http.Request) (req *Request) + type ResponsePipe struct + func BasicSession(client Client, req *Request) (*ResponsePipe, error) + func NewResponsePipe() (p *ResponsePipe) + func (pipes *ResponsePipe) Close() + func (pipes *ResponsePipe) WriteTo(rw http.ResponseWriter, ew io.Writer) (err error) + type Role uint16 + const RoleAuthorizer + const RoleFilter + const RoleResponder + type SessionHandler func(client Client, req *Request) (resp *ResponsePipe, err error) + func BasicParamsMap(inner SessionHandler) SessionHandler + func FilterAuthReqParams(inner SessionHandler) SessionHandler + func MapHeader(inner SessionHandler) SessionHandler + func MapRemoteHost(inner SessionHandler) SessionHandler