runtime: Index | Files

package untyped

import ""


Package Files


type API Uses

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 NewAPI Uses

func NewAPI(spec *loads.Document) *API

NewAPI creates the default untyped API

func (*API) AuthenticatorsFor Uses

func (d *API) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*API) Authorizer Uses

func (d *API) Authorizer() runtime.Authorizer

Authorizer returns the registered authorizer

func (*API) ConsumersFor Uses

func (d *API) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer

ConsumersFor gets the consumers for the specified media types

func (*API) Formats Uses

func (d *API) Formats() strfmt.Registry

Formats returns the registered string formats

func (*API) OperationHandlerFor Uses

func (d *API) OperationHandlerFor(method, path string) (runtime.OperationHandler, bool)

OperationHandlerFor returns the operation handler for the specified id if it can be found

func (*API) ProducersFor Uses

func (d *API) ProducersFor(mediaTypes []string) map[string]runtime.Producer

ProducersFor gets the producers for the specified media types

func (*API) RegisterAuth Uses

func (d *API) RegisterAuth(scheme string, handler runtime.Authenticator)

RegisterAuth registers an auth handler in this api

func (*API) RegisterAuthorizer Uses

func (d *API) RegisterAuthorizer(handler runtime.Authorizer)

RegisterAuthorizer registers an authorizer handler in this api

func (*API) RegisterConsumer Uses

func (d *API) RegisterConsumer(mediaType string, handler runtime.Consumer)

RegisterConsumer registers a consumer for a media type.

func (*API) RegisterFormat Uses

func (d *API) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)

RegisterFormat registers a custom format validator

func (*API) RegisterOperation Uses

func (d *API) RegisterOperation(method, path string, handler runtime.OperationHandler)

RegisterOperation registers an operation handler for an operation name

func (*API) RegisterProducer Uses

func (d *API) RegisterProducer(mediaType string, handler runtime.Producer)

RegisterProducer registers a producer for a media type

func (*API) Validate Uses

func (d *API) Validate() error

Validate validates this API for any missing items

func (*API) WithJSONDefaults Uses

func (d *API) WithJSONDefaults() *API

WithJSONDefaults loads the json defaults for this api

func (*API) WithoutJSONDefaults Uses

func (d *API) WithoutJSONDefaults() *API

WithoutJSONDefaults clears the json defaults for this api

Package untyped imports 10 packages (graph) and is imported by 16 packages. Updated 2020-02-03. Refresh now. Tools for package owners.