stats

package
v0.0.0-...-52558d3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const GetAPIStatsInternalServerErrorCode int = 500

GetAPIStatsInternalServerErrorCode is the HTTP code returned for type GetAPIStatsInternalServerError

View Source
const GetAPIStatsNotFoundCode int = 404

GetAPIStatsNotFoundCode is the HTTP code returned for type GetAPIStatsNotFound

View Source
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

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

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

type GetAPIStatsNotFound struct {

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

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

type GetAPIStatsOK struct {

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

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

type GetAPIStatsParams struct {

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

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

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

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

Jump to

Keyboard shortcuts

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