operations

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 10 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 operations API

func (*Client) Echo

func (a *Client) Echo(params *EchoParams, opts ...ClientOption) (*EchoOK, error)

Echo echo API

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	Echo(params *EchoParams, opts ...ClientOption) (*EchoOK, 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 EchoDefault

type EchoDefault struct {
	Payload *models.APIError
	// contains filtered or unexported fields
}

EchoDefault describes a response with status code -1, with default header values.

An unexpected error response.

func NewEchoDefault

func NewEchoDefault(code int) *EchoDefault

NewEchoDefault creates a EchoDefault with default headers values

func (*EchoDefault) Code

func (o *EchoDefault) Code() int

Code gets the status code for the echo default response

func (*EchoDefault) Error

func (o *EchoDefault) Error() string

func (*EchoDefault) GetPayload

func (o *EchoDefault) GetPayload() *models.APIError

func (*EchoDefault) IsClientError

func (o *EchoDefault) IsClientError() bool

IsClientError returns true when this echo default response has a 4xx status code

func (*EchoDefault) IsCode

func (o *EchoDefault) IsCode(code int) bool

IsCode returns true when this echo default response a status code equal to that given

func (*EchoDefault) IsRedirect

func (o *EchoDefault) IsRedirect() bool

IsRedirect returns true when this echo default response has a 3xx status code

func (*EchoDefault) IsServerError

func (o *EchoDefault) IsServerError() bool

IsServerError returns true when this echo default response has a 5xx status code

func (*EchoDefault) IsSuccess

func (o *EchoDefault) IsSuccess() bool

IsSuccess returns true when this echo default response has a 2xx status code

func (*EchoDefault) String

func (o *EchoDefault) String() string

type EchoOK

type EchoOK struct {
	Payload *models.StateunstableEchoResponse
}

EchoOK describes a response with status code 200, with default header values.

A successful response.

func NewEchoOK

func NewEchoOK() *EchoOK

NewEchoOK creates a EchoOK with default headers values

func (*EchoOK) Code

func (o *EchoOK) Code() int

Code gets the status code for the echo o k response

func (*EchoOK) Error

func (o *EchoOK) Error() string

func (*EchoOK) GetPayload

func (o *EchoOK) GetPayload() *models.StateunstableEchoResponse

func (*EchoOK) IsClientError

func (o *EchoOK) IsClientError() bool

IsClientError returns true when this echo o k response has a 4xx status code

func (*EchoOK) IsCode

func (o *EchoOK) IsCode(code int) bool

IsCode returns true when this echo o k response a status code equal to that given

func (*EchoOK) IsRedirect

func (o *EchoOK) IsRedirect() bool

IsRedirect returns true when this echo o k response has a 3xx status code

func (*EchoOK) IsServerError

func (o *EchoOK) IsServerError() bool

IsServerError returns true when this echo o k response has a 5xx status code

func (*EchoOK) IsSuccess

func (o *EchoOK) IsSuccess() bool

IsSuccess returns true when this echo o k response has a 2xx status code

func (*EchoOK) String

func (o *EchoOK) String() string

type EchoParams

type EchoParams struct {

	// Message.
	Message *string

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

EchoParams contains all the parameters to send to the API endpoint

for the echo operation.

Typically these are written to a http.Request.

func NewEchoParams

func NewEchoParams() *EchoParams

NewEchoParams creates a new EchoParams 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 NewEchoParamsWithContext

func NewEchoParamsWithContext(ctx context.Context) *EchoParams

NewEchoParamsWithContext creates a new EchoParams object with the ability to set a context for a request.

func NewEchoParamsWithHTTPClient

func NewEchoParamsWithHTTPClient(client *http.Client) *EchoParams

NewEchoParamsWithHTTPClient creates a new EchoParams object with the ability to set a custom HTTPClient for a request.

func NewEchoParamsWithTimeout

func NewEchoParamsWithTimeout(timeout time.Duration) *EchoParams

NewEchoParamsWithTimeout creates a new EchoParams object with the ability to set a timeout on a request.

func (*EchoParams) SetContext

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

SetContext adds the context to the echo params

func (*EchoParams) SetDefaults

func (o *EchoParams) SetDefaults()

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

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

func (*EchoParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the echo params

func (*EchoParams) SetMessage

func (o *EchoParams) SetMessage(message *string)

SetMessage adds the message to the echo params

func (*EchoParams) SetTimeout

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

SetTimeout adds the timeout to the echo params

func (*EchoParams) WithContext

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

WithContext adds the context to the echo params

func (*EchoParams) WithDefaults

func (o *EchoParams) WithDefaults() *EchoParams

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

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

func (*EchoParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the echo params

func (*EchoParams) WithMessage

func (o *EchoParams) WithMessage(message *string) *EchoParams

WithMessage adds the message to the echo params

func (*EchoParams) WithTimeout

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

WithTimeout adds the timeout to the echo params

func (*EchoParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type EchoReader

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

EchoReader is a Reader for the Echo structure.

func (*EchoReader) ReadResponse

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