sequence

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2018 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

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

Handle executing the request and returning a response

type GetSequenceOK

type GetSequenceOK struct {

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

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

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

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

Jump to

Keyboard shortcuts

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