operations

package
v0.0.0-...-a784d27 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkedOK

type ChunkedOK struct {
	Payload io.Writer
}

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

chunked data delivered

func NewChunkedOK

func NewChunkedOK(writer io.Writer) *ChunkedOK

NewChunkedOK creates a ChunkedOK with default headers values

func (*ChunkedOK) Code

func (o *ChunkedOK) Code() int

Code gets the status code for the chunked o k response

func (*ChunkedOK) Error

func (o *ChunkedOK) Error() string

func (*ChunkedOK) GetPayload

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

func (*ChunkedOK) IsClientError

func (o *ChunkedOK) IsClientError() bool

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

func (*ChunkedOK) IsCode

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

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

func (*ChunkedOK) IsRedirect

func (o *ChunkedOK) IsRedirect() bool

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

func (*ChunkedOK) IsServerError

func (o *ChunkedOK) IsServerError() bool

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

func (*ChunkedOK) IsSuccess

func (o *ChunkedOK) IsSuccess() bool

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

func (*ChunkedOK) String

func (o *ChunkedOK) String() string

type ChunkedParams

type ChunkedParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

ChunkedParams contains all the parameters to send to the API endpoint

for the chunked operation.

Typically these are written to a http.Request.

func NewChunkedParams

func NewChunkedParams() *ChunkedParams

NewChunkedParams creates a new ChunkedParams 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 NewChunkedParamsWithContext

func NewChunkedParamsWithContext(ctx context.Context) *ChunkedParams

NewChunkedParamsWithContext creates a new ChunkedParams object with the ability to set a context for a request.

func NewChunkedParamsWithHTTPClient

func NewChunkedParamsWithHTTPClient(client *http.Client) *ChunkedParams

NewChunkedParamsWithHTTPClient creates a new ChunkedParams object with the ability to set a custom HTTPClient for a request.

func NewChunkedParamsWithTimeout

func NewChunkedParamsWithTimeout(timeout time.Duration) *ChunkedParams

NewChunkedParamsWithTimeout creates a new ChunkedParams object with the ability to set a timeout on a request.

func (*ChunkedParams) SetContext

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

SetContext adds the context to the chunked params

func (*ChunkedParams) SetDefaults

func (o *ChunkedParams) SetDefaults()

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

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

func (*ChunkedParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the chunked params

func (*ChunkedParams) SetTimeout

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

SetTimeout adds the timeout to the chunked params

func (*ChunkedParams) WithContext

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

WithContext adds the context to the chunked params

func (*ChunkedParams) WithDefaults

func (o *ChunkedParams) WithDefaults() *ChunkedParams

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

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

func (*ChunkedParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the chunked params

func (*ChunkedParams) WithTimeout

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

WithTimeout adds the timeout to the chunked params

func (*ChunkedParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ChunkedReader

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

ChunkedReader is a Reader for the Chunked structure.

func (*ChunkedReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type Client

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

Client for operations API

func (*Client) Chunked

func (a *Client) Chunked(params *ChunkedParams, writer io.Writer, opts ...ClientOption) (*ChunkedOK, error)

Chunked chunkeds

delivers text/plain via Encoding: Chunked

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 {
	Chunked(params *ChunkedParams, writer io.Writer, opts ...ClientOption) (*ChunkedOK, 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.

func NewClientWithBasicAuth

func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService

New creates a new operations API client with basic auth credentials. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.

func NewClientWithBearerToken

func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService

New creates a new operations API client with a bearer token for authentication. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.

Jump to

Keyboard shortcuts

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