uploads

package
v0.0.0-...-1fb28bd Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 8 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 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

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.

func NewClientWithBasicAuth

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

New creates a new uploads 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 uploads 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.

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) Code

func (o *UploadFileOK) Code() int

Code gets the status code for the upload file o k response

func (*UploadFileOK) Error

func (o *UploadFileOK) Error() string

func (*UploadFileOK) IsClientError

func (o *UploadFileOK) IsClientError() bool

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

func (*UploadFileOK) IsCode

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

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

func (*UploadFileOK) IsRedirect

func (o *UploadFileOK) IsRedirect() bool

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

func (*UploadFileOK) IsServerError

func (o *UploadFileOK) IsServerError() bool

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

func (*UploadFileOK) IsSuccess

func (o *UploadFileOK) IsSuccess() bool

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

func (*UploadFileOK) String

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