Documentation ¶
Index ¶
- func BearerAuthenticate() server.Middleware
- func Controller(c *core.Controller) server.Middleware
- func LogRequest(next http.Handler) http.Handler
- func ResponseWriter(compressionLevel int) func(next http.Handler) http.Handler
- func StoreIDFromParams(idKey string) server.Middleware
- func WithCodec(c codec.Codec) server.Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BearerAuthenticate ¶
func BearerAuthenticate() server.Middleware
BearerAuthenticate gets the Authorization Header from http request, and checks if given Authorization header is valid.
func Controller ¶
func Controller(c *core.Controller) server.Middleware
Controller sets the controller in the request's middleware context.
func LogRequest ¶
LogRequest logs provided request with the response and the status. For full logs requires ResponseWriter middleware.
func ResponseWriter ¶
ResponseWriter is a middleware that wraps the response writer into httputil.ResponseWriter. If the client accepts one of the supported compressions, it would also set the compressed writer. In order to set the default compression level set it to -1.
func StoreIDFromParams ¶
func StoreIDFromParams(idKey string) server.Middleware
StoreIDFromParams stores id parameter from the httprouter params under the key: 'idKey'.
Types ¶
This section is empty.