Documentation ¶
Index ¶
- Constants
- type GetAPIStats
- type GetAPIStatsHandler
- type GetAPIStatsHandlerFunc
- type GetAPIStatsInternalServerError
- type GetAPIStatsNotFound
- type GetAPIStatsOK
- type GetAPIStatsParams
- type GetAPIStatsURL
- func (o *GetAPIStatsURL) Build() (*url.URL, error)
- func (o *GetAPIStatsURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *GetAPIStatsURL) Must(u *url.URL, err error) *url.URL
- func (o *GetAPIStatsURL) SetBasePath(bp string)
- func (o *GetAPIStatsURL) String() string
- func (o *GetAPIStatsURL) StringFull(scheme, host string) string
- func (o *GetAPIStatsURL) WithBasePath(bp string) *GetAPIStatsURL
Constants ¶
const GetAPIStatsInternalServerErrorCode int = 500
GetAPIStatsInternalServerErrorCode is the HTTP code returned for type GetAPIStatsInternalServerError
const GetAPIStatsNotFoundCode int = 404
GetAPIStatsNotFoundCode is the HTTP code returned for type GetAPIStatsNotFound
const GetAPIStatsOKCode int = 200
GetAPIStatsOKCode is the HTTP code returned for type GetAPIStatsOK
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetAPIStats ¶
type GetAPIStats struct { Context *middleware.Context Handler GetAPIStatsHandler }
GetAPIStats swagger:route GET /api/stats stats getApiStats
Fetch the most frequent request on '/api/fizzbuzz', its parameters and number of hits.
func NewGetAPIStats ¶
func NewGetAPIStats(ctx *middleware.Context, handler GetAPIStatsHandler) *GetAPIStats
NewGetAPIStats creates a new http.Handler for the get API stats operation
func (*GetAPIStats) ServeHTTP ¶
func (o *GetAPIStats) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type GetAPIStatsHandler ¶
type GetAPIStatsHandler interface {
Handle(GetAPIStatsParams) middleware.Responder
}
GetAPIStatsHandler interface for that can handle valid get API stats params
type GetAPIStatsHandlerFunc ¶
type GetAPIStatsHandlerFunc func(GetAPIStatsParams) middleware.Responder
GetAPIStatsHandlerFunc turns a function with the right signature into a get API stats handler
func (GetAPIStatsHandlerFunc) Handle ¶
func (fn GetAPIStatsHandlerFunc) Handle(params GetAPIStatsParams) middleware.Responder
Handle executing the request and returning a response
type GetAPIStatsInternalServerError ¶
type GetAPIStatsInternalServerError struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` }
GetAPIStatsInternalServerError Database isn't available.
swagger:response getApiStatsInternalServerError
func NewGetAPIStatsInternalServerError ¶
func NewGetAPIStatsInternalServerError() *GetAPIStatsInternalServerError
NewGetAPIStatsInternalServerError creates GetAPIStatsInternalServerError with default headers values
func (*GetAPIStatsInternalServerError) SetPayload ¶
func (o *GetAPIStatsInternalServerError) SetPayload(payload *models.Error)
SetPayload sets the payload to the get Api stats internal server error response
func (*GetAPIStatsInternalServerError) WithPayload ¶
func (o *GetAPIStatsInternalServerError) WithPayload(payload *models.Error) *GetAPIStatsInternalServerError
WithPayload adds the payload to the get Api stats internal server error response
func (*GetAPIStatsInternalServerError) WriteResponse ¶
func (o *GetAPIStatsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetAPIStatsNotFound ¶
GetAPIStatsNotFound No stored request can be found.
swagger:response getApiStatsNotFound
func NewGetAPIStatsNotFound ¶
func NewGetAPIStatsNotFound() *GetAPIStatsNotFound
NewGetAPIStatsNotFound creates GetAPIStatsNotFound with default headers values
func (*GetAPIStatsNotFound) SetPayload ¶
func (o *GetAPIStatsNotFound) SetPayload(payload *models.Error)
SetPayload sets the payload to the get Api stats not found response
func (*GetAPIStatsNotFound) WithPayload ¶
func (o *GetAPIStatsNotFound) WithPayload(payload *models.Error) *GetAPIStatsNotFound
WithPayload adds the payload to the get Api stats not found response
func (*GetAPIStatsNotFound) WriteResponse ¶
func (o *GetAPIStatsNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetAPIStatsOK ¶
GetAPIStatsOK A statistics endpoint allowing users to know what the most frequent request has been.
swagger:response getApiStatsOK
func NewGetAPIStatsOK ¶
func NewGetAPIStatsOK() *GetAPIStatsOK
NewGetAPIStatsOK creates GetAPIStatsOK with default headers values
func (*GetAPIStatsOK) SetPayload ¶
func (o *GetAPIStatsOK) SetPayload(payload *models.Stat)
SetPayload sets the payload to the get Api stats o k response
func (*GetAPIStatsOK) WithPayload ¶
func (o *GetAPIStatsOK) WithPayload(payload *models.Stat) *GetAPIStatsOK
WithPayload adds the payload to the get Api stats o k response
func (*GetAPIStatsOK) WriteResponse ¶
func (o *GetAPIStatsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetAPIStatsParams ¶
GetAPIStatsParams contains all the bound params for the get API stats operation typically these are obtained from a http.Request
swagger:parameters GetAPIStats
func NewGetAPIStatsParams ¶
func NewGetAPIStatsParams() GetAPIStatsParams
NewGetAPIStatsParams creates a new GetAPIStatsParams object no default values defined in spec.
func (*GetAPIStatsParams) BindRequest ¶
func (o *GetAPIStatsParams) 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 NewGetAPIStatsParams() beforehand.
type GetAPIStatsURL ¶
type GetAPIStatsURL struct {
// contains filtered or unexported fields
}
GetAPIStatsURL generates an URL for the get API stats operation
func (*GetAPIStatsURL) Build ¶
func (o *GetAPIStatsURL) Build() (*url.URL, error)
Build a url path and query string
func (*GetAPIStatsURL) BuildFull ¶
func (o *GetAPIStatsURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*GetAPIStatsURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*GetAPIStatsURL) SetBasePath ¶
func (o *GetAPIStatsURL) 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 (*GetAPIStatsURL) String ¶
func (o *GetAPIStatsURL) String() string
String returns the string representation of the path with query string
func (*GetAPIStatsURL) StringFull ¶
func (o *GetAPIStatsURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*GetAPIStatsURL) WithBasePath ¶
func (o *GetAPIStatsURL) WithBasePath(bp string) *GetAPIStatsURL
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