operations

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 10 Imported by: 1

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 operations API

func (*Client) Elapse

func (a *Client) Elapse(params *ElapseParams, writer io.Writer) (*ElapseOK, error)

Elapse counts down the number of seconds

Count down the seconds remaining

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientService

type ClientService interface {
	Elapse(params *ElapseParams, writer io.Writer) (*ElapseOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

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

New creates a new operations API client.

type ElapseForbidden

type ElapseForbidden struct {
}
ElapseForbidden describes a response with status code 403, with default header values.

Contrived - thrown when length of 11 is chosen

func NewElapseForbidden

func NewElapseForbidden() *ElapseForbidden

NewElapseForbidden creates a ElapseForbidden with default headers values

func (*ElapseForbidden) Error

func (o *ElapseForbidden) Error() string

type ElapseOK

type ElapseOK struct {
	Payload io.Writer
}
ElapseOK describes a response with status code 200, with default header values.

Secondly update on remaining time

func NewElapseOK

func NewElapseOK(writer io.Writer) *ElapseOK

NewElapseOK creates a ElapseOK with default headers values

func (*ElapseOK) Error

func (o *ElapseOK) Error() string

func (*ElapseOK) GetPayload

func (o *ElapseOK) GetPayload() io.Writer

type ElapseParams

type ElapseParams struct {

	/* Length.

	   How many seconds to count down
	*/
	Length int64

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

ElapseParams contains all the parameters to send to the API endpoint

for the elapse operation.

Typically these are written to a http.Request.

func NewElapseParams

func NewElapseParams() *ElapseParams

NewElapseParams creates a new ElapseParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewElapseParamsWithContext

func NewElapseParamsWithContext(ctx context.Context) *ElapseParams

NewElapseParamsWithContext creates a new ElapseParams object with the ability to set a context for a request.

func NewElapseParamsWithHTTPClient

func NewElapseParamsWithHTTPClient(client *http.Client) *ElapseParams

NewElapseParamsWithHTTPClient creates a new ElapseParams object with the ability to set a custom HTTPClient for a request.

func NewElapseParamsWithTimeout

func NewElapseParamsWithTimeout(timeout time.Duration) *ElapseParams

NewElapseParamsWithTimeout creates a new ElapseParams object with the ability to set a timeout on a request.

func (*ElapseParams) SetContext

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

SetContext adds the context to the elapse params

func (*ElapseParams) SetDefaults

func (o *ElapseParams) SetDefaults()

SetDefaults hydrates default values in the elapse params (not the query body).

All values with no default are reset to their zero value.

func (*ElapseParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the elapse params

func (*ElapseParams) SetLength

func (o *ElapseParams) SetLength(length int64)

SetLength adds the length to the elapse params

func (*ElapseParams) SetTimeout

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

SetTimeout adds the timeout to the elapse params

func (*ElapseParams) WithContext

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

WithContext adds the context to the elapse params

func (*ElapseParams) WithDefaults

func (o *ElapseParams) WithDefaults() *ElapseParams

WithDefaults hydrates default values in the elapse params (not the query body).

All values with no default are reset to their zero value.

func (*ElapseParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the elapse params

func (*ElapseParams) WithLength

func (o *ElapseParams) WithLength(length int64) *ElapseParams

WithLength adds the length to the elapse params

func (*ElapseParams) WithTimeout

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

WithTimeout adds the timeout to the elapse params

func (*ElapseParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ElapseReader

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

ElapseReader is a Reader for the Elapse structure.

func (*ElapseReader) ReadResponse

func (o *ElapseReader) 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