Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EndpointsHandler ¶
func EndpointsHandler(endpoints map[string]*Endpoint) httprouter.Handle
Types ¶
type Endpoint ¶
type Endpoint struct { Method string MimeType string Middlewares []Middleware Handle httprouter.Handle Path string }
Endpoint is the http server endpoint based on the given mime type and path.
type EndpointInitializer ¶
type EndpointInitializer func(c *controller.Controller, db orm.DB) *Endpoint
type Middleware ¶
type Middleware func(httprouter.Handle) httprouter.Handle
type QualityValue ¶
QualityValue is the structure that contains quality - value pair.
func ParseAcceptEncodingHeader ¶
func ParseAcceptEncodingHeader(header http.Header) []QualityValue
ParseAcceptEncodingHeader parses 'Accept-Encoding' header values sorted by it's quality.
func ParseAcceptHeader ¶
func ParseAcceptHeader(header http.Header) []QualityValue
ParseAcceptHeader parses 'Accept' header values sorted by it's quality.
type Server ¶
type Server struct { // Endpoints provides the mapping between the path - mime type and given endpoint handler // map[path]map[method]map[mime] Endpoints map[string]map[string]map[string]*Endpoint EndpointInitializers []EndpointInitializer Options server.Options // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.