uploads

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: Apache-2.0 Imports: 8 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 uploads API

func (*Client) SetTransport

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

SetTransport changes the transport on the client

func (*Client) UploadFile

func (a *Client) UploadFile(params *UploadFileParams, opts ...ClientOption) (*UploadFileOK, error)

UploadFile uploads

type ClientOption added in v0.27.0

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	UploadFile(params *UploadFileParams, opts ...ClientOption) (*UploadFileOK, 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 uploads API client.

type UploadFileOK

type UploadFileOK struct {
}
UploadFileOK describes a response with status code 200, with default header values.

OK

func NewUploadFileOK

func NewUploadFileOK() *UploadFileOK

NewUploadFileOK creates a UploadFileOK with default headers values

func (*UploadFileOK) Error

func (o *UploadFileOK) Error() string

func (*UploadFileOK) IsClientError added in v0.30.0

func (o *UploadFileOK) IsClientError() bool

IsClientError returns true when this upload file o k response returns a 4xx status code

func (*UploadFileOK) IsCode added in v0.30.0

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

IsCode returns true when this upload file o k response returns a 4xx status code

func (*UploadFileOK) IsRedirect added in v0.30.0

func (o *UploadFileOK) IsRedirect() bool

IsRedirect returns true when this upload file o k response returns a 3xx status code

func (*UploadFileOK) IsServerError added in v0.30.0

func (o *UploadFileOK) IsServerError() bool

IsServerError returns true when this upload file o k response returns a 5xx status code

func (*UploadFileOK) IsSuccess added in v0.30.0

func (o *UploadFileOK) IsSuccess() bool

IsSuccess returns true when this upload file o k response returns a 2xx status code

func (*UploadFileOK) String added in v0.30.0

func (o *UploadFileOK) String() string

type UploadFileParams

type UploadFileParams struct {

	// File.
	File runtime.NamedReadCloser

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

UploadFileParams contains all the parameters to send to the API endpoint

for the upload file operation.

Typically these are written to a http.Request.

func NewUploadFileParams

func NewUploadFileParams() *UploadFileParams

NewUploadFileParams creates a new UploadFileParams 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 NewUploadFileParamsWithContext

func NewUploadFileParamsWithContext(ctx context.Context) *UploadFileParams

NewUploadFileParamsWithContext creates a new UploadFileParams object with the ability to set a context for a request.

func NewUploadFileParamsWithHTTPClient

func NewUploadFileParamsWithHTTPClient(client *http.Client) *UploadFileParams

NewUploadFileParamsWithHTTPClient creates a new UploadFileParams object with the ability to set a custom HTTPClient for a request.

func NewUploadFileParamsWithTimeout

func NewUploadFileParamsWithTimeout(timeout time.Duration) *UploadFileParams

NewUploadFileParamsWithTimeout creates a new UploadFileParams object with the ability to set a timeout on a request.

func (*UploadFileParams) SetContext

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

SetContext adds the context to the upload file params

func (*UploadFileParams) SetDefaults

func (o *UploadFileParams) SetDefaults()

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

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

func (*UploadFileParams) SetFile

func (o *UploadFileParams) SetFile(file runtime.NamedReadCloser)

SetFile adds the file to the upload file params

func (*UploadFileParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the upload file params

func (*UploadFileParams) SetTimeout

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

SetTimeout adds the timeout to the upload file params

func (*UploadFileParams) WithContext

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

WithContext adds the context to the upload file params

func (*UploadFileParams) WithDefaults

func (o *UploadFileParams) WithDefaults() *UploadFileParams

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

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

func (*UploadFileParams) WithFile

WithFile adds the file to the upload file params

func (*UploadFileParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the upload file params

func (*UploadFileParams) WithTimeout

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

WithTimeout adds the timeout to the upload file params

func (*UploadFileParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type UploadFileReader

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

UploadFileReader is a Reader for the UploadFile structure.

func (*UploadFileReader) ReadResponse

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