Help us shape the future of Go! Take the 2026 Go Developer Survey

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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for sequence API

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client

New creates a new sequence API client.

func (*Client) GetSequence

func (a *Client) GetSequence(params *GetSequenceParams) (*GetSequenceOK, error)

GetSequence returns the first n fibonacci numbers

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type GetSequenceDefault

type GetSequenceDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}

GetSequenceDefault handles this case with default header values.

unexpected error

func NewGetSequenceDefault

func NewGetSequenceDefault(code int) *GetSequenceDefault

NewGetSequenceDefault creates a GetSequenceDefault with default headers values

func (*GetSequenceDefault) Code

func (o *GetSequenceDefault) Code() int

Code gets the status code for the get sequence default response

func (*GetSequenceDefault) Error

func (o *GetSequenceDefault) Error() string

type GetSequenceOK

type GetSequenceOK struct {
	Payload *models.Sequence
}

GetSequenceOK handles this case with default header values.

Expected response to a valid request

func NewGetSequenceOK

func NewGetSequenceOK() *GetSequenceOK

NewGetSequenceOK creates a GetSequenceOK with default headers values

func (*GetSequenceOK) Error

func (o *GetSequenceOK) Error() string

type GetSequenceParams

type GetSequenceParams struct {

	/*N
	  Specifies which number the sequence should stop at (inclusively)

	*/
	N int64

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetSequenceParams contains all the parameters to send to the API endpoint for the get sequence operation typically these are written to a http.Request

func NewGetSequenceParams

func NewGetSequenceParams() *GetSequenceParams

NewGetSequenceParams creates a new GetSequenceParams object with the default values initialized.

func NewGetSequenceParamsWithContext

func NewGetSequenceParamsWithContext(ctx context.Context) *GetSequenceParams

NewGetSequenceParamsWithContext creates a new GetSequenceParams object with the default values initialized, and the ability to set a context for a request

func NewGetSequenceParamsWithHTTPClient

func NewGetSequenceParamsWithHTTPClient(client *http.Client) *GetSequenceParams

NewGetSequenceParamsWithHTTPClient creates a new GetSequenceParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGetSequenceParamsWithTimeout

func NewGetSequenceParamsWithTimeout(timeout time.Duration) *GetSequenceParams

NewGetSequenceParamsWithTimeout creates a new GetSequenceParams object with the default values initialized, and the ability to set a timeout on a request

func (*GetSequenceParams) SetContext

func (o *GetSequenceParams) SetContext(ctx context.Context)

SetContext adds the context to the get sequence params

func (*GetSequenceParams) SetHTTPClient

func (o *GetSequenceParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get sequence params

func (*GetSequenceParams) SetN

func (o *GetSequenceParams) SetN(n int64)

SetN adds the n to the get sequence params

func (*GetSequenceParams) SetTimeout

func (o *GetSequenceParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get sequence params

func (*GetSequenceParams) WithContext

func (o *GetSequenceParams) WithContext(ctx context.Context) *GetSequenceParams

WithContext adds the context to the get sequence params

func (*GetSequenceParams) WithHTTPClient

func (o *GetSequenceParams) WithHTTPClient(client *http.Client) *GetSequenceParams

WithHTTPClient adds the HTTPClient to the get sequence params

func (*GetSequenceParams) WithN

WithN adds the n to the get sequence params

func (*GetSequenceParams) WithTimeout

func (o *GetSequenceParams) WithTimeout(timeout time.Duration) *GetSequenceParams

WithTimeout adds the timeout to the get sequence params

func (*GetSequenceParams) WriteToRequest

func (o *GetSequenceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GetSequenceReader

type GetSequenceReader struct {
	// contains filtered or unexported fields
}

GetSequenceReader is a Reader for the GetSequence structure.

func (*GetSequenceReader) ReadResponse

func (o *GetSequenceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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