Versions in this module Expand all Collapse all v0 v0.2.0 Dec 25, 2015 v0.1.0 Dec 14, 2015 Changes in this version + func PassthroughBuilder(handler http.Handler) http.Handler + func Serve(spec *spec.Document, api *untyped.API) http.Handler + func ServeWithBuilder(spec *spec.Document, api *untyped.API, builder Builder) http.Handler + func Spec(basePath string, swsp *spec.Swagger, next http.Handler) http.Handler + type Builder func(http.Handler) http.Handler + type Context struct + func NewContext(spec *spec.Document, api *untyped.API, routes Router) *Context + func NewRoutableContext(spec *spec.Document, routableAPI RoutableAPI, routes Router) *Context + func (c *Context) APIHandler(builder Builder) http.Handler + func (c *Context) AllowedMethods(request *http.Request) []string + func (c *Context) Authorize(request *http.Request, route *MatchedRoute) (interface{}, error) + func (c *Context) BasePath() string + func (c *Context) BindAndValidate(request *http.Request, matched *MatchedRoute) (interface{}, error) + func (c *Context) BindValidRequest(request *http.Request, route *MatchedRoute, binder RequestBinder) error + func (c *Context) ContentType(request *http.Request) (string, string, *errors.ParseError) + func (c *Context) LookupRoute(request *http.Request) (*MatchedRoute, bool) + func (c *Context) NotFound(rw http.ResponseWriter, r *http.Request) + func (c *Context) RequiredProduces() []string + func (c *Context) Respond(rw http.ResponseWriter, r *http.Request, produces []string, ...) + func (c *Context) ResponseFormat(r *http.Request, offers []string) string + func (c *Context) RouteInfo(request *http.Request) (*MatchedRoute, bool) + type MatchedRoute struct + Consumer httpkit.Consumer + Params RouteParams + Producer httpkit.Producer + type RequestBinder interface + BindRequest func(*http.Request, *MatchedRoute) error + type Responder interface + WriteResponse func(http.ResponseWriter, httpkit.Producer) + func NotImplemented(message string) Responder + type RoutableAPI interface + AuthenticatorsFor func(map[string]spec.SecurityScheme) map[string]httpkit.Authenticator + ConsumersFor func([]string) map[string]httpkit.Consumer + DefaultConsumes func() string + DefaultProduces func() string + Formats func() strfmt.Registry + HandlerFor func(string) (http.Handler, bool) + ProducersFor func([]string) map[string]httpkit.Producer + ServeErrorFor func(string) func(http.ResponseWriter, *http.Request, error) + type RouteParam struct + Name string + Value string + type RouteParams []RouteParam + func (r RouteParams) Get(name string) string + func (r RouteParams) GetOK(name string) ([]string, bool, bool) + type Router interface + Lookup func(method, path string) (*MatchedRoute, bool) + OtherMethods func(method, path string) []string + func DefaultRouter(spec *spec.Document, api RoutableAPI) Router