uploads

package
v0.0.0-...-c7fed22 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 11 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) CreateUpload

func (a *Client) CreateUpload(params *CreateUploadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUploadCreated, error)

CreateUpload uploads activity

Uploads a new data file to create an activity from. Requires activity:write scope.

func (*Client) GetUploadByID

func (a *Client) GetUploadByID(params *GetUploadByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUploadByIDOK, error)

GetUploadByID gets upload

Returns an upload for a given identifier. Requires activity:write scope.

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 {
	CreateUpload(params *CreateUploadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUploadCreated, error)

	GetUploadByID(params *GetUploadByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUploadByIDOK, 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 CreateUploadCreated

type CreateUploadCreated struct {
	Payload *models.Upload
}

CreateUploadCreated describes a response with status code 201, with default header values.

A representation of the created upload.

func NewCreateUploadCreated

func NewCreateUploadCreated() *CreateUploadCreated

NewCreateUploadCreated creates a CreateUploadCreated with default headers values

func (*CreateUploadCreated) Code

func (o *CreateUploadCreated) Code() int

Code gets the status code for the create upload created response

func (*CreateUploadCreated) Error

func (o *CreateUploadCreated) Error() string

func (*CreateUploadCreated) GetPayload

func (o *CreateUploadCreated) GetPayload() *models.Upload

func (*CreateUploadCreated) IsClientError

func (o *CreateUploadCreated) IsClientError() bool

IsClientError returns true when this create upload created response has a 4xx status code

func (*CreateUploadCreated) IsCode

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

IsCode returns true when this create upload created response a status code equal to that given

func (*CreateUploadCreated) IsRedirect

func (o *CreateUploadCreated) IsRedirect() bool

IsRedirect returns true when this create upload created response has a 3xx status code

func (*CreateUploadCreated) IsServerError

func (o *CreateUploadCreated) IsServerError() bool

IsServerError returns true when this create upload created response has a 5xx status code

func (*CreateUploadCreated) IsSuccess

func (o *CreateUploadCreated) IsSuccess() bool

IsSuccess returns true when this create upload created response has a 2xx status code

func (*CreateUploadCreated) String

func (o *CreateUploadCreated) String() string

type CreateUploadDefault

type CreateUploadDefault struct {
	Payload *models.Fault
	// contains filtered or unexported fields
}

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

Unexpected error.

func NewCreateUploadDefault

func NewCreateUploadDefault(code int) *CreateUploadDefault

NewCreateUploadDefault creates a CreateUploadDefault with default headers values

func (*CreateUploadDefault) Code

func (o *CreateUploadDefault) Code() int

Code gets the status code for the create upload default response

func (*CreateUploadDefault) Error

func (o *CreateUploadDefault) Error() string

func (*CreateUploadDefault) GetPayload

func (o *CreateUploadDefault) GetPayload() *models.Fault

func (*CreateUploadDefault) IsClientError

func (o *CreateUploadDefault) IsClientError() bool

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

func (*CreateUploadDefault) IsCode

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

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

func (*CreateUploadDefault) IsRedirect

func (o *CreateUploadDefault) IsRedirect() bool

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

func (*CreateUploadDefault) IsServerError

func (o *CreateUploadDefault) IsServerError() bool

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

func (*CreateUploadDefault) IsSuccess

func (o *CreateUploadDefault) IsSuccess() bool

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

func (*CreateUploadDefault) String

func (o *CreateUploadDefault) String() string

type CreateUploadParams

type CreateUploadParams struct {
	/* Commute.

	   Whether the resulting activity should be tagged as a commute.
	*/
	Commute *string

	/* DataType.

	   The format of the uploaded file.
	*/
	DataType *string

	/* Description.

	   The desired description of the resulting activity.
	*/
	Description *string

	/* ExternalID.

	   The desired external identifier of the resulting activity.
	*/
	ExternalID *string

	/* File.

	   The uploaded file.
	*/
	File runtime.NamedReadCloser

	/* Name.

	   The desired name of the resulting activity.
	*/
	Name *string

	/* Trainer.

	   Whether the resulting activity should be marked as having been performed on a trainer.
	*/
	Trainer *string

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

CreateUploadParams contains all the parameters to send to the API endpoint

for the create upload operation.

Typically these are written to a http.Request.

func NewCreateUploadParams

func NewCreateUploadParams() *CreateUploadParams

NewCreateUploadParams creates a new CreateUploadParams 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 NewCreateUploadParamsWithContext

func NewCreateUploadParamsWithContext(ctx context.Context) *CreateUploadParams

NewCreateUploadParamsWithContext creates a new CreateUploadParams object with the ability to set a context for a request.

func NewCreateUploadParamsWithHTTPClient

func NewCreateUploadParamsWithHTTPClient(client *http.Client) *CreateUploadParams

NewCreateUploadParamsWithHTTPClient creates a new CreateUploadParams object with the ability to set a custom HTTPClient for a request.

func NewCreateUploadParamsWithTimeout

func NewCreateUploadParamsWithTimeout(timeout time.Duration) *CreateUploadParams

NewCreateUploadParamsWithTimeout creates a new CreateUploadParams object with the ability to set a timeout on a request.

func (*CreateUploadParams) SetCommute

func (o *CreateUploadParams) SetCommute(commute *string)

SetCommute adds the commute to the create upload params

func (*CreateUploadParams) SetContext

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

SetContext adds the context to the create upload params

func (*CreateUploadParams) SetDataType

func (o *CreateUploadParams) SetDataType(dataType *string)

SetDataType adds the dataType to the create upload params

func (*CreateUploadParams) SetDefaults

func (o *CreateUploadParams) SetDefaults()

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

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

func (*CreateUploadParams) SetDescription

func (o *CreateUploadParams) SetDescription(description *string)

SetDescription adds the description to the create upload params

func (*CreateUploadParams) SetExternalID

func (o *CreateUploadParams) SetExternalID(externalID *string)

SetExternalID adds the externalId to the create upload params

func (*CreateUploadParams) SetFile

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

SetFile adds the file to the create upload params

func (*CreateUploadParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the create upload params

func (*CreateUploadParams) SetName

func (o *CreateUploadParams) SetName(name *string)

SetName adds the name to the create upload params

func (*CreateUploadParams) SetTimeout

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

SetTimeout adds the timeout to the create upload params

func (*CreateUploadParams) SetTrainer

func (o *CreateUploadParams) SetTrainer(trainer *string)

SetTrainer adds the trainer to the create upload params

func (*CreateUploadParams) WithCommute

func (o *CreateUploadParams) WithCommute(commute *string) *CreateUploadParams

WithCommute adds the commute to the create upload params

func (*CreateUploadParams) WithContext

WithContext adds the context to the create upload params

func (*CreateUploadParams) WithDataType

func (o *CreateUploadParams) WithDataType(dataType *string) *CreateUploadParams

WithDataType adds the dataType to the create upload params

func (*CreateUploadParams) WithDefaults

func (o *CreateUploadParams) WithDefaults() *CreateUploadParams

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

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

func (*CreateUploadParams) WithDescription

func (o *CreateUploadParams) WithDescription(description *string) *CreateUploadParams

WithDescription adds the description to the create upload params

func (*CreateUploadParams) WithExternalID

func (o *CreateUploadParams) WithExternalID(externalID *string) *CreateUploadParams

WithExternalID adds the externalID to the create upload params

func (*CreateUploadParams) WithFile

WithFile adds the file to the create upload params

func (*CreateUploadParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the create upload params

func (*CreateUploadParams) WithName

func (o *CreateUploadParams) WithName(name *string) *CreateUploadParams

WithName adds the name to the create upload params

func (*CreateUploadParams) WithTimeout

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

WithTimeout adds the timeout to the create upload params

func (*CreateUploadParams) WithTrainer

func (o *CreateUploadParams) WithTrainer(trainer *string) *CreateUploadParams

WithTrainer adds the trainer to the create upload params

func (*CreateUploadParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CreateUploadReader

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

CreateUploadReader is a Reader for the CreateUpload structure.

func (*CreateUploadReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetUploadByIDDefault

type GetUploadByIDDefault struct {
	Payload *models.Fault
	// contains filtered or unexported fields
}

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

Unexpected error.

func NewGetUploadByIDDefault

func NewGetUploadByIDDefault(code int) *GetUploadByIDDefault

NewGetUploadByIDDefault creates a GetUploadByIDDefault with default headers values

func (*GetUploadByIDDefault) Code

func (o *GetUploadByIDDefault) Code() int

Code gets the status code for the get upload by Id default response

func (*GetUploadByIDDefault) Error

func (o *GetUploadByIDDefault) Error() string

func (*GetUploadByIDDefault) GetPayload

func (o *GetUploadByIDDefault) GetPayload() *models.Fault

func (*GetUploadByIDDefault) IsClientError

func (o *GetUploadByIDDefault) IsClientError() bool

IsClientError returns true when this get upload by Id default response has a 4xx status code

func (*GetUploadByIDDefault) IsCode

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

IsCode returns true when this get upload by Id default response a status code equal to that given

func (*GetUploadByIDDefault) IsRedirect

func (o *GetUploadByIDDefault) IsRedirect() bool

IsRedirect returns true when this get upload by Id default response has a 3xx status code

func (*GetUploadByIDDefault) IsServerError

func (o *GetUploadByIDDefault) IsServerError() bool

IsServerError returns true when this get upload by Id default response has a 5xx status code

func (*GetUploadByIDDefault) IsSuccess

func (o *GetUploadByIDDefault) IsSuccess() bool

IsSuccess returns true when this get upload by Id default response has a 2xx status code

func (*GetUploadByIDDefault) String

func (o *GetUploadByIDDefault) String() string

type GetUploadByIDOK

type GetUploadByIDOK struct {
	Payload *models.Upload
}

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

Representation of the upload.

func NewGetUploadByIDOK

func NewGetUploadByIDOK() *GetUploadByIDOK

NewGetUploadByIDOK creates a GetUploadByIDOK with default headers values

func (*GetUploadByIDOK) Code

func (o *GetUploadByIDOK) Code() int

Code gets the status code for the get upload by Id o k response

func (*GetUploadByIDOK) Error

func (o *GetUploadByIDOK) Error() string

func (*GetUploadByIDOK) GetPayload

func (o *GetUploadByIDOK) GetPayload() *models.Upload

func (*GetUploadByIDOK) IsClientError

func (o *GetUploadByIDOK) IsClientError() bool

IsClientError returns true when this get upload by Id o k response has a 4xx status code

func (*GetUploadByIDOK) IsCode

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

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

func (*GetUploadByIDOK) IsRedirect

func (o *GetUploadByIDOK) IsRedirect() bool

IsRedirect returns true when this get upload by Id o k response has a 3xx status code

func (*GetUploadByIDOK) IsServerError

func (o *GetUploadByIDOK) IsServerError() bool

IsServerError returns true when this get upload by Id o k response has a 5xx status code

func (*GetUploadByIDOK) IsSuccess

func (o *GetUploadByIDOK) IsSuccess() bool

IsSuccess returns true when this get upload by Id o k response has a 2xx status code

func (*GetUploadByIDOK) String

func (o *GetUploadByIDOK) String() string

type GetUploadByIDParams

type GetUploadByIDParams struct {
	/* UploadID.

	   The identifier of the upload.

	   Format: int64
	*/
	UploadID int64

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

GetUploadByIDParams contains all the parameters to send to the API endpoint

for the get upload by Id operation.

Typically these are written to a http.Request.

func NewGetUploadByIDParams

func NewGetUploadByIDParams() *GetUploadByIDParams

NewGetUploadByIDParams creates a new GetUploadByIDParams 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 NewGetUploadByIDParamsWithContext

func NewGetUploadByIDParamsWithContext(ctx context.Context) *GetUploadByIDParams

NewGetUploadByIDParamsWithContext creates a new GetUploadByIDParams object with the ability to set a context for a request.

func NewGetUploadByIDParamsWithHTTPClient

func NewGetUploadByIDParamsWithHTTPClient(client *http.Client) *GetUploadByIDParams

NewGetUploadByIDParamsWithHTTPClient creates a new GetUploadByIDParams object with the ability to set a custom HTTPClient for a request.

func NewGetUploadByIDParamsWithTimeout

func NewGetUploadByIDParamsWithTimeout(timeout time.Duration) *GetUploadByIDParams

NewGetUploadByIDParamsWithTimeout creates a new GetUploadByIDParams object with the ability to set a timeout on a request.

func (*GetUploadByIDParams) SetContext

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

SetContext adds the context to the get upload by Id params

func (*GetUploadByIDParams) SetDefaults

func (o *GetUploadByIDParams) SetDefaults()

SetDefaults hydrates default values in the get upload by Id params (not the query body).

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

func (*GetUploadByIDParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get upload by Id params

func (*GetUploadByIDParams) SetTimeout

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

SetTimeout adds the timeout to the get upload by Id params

func (*GetUploadByIDParams) SetUploadID

func (o *GetUploadByIDParams) SetUploadID(uploadID int64)

SetUploadID adds the uploadId to the get upload by Id params

func (*GetUploadByIDParams) WithContext

WithContext adds the context to the get upload by Id params

func (*GetUploadByIDParams) WithDefaults

func (o *GetUploadByIDParams) WithDefaults() *GetUploadByIDParams

WithDefaults hydrates default values in the get upload by Id params (not the query body).

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

func (*GetUploadByIDParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get upload by Id params

func (*GetUploadByIDParams) WithTimeout

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

WithTimeout adds the timeout to the get upload by Id params

func (*GetUploadByIDParams) WithUploadID

func (o *GetUploadByIDParams) WithUploadID(uploadID int64) *GetUploadByIDParams

WithUploadID adds the uploadID to the get upload by Id params

func (*GetUploadByIDParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetUploadByIDReader

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

GetUploadByIDReader is a Reader for the GetUploadByID structure.

func (*GetUploadByIDReader) ReadResponse

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