Documentation ¶
Index ¶
- Constants
- type GetSequence
- type GetSequenceDefault
- func (o *GetSequenceDefault) SetPayload(payload *models.Error)
- func (o *GetSequenceDefault) SetStatusCode(code int)
- func (o *GetSequenceDefault) WithPayload(payload *models.Error) *GetSequenceDefault
- func (o *GetSequenceDefault) WithStatusCode(code int) *GetSequenceDefault
- func (o *GetSequenceDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type GetSequenceHandler
- type GetSequenceHandlerFunc
- type GetSequenceOK
- type GetSequenceParams
- type GetSequenceURL
- func (o *GetSequenceURL) Build() (*url.URL, error)
- func (o *GetSequenceURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *GetSequenceURL) Must(u *url.URL, err error) *url.URL
- func (o *GetSequenceURL) SetBasePath(bp string)
- func (o *GetSequenceURL) String() string
- func (o *GetSequenceURL) StringFull(scheme, host string) string
- func (o *GetSequenceURL) WithBasePath(bp string) *GetSequenceURL
Constants ¶
const GetSequenceOKCode int = 200
GetSequenceOKCode is the HTTP code returned for type GetSequenceOK
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetSequence ¶
type GetSequence struct { Context *middleware.Context Handler GetSequenceHandler }
GetSequence swagger:route GET /sequence/{n} sequence getSequence
Returns the first n Fibonacci numbers
func NewGetSequence ¶
func NewGetSequence(ctx *middleware.Context, handler GetSequenceHandler) *GetSequence
NewGetSequence creates a new http.Handler for the get sequence operation
func (*GetSequence) ServeHTTP ¶
func (o *GetSequence) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type GetSequenceDefault ¶
type GetSequenceDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
GetSequenceDefault unexpected error
swagger:response getSequenceDefault
func NewGetSequenceDefault ¶
func NewGetSequenceDefault(code int) *GetSequenceDefault
NewGetSequenceDefault creates GetSequenceDefault with default headers values
func (*GetSequenceDefault) SetPayload ¶
func (o *GetSequenceDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the get sequence default response
func (*GetSequenceDefault) SetStatusCode ¶
func (o *GetSequenceDefault) SetStatusCode(code int)
SetStatusCode sets the status to the get sequence default response
func (*GetSequenceDefault) WithPayload ¶
func (o *GetSequenceDefault) WithPayload(payload *models.Error) *GetSequenceDefault
WithPayload adds the payload to the get sequence default response
func (*GetSequenceDefault) WithStatusCode ¶
func (o *GetSequenceDefault) WithStatusCode(code int) *GetSequenceDefault
WithStatusCode adds the status to the get sequence default response
func (*GetSequenceDefault) WriteResponse ¶
func (o *GetSequenceDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetSequenceHandler ¶
type GetSequenceHandler interface {
Handle(GetSequenceParams) middleware.Responder
}
GetSequenceHandler interface for that can handle valid get sequence params
type GetSequenceHandlerFunc ¶
type GetSequenceHandlerFunc func(GetSequenceParams) middleware.Responder
GetSequenceHandlerFunc turns a function with the right signature into a get sequence handler
func (GetSequenceHandlerFunc) Handle ¶
func (fn GetSequenceHandlerFunc) Handle(params GetSequenceParams) middleware.Responder
Handle executing the request and returning a response
type GetSequenceOK ¶
GetSequenceOK Expected response to a valid request
swagger:response getSequenceOK
func NewGetSequenceOK ¶
func NewGetSequenceOK() *GetSequenceOK
NewGetSequenceOK creates GetSequenceOK with default headers values
func (*GetSequenceOK) SetPayload ¶
func (o *GetSequenceOK) SetPayload(payload *models.Sequence)
SetPayload sets the payload to the get sequence o k response
func (*GetSequenceOK) WithPayload ¶
func (o *GetSequenceOK) WithPayload(payload *models.Sequence) *GetSequenceOK
WithPayload adds the payload to the get sequence o k response
func (*GetSequenceOK) WriteResponse ¶
func (o *GetSequenceOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetSequenceParams ¶
type GetSequenceParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /*Specifies which number the sequence should stop at (inclusively) Required: true In: path */ N int64 }
GetSequenceParams contains all the bound params for the get sequence operation typically these are obtained from a http.Request
swagger:parameters getSequence
func NewGetSequenceParams ¶
func NewGetSequenceParams() GetSequenceParams
NewGetSequenceParams creates a new GetSequenceParams object no default values defined in spec.
func (*GetSequenceParams) BindRequest ¶
func (o *GetSequenceParams) 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 NewGetSequenceParams() beforehand.
type GetSequenceURL ¶
type GetSequenceURL struct { N int64 // contains filtered or unexported fields }
GetSequenceURL generates an URL for the get sequence operation
func (*GetSequenceURL) Build ¶
func (o *GetSequenceURL) Build() (*url.URL, error)
Build a url path and query string
func (*GetSequenceURL) BuildFull ¶
func (o *GetSequenceURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*GetSequenceURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*GetSequenceURL) SetBasePath ¶
func (o *GetSequenceURL) 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 (*GetSequenceURL) String ¶
func (o *GetSequenceURL) String() string
String returns the string representation of the path with query string
func (*GetSequenceURL) StringFull ¶
func (o *GetSequenceURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*GetSequenceURL) WithBasePath ¶
func (o *GetSequenceURL) WithBasePath(bp string) *GetSequenceURL
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