Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewMiddlewares = map[string]NewMiddleware{}
NewMiddlewares contains all the registered new middleware functions.
View Source
var Services = map[string]NewService{}
Services is a map of service name and its new function.
Functions ¶
func Register ¶
func Register(name string, newFunc NewService)
Register registers a new HTTP services with name and new function.
func RegisterMiddleware ¶
func RegisterMiddleware(name string, n NewMiddleware)
RegisterMiddleware registers a new HTTP middleware and its new function.
Types ¶
type Middleware ¶
Middleware is a middleware http handler.
type NewMiddleware ¶
type NewMiddleware func(conf map[string]interface{}) (Middleware, int, error)
NewMiddleware is the function that HTTP middlewares need to register at init time.
type NewService ¶
NewService is the function that HTTP services need to register at init time.
type Service ¶
type Service interface { Handler() http.Handler Prefix() string Close() error // List of url relative to the prefix to be unprotected by the authentication // middleware. To be seen if we need url-verb fine grained skip checks like // GET is public and POST is not. Unprotected() []string }
Service represents a HTTP service.
Click to show internal directories.
Click to hide internal directories.