operations

package
v0.0.0-...-03830f7 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DeleteCabsPickupsCountCacheOKCode int = 200

DeleteCabsPickupsCountCacheOKCode is the HTTP code returned for type DeleteCabsPickupsCountCacheOK

View Source
const GetCabsPickupsCountOKCode int = 200

GetCabsPickupsCountOKCode is the HTTP code returned for type GetCabsPickupsCountOK

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteCabsPickupsCountCache

type DeleteCabsPickupsCountCache struct {
	Context *middleware.Context
	Handler DeleteCabsPickupsCountCacheHandler
}

DeleteCabsPickupsCountCache swagger:route DELETE /cabs/pickups/count/cache deleteCabsPickupsCountCache

Method to clear the cache

func NewDeleteCabsPickupsCountCache

func NewDeleteCabsPickupsCountCache(ctx *middleware.Context, handler DeleteCabsPickupsCountCacheHandler) *DeleteCabsPickupsCountCache

NewDeleteCabsPickupsCountCache creates a new http.Handler for the delete cabs pickups count cache operation

func (*DeleteCabsPickupsCountCache) ServeHTTP

type DeleteCabsPickupsCountCacheHandler

type DeleteCabsPickupsCountCacheHandler interface {
	Handle(DeleteCabsPickupsCountCacheParams) middleware.Responder
}

DeleteCabsPickupsCountCacheHandler interface for that can handle valid delete cabs pickups count cache params

type DeleteCabsPickupsCountCacheHandlerFunc

type DeleteCabsPickupsCountCacheHandlerFunc func(DeleteCabsPickupsCountCacheParams) middleware.Responder

DeleteCabsPickupsCountCacheHandlerFunc turns a function with the right signature into a delete cabs pickups count cache handler

func (DeleteCabsPickupsCountCacheHandlerFunc) Handle

Handle executing the request and returning a response

type DeleteCabsPickupsCountCacheOK

type DeleteCabsPickupsCountCacheOK struct {
}

DeleteCabsPickupsCountCacheOK OK

swagger:response deleteCabsPickupsCountCacheOK

func NewDeleteCabsPickupsCountCacheOK

func NewDeleteCabsPickupsCountCacheOK() *DeleteCabsPickupsCountCacheOK

NewDeleteCabsPickupsCountCacheOK creates DeleteCabsPickupsCountCacheOK with default headers values

func (*DeleteCabsPickupsCountCacheOK) WriteResponse

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

WriteResponse to the client

type DeleteCabsPickupsCountCacheParams

type DeleteCabsPickupsCountCacheParams struct {

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

DeleteCabsPickupsCountCacheParams contains all the bound params for the delete cabs pickups count cache operation typically these are obtained from a http.Request

swagger:parameters DeleteCabsPickupsCountCache

func NewDeleteCabsPickupsCountCacheParams

func NewDeleteCabsPickupsCountCacheParams() DeleteCabsPickupsCountCacheParams

NewDeleteCabsPickupsCountCacheParams creates a new DeleteCabsPickupsCountCacheParams object no default values defined in spec.

func (*DeleteCabsPickupsCountCacheParams) 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 NewDeleteCabsPickupsCountCacheParams() beforehand.

type DeleteCabsPickupsCountCacheURL

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

DeleteCabsPickupsCountCacheURL generates an URL for the delete cabs pickups count cache operation

func (*DeleteCabsPickupsCountCacheURL) Build

Build a url path and query string

func (*DeleteCabsPickupsCountCacheURL) BuildFull

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

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

func (*DeleteCabsPickupsCountCacheURL) Must

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

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

func (*DeleteCabsPickupsCountCacheURL) SetBasePath

func (o *DeleteCabsPickupsCountCacheURL) 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 (*DeleteCabsPickupsCountCacheURL) String

String returns the string representation of the path with query string

func (*DeleteCabsPickupsCountCacheURL) StringFull

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

StringFull returns the string representation of a complete url

func (*DeleteCabsPickupsCountCacheURL) 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

type GetCabsPickupsCount

type GetCabsPickupsCount struct {
	Context *middleware.Context
	Handler GetCabsPickupsCountHandler
}

GetCabsPickupsCount swagger:route GET /cabs/pickups/count getCabsPickupsCount

Query how many trips a particular cab (medallion) has made given a particular pickup date.

func NewGetCabsPickupsCount

func NewGetCabsPickupsCount(ctx *middleware.Context, handler GetCabsPickupsCountHandler) *GetCabsPickupsCount

NewGetCabsPickupsCount creates a new http.Handler for the get cabs pickups count operation

func (*GetCabsPickupsCount) ServeHTTP

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

type GetCabsPickupsCountHandler

type GetCabsPickupsCountHandler interface {
	Handle(GetCabsPickupsCountParams) middleware.Responder
}

GetCabsPickupsCountHandler interface for that can handle valid get cabs pickups count params

type GetCabsPickupsCountHandlerFunc

type GetCabsPickupsCountHandlerFunc func(GetCabsPickupsCountParams) middleware.Responder

GetCabsPickupsCountHandlerFunc turns a function with the right signature into a get cabs pickups count handler

func (GetCabsPickupsCountHandlerFunc) Handle

Handle executing the request and returning a response

type GetCabsPickupsCountOK

type GetCabsPickupsCountOK struct {

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

GetCabsPickupsCountOK OK

swagger:response getCabsPickupsCountOK

func NewGetCabsPickupsCountOK

func NewGetCabsPickupsCountOK() *GetCabsPickupsCountOK

NewGetCabsPickupsCountOK creates GetCabsPickupsCountOK with default headers values

func (*GetCabsPickupsCountOK) SetPayload

SetPayload sets the payload to the get cabs pickups count o k response

func (*GetCabsPickupsCountOK) WithPayload

WithPayload adds the payload to the get cabs pickups count o k response

func (*GetCabsPickupsCountOK) WriteResponse

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

WriteResponse to the client

type GetCabsPickupsCountParams

type GetCabsPickupsCountParams struct {

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

	/*
	  Required: true
	  In: query
	*/
	Date strfmt.Date
	/*
	  Required: true
	  In: query
	*/
	Medallions []string
	/*Enforce to get latest data, NOT from cache.
	  In: query
	  Default: false
	*/
	Refresh *bool
}

GetCabsPickupsCountParams contains all the bound params for the get cabs pickups count operation typically these are obtained from a http.Request

swagger:parameters GetCabsPickupsCount

func NewGetCabsPickupsCountParams

func NewGetCabsPickupsCountParams() GetCabsPickupsCountParams

NewGetCabsPickupsCountParams creates a new GetCabsPickupsCountParams object with the default values initialized.

func (*GetCabsPickupsCountParams) 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 NewGetCabsPickupsCountParams() beforehand.

type GetCabsPickupsCountURL

type GetCabsPickupsCountURL struct {
	Date       strfmt.Date
	Medallions []string
	Refresh    *bool
	// contains filtered or unexported fields
}

GetCabsPickupsCountURL generates an URL for the get cabs pickups count operation

func (*GetCabsPickupsCountURL) Build

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

Build a url path and query string

func (*GetCabsPickupsCountURL) BuildFull

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

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

func (*GetCabsPickupsCountURL) Must

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

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

func (*GetCabsPickupsCountURL) SetBasePath

func (o *GetCabsPickupsCountURL) 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 (*GetCabsPickupsCountURL) String

func (o *GetCabsPickupsCountURL) String() string

String returns the string representation of the path with query string

func (*GetCabsPickupsCountURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetCabsPickupsCountURL) 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

type NycabAPI

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

	// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
	// It has a default implemention 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 implemention 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 implemention 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 a "application/json" mime type
	JSONConsumer runtime.Consumer

	// JSONProducer registers a producer for a "application/json" mime type
	JSONProducer runtime.Producer

	// DeleteCabsPickupsCountCacheHandler sets the operation handler for the delete cabs pickups count cache operation
	DeleteCabsPickupsCountCacheHandler DeleteCabsPickupsCountCacheHandler
	// GetCabsPickupsCountHandler sets the operation handler for the get cabs pickups count operation
	GetCabsPickupsCountHandler GetCabsPickupsCountHandler

	// 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)

	// 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
}

NycabAPI No description

func NewNycabAPI

func NewNycabAPI(spec *loads.Document) *NycabAPI

NewNycabAPI creates a new Nycab instance

func (*NycabAPI) AuthenticatorsFor

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

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*NycabAPI) Authorizer

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

Authorizer returns the registered authorizer

func (*NycabAPI) ConsumersFor

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

ConsumersFor gets the consumers for the specified media types

func (*NycabAPI) Context

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

Context returns the middleware context for the nycab API

func (*NycabAPI) DefaultConsumes

func (o *NycabAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*NycabAPI) DefaultProduces

func (o *NycabAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*NycabAPI) Formats

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

Formats returns the registered string formats

func (*NycabAPI) HandlerFor

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

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

func (*NycabAPI) Init

func (o *NycabAPI) Init()

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

func (*NycabAPI) ProducersFor

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

ProducersFor gets the producers for the specified media types

func (*NycabAPI) RegisterConsumer

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

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

func (*NycabAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*NycabAPI) RegisterProducer

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

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

func (*NycabAPI) Serve

func (o *NycabAPI) 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 (*NycabAPI) ServeErrorFor

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

ServeErrorFor gets a error handler for a given operation id

func (*NycabAPI) SetDefaultConsumes

func (o *NycabAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*NycabAPI) SetDefaultProduces

func (o *NycabAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*NycabAPI) SetSpec

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

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

func (*NycabAPI) Validate

func (o *NycabAPI) Validate() error

Validate validates the registrations in the NycabAPI

Jump to

Keyboard shortcuts

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