operations

package
v0.0.0-...-62f23bf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const GetCovid19ReportDataOKCode int = 200

GetCovid19ReportDataOKCode is the HTTP code returned for type GetCovid19ReportDataOK

Variables

This section is empty.

Functions

This section is empty.

Types

type Brcovid19apiAPI

type Brcovid19apiAPI struct {
	Middleware func(middleware.Builder) http.Handler

	// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator
	// APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator
	// BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator

	// JSONConsumer registers a consumer for the following mime types:
	//   - application/json
	JSONConsumer runtime.Consumer

	// JSONProducer registers a producer for the following mime types:
	//   - application/json
	JSONProducer runtime.Producer

	// GetCovid19ReportDataHandler sets the operation handler for the get covid19 report data operation
	GetCovid19ReportDataHandler GetCovid19ReportDataHandler
	// ServeError is called when an error is received, there is a default handler
	// but you can set your own with this
	ServeError func(http.ResponseWriter, *http.Request, error)

	// PreServerShutdown is called before the HTTP(S) server is shutdown
	// This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic
	PreServerShutdown func()

	// ServerShutdown is called when the HTTP(S) server is shut down and done
	// handling all active connections and does not accept connections any more
	ServerShutdown func()

	// Custom command line argument groups with their descriptions
	CommandLineOptionsGroups []swag.CommandLineOptionsGroup

	// User defined logger function.
	Logger func(string, ...interface{})
	// contains filtered or unexported fields
}

Brcovid19apiAPI the brcovid19api API

func NewBrcovid19apiAPI

func NewBrcovid19apiAPI(spec *loads.Document) *Brcovid19apiAPI

NewBrcovid19apiAPI creates a new Brcovid19api instance

func (*Brcovid19apiAPI) AddMiddlewareFor

func (o *Brcovid19apiAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)

AddMiddlewareFor adds a http middleware to existing handler

func (*Brcovid19apiAPI) AuthenticatorsFor

func (o *Brcovid19apiAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*Brcovid19apiAPI) Authorizer

func (o *Brcovid19apiAPI) Authorizer() runtime.Authorizer

Authorizer returns the registered authorizer

func (*Brcovid19apiAPI) ConsumersFor

func (o *Brcovid19apiAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer

ConsumersFor gets the consumers for the specified media types. MIME type parameters are ignored here.

func (*Brcovid19apiAPI) Context

func (o *Brcovid19apiAPI) Context() *middleware.Context

Context returns the middleware context for the brcovid19api API

func (*Brcovid19apiAPI) DefaultConsumes

func (o *Brcovid19apiAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*Brcovid19apiAPI) DefaultProduces

func (o *Brcovid19apiAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*Brcovid19apiAPI) Formats

func (o *Brcovid19apiAPI) Formats() strfmt.Registry

Formats returns the registered string formats

func (*Brcovid19apiAPI) HandlerFor

func (o *Brcovid19apiAPI) HandlerFor(method, path string) (http.Handler, bool)

HandlerFor gets a http.Handler for the provided operation method and path

func (*Brcovid19apiAPI) Init

func (o *Brcovid19apiAPI) Init()

Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit

func (*Brcovid19apiAPI) ProducersFor

func (o *Brcovid19apiAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer

ProducersFor gets the producers for the specified media types. MIME type parameters are ignored here.

func (*Brcovid19apiAPI) RegisterConsumer

func (o *Brcovid19apiAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)

RegisterConsumer allows you to add (or override) a consumer for a media type.

func (*Brcovid19apiAPI) RegisterFormat

func (o *Brcovid19apiAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)

RegisterFormat registers a custom format validator

func (*Brcovid19apiAPI) RegisterProducer

func (o *Brcovid19apiAPI) RegisterProducer(mediaType string, producer runtime.Producer)

RegisterProducer allows you to add (or override) a producer for a media type.

func (*Brcovid19apiAPI) Serve

func (o *Brcovid19apiAPI) Serve(builder middleware.Builder) http.Handler

Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))

func (*Brcovid19apiAPI) ServeErrorFor

func (o *Brcovid19apiAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)

ServeErrorFor gets a error handler for a given operation id

func (*Brcovid19apiAPI) SetDefaultConsumes

func (o *Brcovid19apiAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*Brcovid19apiAPI) SetDefaultProduces

func (o *Brcovid19apiAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*Brcovid19apiAPI) SetSpec

func (o *Brcovid19apiAPI) SetSpec(spec *loads.Document)

SetSpec sets a spec that will be served for the clients.

func (*Brcovid19apiAPI) Validate

func (o *Brcovid19apiAPI) Validate() error

Validate validates the registrations in the Brcovid19apiAPI

type GetCovid19ReportData

type GetCovid19ReportData struct {
	Context *middleware.Context
	Handler GetCovid19ReportDataHandler
}

GetCovid19ReportData swagger:route GET /covid19 getCovid19ReportData

GetCovid19ReportData get covid19 report data API

func NewGetCovid19ReportData

func NewGetCovid19ReportData(ctx *middleware.Context, handler GetCovid19ReportDataHandler) *GetCovid19ReportData

NewGetCovid19ReportData creates a new http.Handler for the get covid19 report data operation

func (*GetCovid19ReportData) ServeHTTP

func (o *GetCovid19ReportData) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetCovid19ReportDataDefault

type GetCovid19ReportDataDefault struct {

	/*
	  In: Body
	*/
	Payload *models.ErrorModel `json:"body,omitempty"`
	// contains filtered or unexported fields
}

GetCovid19ReportDataDefault unexpected error

swagger:response getCovid19ReportDataDefault

func NewGetCovid19ReportDataDefault

func NewGetCovid19ReportDataDefault(code int) *GetCovid19ReportDataDefault

NewGetCovid19ReportDataDefault creates GetCovid19ReportDataDefault with default headers values

func (*GetCovid19ReportDataDefault) SetPayload

func (o *GetCovid19ReportDataDefault) SetPayload(payload *models.ErrorModel)

SetPayload sets the payload to the get covid19 report data default response

func (*GetCovid19ReportDataDefault) SetStatusCode

func (o *GetCovid19ReportDataDefault) SetStatusCode(code int)

SetStatusCode sets the status to the get covid19 report data default response

func (*GetCovid19ReportDataDefault) WithPayload

WithPayload adds the payload to the get covid19 report data default response

func (*GetCovid19ReportDataDefault) WithStatusCode

WithStatusCode adds the status to the get covid19 report data default response

func (*GetCovid19ReportDataDefault) WriteResponse

func (o *GetCovid19ReportDataDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetCovid19ReportDataHandler

type GetCovid19ReportDataHandler interface {
	Handle(GetCovid19ReportDataParams) middleware.Responder
}

GetCovid19ReportDataHandler interface for that can handle valid get covid19 report data params

type GetCovid19ReportDataHandlerFunc

type GetCovid19ReportDataHandlerFunc func(GetCovid19ReportDataParams) middleware.Responder

GetCovid19ReportDataHandlerFunc turns a function with the right signature into a get covid19 report data handler

func (GetCovid19ReportDataHandlerFunc) Handle

Handle executing the request and returning a response

type GetCovid19ReportDataOK

type GetCovid19ReportDataOK struct {

	/*
	  In: Body
	*/
	Payload *models.Response `json:"body,omitempty"`
}

GetCovid19ReportDataOK Up to date data about covid19 in Brazil

swagger:response getCovid19ReportDataOK

func NewGetCovid19ReportDataOK

func NewGetCovid19ReportDataOK() *GetCovid19ReportDataOK

NewGetCovid19ReportDataOK creates GetCovid19ReportDataOK with default headers values

func (*GetCovid19ReportDataOK) SetPayload

func (o *GetCovid19ReportDataOK) SetPayload(payload *models.Response)

SetPayload sets the payload to the get covid19 report data o k response

func (*GetCovid19ReportDataOK) WithPayload

WithPayload adds the payload to the get covid19 report data o k response

func (*GetCovid19ReportDataOK) WriteResponse

func (o *GetCovid19ReportDataOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetCovid19ReportDataParams

type GetCovid19ReportDataParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`
}

GetCovid19ReportDataParams contains all the bound params for the get covid19 report data operation typically these are obtained from a http.Request

swagger:parameters getCovid19ReportData

func NewGetCovid19ReportDataParams

func NewGetCovid19ReportDataParams() GetCovid19ReportDataParams

NewGetCovid19ReportDataParams creates a new GetCovid19ReportDataParams object no default values defined in spec.

func (*GetCovid19ReportDataParams) BindRequest

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetCovid19ReportDataParams() beforehand.

type GetCovid19ReportDataURL

type GetCovid19ReportDataURL struct {
	// contains filtered or unexported fields
}

GetCovid19ReportDataURL generates an URL for the get covid19 report data operation

func (*GetCovid19ReportDataURL) Build

func (o *GetCovid19ReportDataURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetCovid19ReportDataURL) BuildFull

func (o *GetCovid19ReportDataURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetCovid19ReportDataURL) Must

func (o *GetCovid19ReportDataURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetCovid19ReportDataURL) SetBasePath

func (o *GetCovid19ReportDataURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetCovid19ReportDataURL) String

func (o *GetCovid19ReportDataURL) String() string

String returns the string representation of the path with query string

func (*GetCovid19ReportDataURL) StringFull

func (o *GetCovid19ReportDataURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetCovid19ReportDataURL) WithBasePath

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL