Documentation ¶
Index ¶
- Constants
- type DeleteCabsPickupsCountCache
- type DeleteCabsPickupsCountCacheHandler
- type DeleteCabsPickupsCountCacheHandlerFunc
- type DeleteCabsPickupsCountCacheOK
- type DeleteCabsPickupsCountCacheParams
- type DeleteCabsPickupsCountCacheURL
- func (o *DeleteCabsPickupsCountCacheURL) Build() (*url.URL, error)
- func (o *DeleteCabsPickupsCountCacheURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *DeleteCabsPickupsCountCacheURL) Must(u *url.URL, err error) *url.URL
- func (o *DeleteCabsPickupsCountCacheURL) SetBasePath(bp string)
- func (o *DeleteCabsPickupsCountCacheURL) String() string
- func (o *DeleteCabsPickupsCountCacheURL) StringFull(scheme, host string) string
- func (o *DeleteCabsPickupsCountCacheURL) WithBasePath(bp string) *DeleteCabsPickupsCountCacheURL
- type GetCabsPickupsCount
- type GetCabsPickupsCountHandler
- type GetCabsPickupsCountHandlerFunc
- type GetCabsPickupsCountOK
- type GetCabsPickupsCountParams
- type GetCabsPickupsCountURL
- func (o *GetCabsPickupsCountURL) Build() (*url.URL, error)
- func (o *GetCabsPickupsCountURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *GetCabsPickupsCountURL) Must(u *url.URL, err error) *url.URL
- func (o *GetCabsPickupsCountURL) SetBasePath(bp string)
- func (o *GetCabsPickupsCountURL) String() string
- func (o *GetCabsPickupsCountURL) StringFull(scheme, host string) string
- func (o *GetCabsPickupsCountURL) WithBasePath(bp string) *GetCabsPickupsCountURL
- type NycabAPI
- func (o *NycabAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *NycabAPI) Authorizer() runtime.Authorizer
- func (o *NycabAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *NycabAPI) Context() *middleware.Context
- func (o *NycabAPI) DefaultConsumes() string
- func (o *NycabAPI) DefaultProduces() string
- func (o *NycabAPI) Formats() strfmt.Registry
- func (o *NycabAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *NycabAPI) Init()
- func (o *NycabAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *NycabAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
- func (o *NycabAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *NycabAPI) RegisterProducer(mediaType string, producer runtime.Producer)
- func (o *NycabAPI) Serve(builder middleware.Builder) http.Handler
- func (o *NycabAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *NycabAPI) SetDefaultConsumes(mediaType string)
- func (o *NycabAPI) SetDefaultProduces(mediaType string)
- func (o *NycabAPI) SetSpec(spec *loads.Document)
- func (o *NycabAPI) Validate() error
Constants ¶
const DeleteCabsPickupsCountCacheOKCode int = 200
DeleteCabsPickupsCountCacheOKCode is the HTTP code returned for type DeleteCabsPickupsCountCacheOK
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 ¶
func (o *DeleteCabsPickupsCountCache) ServeHTTP(rw http.ResponseWriter, r *http.Request)
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 ¶
func (fn DeleteCabsPickupsCountCacheHandlerFunc) Handle(params DeleteCabsPickupsCountCacheParams) middleware.Responder
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 ¶
func (o *DeleteCabsPickupsCountCacheParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error
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 ¶
func (o *DeleteCabsPickupsCountCacheURL) Build() (*url.URL, error)
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 ¶
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 ¶
func (o *DeleteCabsPickupsCountCacheURL) String() 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 ¶
func (o *DeleteCabsPickupsCountCacheURL) WithBasePath(bp string) *DeleteCabsPickupsCountCacheURL
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 ¶
func (fn GetCabsPickupsCountHandlerFunc) Handle(params GetCabsPickupsCountParams) middleware.Responder
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 ¶
func (o *GetCabsPickupsCountOK) SetPayload(payload *models.GetCabsPickupsCountResponse)
SetPayload sets the payload to the get cabs pickups count o k response
func (*GetCabsPickupsCountOK) WithPayload ¶
func (o *GetCabsPickupsCountOK) WithPayload(payload *models.GetCabsPickupsCountResponse) *GetCabsPickupsCountOK
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 ¶
func (o *GetCabsPickupsCountParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error
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 ¶
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 ¶
func (o *GetCabsPickupsCountURL) WithBasePath(bp string) *GetCabsPickupsCountURL
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 ¶
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 ¶
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 ¶
DefaultConsumes returns the default consumes media type
func (*NycabAPI) DefaultProduces ¶
DefaultProduces returns the default produces media type
func (*NycabAPI) HandlerFor ¶
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 ¶
ProducersFor gets the producers for the specified media types
func (*NycabAPI) RegisterConsumer ¶
RegisterConsumer allows you to add (or override) a consumer for a media type.
func (*NycabAPI) RegisterFormat ¶
RegisterFormat registers a custom format validator
func (*NycabAPI) RegisterProducer ¶
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 ¶
SetDefaultConsumes returns the default consumes media type
func (*NycabAPI) SetDefaultProduces ¶
SetDefaultProduces sets the default produces media type
Source Files ¶
- delete_cabs_pickups_count_cache.go
- delete_cabs_pickups_count_cache_parameters.go
- delete_cabs_pickups_count_cache_responses.go
- delete_cabs_pickups_count_cache_urlbuilder.go
- get_cabs_pickups_count.go
- get_cabs_pickups_count_parameters.go
- get_cabs_pickups_count_responses.go
- get_cabs_pickups_count_urlbuilder.go
- nycab_api.go