Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Creator ¶
type Creator func(*controller.Controller, *config.Router, ...*httprouter.Router) Handler
Creator is the function used to create new router instance.
type Handler ¶
type Handler interface {
// SetRoutes sets the routes for all the models stored in the handler's controller.
SetRoutes() error
// SetModelRoutes sets the routes for a single model within a handler.
// The 'model' might be a struct instance or the neuron mapping.ModelStruct.
SetModelRoutes(model interface{}) error
// Router returns httprouter implementation.
Router() *httprouter.Router
}
Handler is the interface used as the neuron API handlers.
type QualityValue ¶
QualityValue is the structure that contains quality - value pair.
func ParseAcceptEncoding ¶
func ParseAcceptEncoding(header http.Header) []QualityValue
ParseAcceptEncoding parses 'Accept-Encoding' header values sorted by it's quality.
Click to show internal directories.
Click to hide internal directories.