Versions in this module Expand all Collapse all v0 v0.19.16 May 20, 2020 Changes in this version + var Debug = logger.DebugEnabled() + var Logger logger.Logger = logger.StandardLogger + func NegotiateContentEncoding(r *http.Request, offers []string) string + func NegotiateContentType(r *http.Request, offers []string, defaultOffer string) string + func NewOperationExecutor(ctx *Context) http.Handler + func NewRouter(ctx *Context, next http.Handler) http.Handler + func PassthroughBuilder(handler http.Handler) http.Handler + func Redoc(opts RedocOpts, next http.Handler) http.Handler + func SecurityPrincipalFrom(req *http.Request) interface + func SecurityScopesFrom(req *http.Request) []string + func Serve(spec *loads.Document, api *untyped.API) http.Handler + func ServeWithBuilder(spec *loads.Document, api *untyped.API, builder Builder) http.Handler + func Spec(basePath string, b []byte, next http.Handler) http.Handler + type Builder func(http.Handler) http.Handler + type Context struct + func NewContext(spec *loads.Document, api *untyped.API, routes Router) *Context + func NewRoutableContext(spec *loads.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{}, *http.Request, error) + func (c *Context) BasePath() string + func (c *Context) BindAndValidate(request *http.Request, matched *MatchedRoute) (interface{}, *http.Request, error) + func (c *Context) BindValidRequest(request *http.Request, route *MatchedRoute, binder RequestBinder) error + func (c *Context) ContentType(request *http.Request) (string, string, *http.Request, error) + 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) ResetAuth(request *http.Request) *http.Request + func (c *Context) Respond(rw http.ResponseWriter, r *http.Request, produces []string, ...) + func (c *Context) ResponseFormat(r *http.Request, offers []string) (string, *http.Request) + func (c *Context) RouteInfo(request *http.Request) (*MatchedRoute, *http.Request, bool) + func (c *Context) RoutesHandler(builder Builder) http.Handler + type MatchedRoute struct + Authenticator *RouteAuthenticator + Consumer runtime.Consumer + Params RouteParams + Producer runtime.Producer + func MatchedRouteFrom(req *http.Request) *MatchedRoute + func (m *MatchedRoute) HasAuth() bool + func (m *MatchedRoute) NeedsAuth() bool + type RedocOpts struct + BasePath string + Path string + RedocURL string + SpecURL string + Title string + func (r *RedocOpts) EnsureDefaults() + type RequestBinder interface + BindRequest func(*http.Request, *MatchedRoute) error + type Responder interface + WriteResponse func(http.ResponseWriter, runtime.Producer) + func Error(code int, data interface{}, headers ...http.Header) Responder + func NotImplemented(message string) Responder + type ResponderFunc func(http.ResponseWriter, runtime.Producer) + func (fn ResponderFunc) WriteResponse(rw http.ResponseWriter, pr runtime.Producer) + type RoutableAPI interface + AuthenticatorsFor func(map[string]spec.SecurityScheme) map[string]runtime.Authenticator + Authorizer func() runtime.Authorizer + ConsumersFor func([]string) map[string]runtime.Consumer + DefaultConsumes func() string + DefaultProduces func() string + Formats func() strfmt.Registry + HandlerFor func(string, string) (http.Handler, bool) + ProducersFor func([]string) map[string]runtime.Producer + ServeErrorFor func(string) func(http.ResponseWriter, *http.Request, error) + type RouteAuthenticator struct + Authenticator map[string]runtime.Authenticator + Schemes []string + Scopes map[string][]string + func (ra *RouteAuthenticator) AllScopes() []string + func (ra *RouteAuthenticator) AllowsAnonymous() bool + func (ra *RouteAuthenticator) Authenticate(req *http.Request, route *MatchedRoute) (bool, interface{}, error) + func (ra *RouteAuthenticator) CommonScopes() []string + type RouteAuthenticators []RouteAuthenticator + func (ras RouteAuthenticators) AllowsAnonymous() bool + func (ras RouteAuthenticators) Authenticate(req *http.Request, route *MatchedRoute) (bool, interface{}, 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 *loads.Document, api RoutableAPI) Router + type UntypedRequestBinder struct + Formats strfmt.Registry + Parameters map[string]spec.Parameter + Spec *spec.Swagger + func NewUntypedRequestBinder(parameters map[string]spec.Parameter, spec *spec.Swagger, ...) *UntypedRequestBinder + func (o *UntypedRequestBinder) Bind(request *http.Request, routeParams RouteParams, consumer runtime.Consumer, ...) error