Documentation ¶
Index ¶
- type API
- func (d *API) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]httpkit.Authenticator
- func (d *API) ConsumersFor(mediaTypes []string) map[string]httpkit.Consumer
- func (d *API) Formats() strfmt.Registry
- func (d *API) OperationHandlerFor(method, path string) (httpkit.OperationHandler, bool)
- func (d *API) ProducersFor(mediaTypes []string) map[string]httpkit.Producer
- func (d *API) RegisterAuth(scheme string, handler httpkit.Authenticator)
- func (d *API) RegisterConsumer(mediaType string, handler httpkit.Consumer)
- func (d *API) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (d *API) RegisterOperation(method, path string, handler httpkit.OperationHandler)
- func (d *API) RegisterProducer(mediaType string, handler httpkit.Producer)
- func (d *API) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { DefaultProduces string DefaultConsumes string ServeError func(http.ResponseWriter, *http.Request, error) Models map[string]func() interface{} // contains filtered or unexported fields }
API represents an untyped mux for a swagger spec
func (*API) AuthenticatorsFor ¶
func (d *API) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]httpkit.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*API) ConsumersFor ¶
ConsumersFor gets the consumers for the specified media types
func (*API) OperationHandlerFor ¶
func (d *API) OperationHandlerFor(method, path string) (httpkit.OperationHandler, bool)
OperationHandlerFor returns the operation handler for the specified id if it can be found
func (*API) ProducersFor ¶
ProducersFor gets the producers for the specified media types
func (*API) RegisterAuth ¶
func (d *API) RegisterAuth(scheme string, handler httpkit.Authenticator)
RegisterAuth registers an auth handler in this api
func (*API) RegisterConsumer ¶
RegisterConsumer registers a consumer for a media type.
func (*API) RegisterFormat ¶
RegisterFormat registers a custom format validator
func (*API) RegisterOperation ¶
func (d *API) RegisterOperation(method, path string, handler httpkit.OperationHandler)
RegisterOperation registers an operation handler for an operation name
func (*API) RegisterProducer ¶
RegisterProducer registers a producer for a media type
Click to show internal directories.
Click to hide internal directories.