file_upload

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 15 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 file upload API

func (*Client) GeneratedUploadURL deprecated

Deprecated: 2022-08-10 - Use GeneratedUploadURLShort instead.

GeneratedUploadURL generate upload url Generate an upload URL. It's valid for 10 minutes. Other detail info:

  • Required permission : resource = "ADMIN:NAMESPACE:{namespace}:FILEUPLOAD" , action=1 (CREATE)
  • Action code : 11101
  • Returns : URL data

func (*Client) GeneratedUploadURLShort

func (a *Client) GeneratedUploadURLShort(params *GeneratedUploadURLParams, authInfo runtime.ClientAuthInfoWriter) (*GeneratedUploadURLOK, error)

GeneratedUploadURLShort generate upload url Generate an upload URL. It's valid for 10 minutes. Other detail info:

  • Required permission : resource = "ADMIN:NAMESPACE:{namespace}:FILEUPLOAD" , action=1 (CREATE)
  • Action code : 11101
  • Returns : URL data

func (*Client) GeneratedUserUploadContentURL deprecated

Deprecated: 2022-08-10 - Use GeneratedUserUploadContentURLShort instead.

GeneratedUserUploadContentURL generate upload url for user content Generate an upload URL for user content. It's valid for 10 minutes. Other detail info:

  • Required permission : resource = "ADMIN:NAMESPACE:{namespace}:USER:{userId}:FILEUPLOAD" , action=1 (CREATE)
  • Action code : 11102
  • Default maximum file count per user : 10 files
  • Default maximum file size per user : 104857600 bytes
  • Returns : URL data

func (*Client) GeneratedUserUploadContentURLShort

func (a *Client) GeneratedUserUploadContentURLShort(params *GeneratedUserUploadContentURLParams, authInfo runtime.ClientAuthInfoWriter) (*GeneratedUserUploadContentURLOK, error)

GeneratedUserUploadContentURLShort generate upload url for user content Generate an upload URL for user content. It's valid for 10 minutes. Other detail info:

  • Required permission : resource = "ADMIN:NAMESPACE:{namespace}:USER:{userId}:FILEUPLOAD" , action=1 (CREATE)
  • Action code : 11102
  • Default maximum file count per user : 10 files
  • Default maximum file size per user : 104857600 bytes
  • Returns : URL data

func (*Client) PublicGeneratedUploadURL deprecated

Deprecated: 2022-08-10 - Use PublicGeneratedUploadURLShort instead.

PublicGeneratedUploadURL generate upload url Generate an upload URL. It's valid for 10 minutes. Other detail info:

  • Required permission : resource = "NAMESPACE:{namespace}:FILEUPLOAD" , action=1 (CREATE)
  • Action code : 11101
  • Returns : URL data

func (*Client) PublicGeneratedUploadURLShort

func (a *Client) PublicGeneratedUploadURLShort(params *PublicGeneratedUploadURLParams, authInfo runtime.ClientAuthInfoWriter) (*PublicGeneratedUploadURLOK, error)

PublicGeneratedUploadURLShort generate upload url Generate an upload URL. It's valid for 10 minutes. Other detail info:

  • Required permission : resource = "NAMESPACE:{namespace}:FILEUPLOAD" , action=1 (CREATE)
  • Action code : 11101
  • Returns : URL data

func (*Client) PublicGeneratedUserUploadContentURL deprecated

Deprecated: 2022-08-10 - Use PublicGeneratedUserUploadContentURLShort instead.

PublicGeneratedUserUploadContentURL generate upload url for user content Generate an upload URL for user content. It's valid for 10 minutes. There are 2 kinds of storage limitation per user : maximum file count and maximum file size. The threshold of those limitations is different between upload category that is used. Other detail info:

  • Required permission : resource = "NAMESPACE:{namespace}:USER:{userId}:FILEUPLOAD" , action=1 (CREATE)
  • Action code : 11102
  • Default maximum file count per user : 10 files
  • Default maximum file size per user : 104857600 bytes
  • Returns : URL data

func (*Client) PublicGeneratedUserUploadContentURLShort

func (a *Client) PublicGeneratedUserUploadContentURLShort(params *PublicGeneratedUserUploadContentURLParams, authInfo runtime.ClientAuthInfoWriter) (*PublicGeneratedUserUploadContentURLOK, error)

PublicGeneratedUserUploadContentURLShort generate upload url for user content Generate an upload URL for user content. It's valid for 10 minutes. There are 2 kinds of storage limitation per user : maximum file count and maximum file size. The threshold of those limitations is different between upload category that is used. Other detail info:

  • Required permission : resource = "NAMESPACE:{namespace}:USER:{userId}:FILEUPLOAD" , action=1 (CREATE)
  • Action code : 11102
  • Default maximum file count per user : 10 files
  • Default maximum file size per user : 104857600 bytes
  • Returns : URL data

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientService

type ClientService interface {
	GeneratedUploadURL(params *GeneratedUploadURLParams, authInfo runtime.ClientAuthInfoWriter) (*GeneratedUploadURLOK, *GeneratedUploadURLBadRequest, *GeneratedUploadURLUnauthorized, *GeneratedUploadURLForbidden, *GeneratedUploadURLInternalServerError, error)
	GeneratedUploadURLShort(params *GeneratedUploadURLParams, authInfo runtime.ClientAuthInfoWriter) (*GeneratedUploadURLOK, error)
	GeneratedUserUploadContentURL(params *GeneratedUserUploadContentURLParams, authInfo runtime.ClientAuthInfoWriter) (*GeneratedUserUploadContentURLOK, *GeneratedUserUploadContentURLBadRequest, *GeneratedUserUploadContentURLUnauthorized, *GeneratedUserUploadContentURLForbidden, *GeneratedUserUploadContentURLConflict, *GeneratedUserUploadContentURLInternalServerError, error)
	GeneratedUserUploadContentURLShort(params *GeneratedUserUploadContentURLParams, authInfo runtime.ClientAuthInfoWriter) (*GeneratedUserUploadContentURLOK, error)
	PublicGeneratedUploadURL(params *PublicGeneratedUploadURLParams, authInfo runtime.ClientAuthInfoWriter) (*PublicGeneratedUploadURLOK, *PublicGeneratedUploadURLBadRequest, *PublicGeneratedUploadURLUnauthorized, *PublicGeneratedUploadURLForbidden, *PublicGeneratedUploadURLInternalServerError, error)
	PublicGeneratedUploadURLShort(params *PublicGeneratedUploadURLParams, authInfo runtime.ClientAuthInfoWriter) (*PublicGeneratedUploadURLOK, error)
	PublicGeneratedUserUploadContentURL(params *PublicGeneratedUserUploadContentURLParams, authInfo runtime.ClientAuthInfoWriter) (*PublicGeneratedUserUploadContentURLOK, *PublicGeneratedUserUploadContentURLBadRequest, *PublicGeneratedUserUploadContentURLUnauthorized, *PublicGeneratedUserUploadContentURLForbidden, *PublicGeneratedUserUploadContentURLConflict, *PublicGeneratedUserUploadContentURLInternalServerError, error)
	PublicGeneratedUserUploadContentURLShort(params *PublicGeneratedUserUploadContentURLParams, authInfo runtime.ClientAuthInfoWriter) (*PublicGeneratedUserUploadContentURLOK, 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 file upload API client.

type GeneratedUploadURLBadRequest

type GeneratedUploadURLBadRequest struct {
	Payload *basicclientmodels.ValidationErrorEntity
}

GeneratedUploadURLBadRequest handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20002</td><td>validation error</td></tr><tr><td>11131</td><td>Unable to {action}: File type is not supported</td></tr></table>

func NewGeneratedUploadURLBadRequest

func NewGeneratedUploadURLBadRequest() *GeneratedUploadURLBadRequest

NewGeneratedUploadURLBadRequest creates a GeneratedUploadURLBadRequest with default headers values

func (*GeneratedUploadURLBadRequest) Error

func (*GeneratedUploadURLBadRequest) GetPayload

func (*GeneratedUploadURLBadRequest) ToJSONString

func (o *GeneratedUploadURLBadRequest) ToJSONString() string

type GeneratedUploadURLForbidden

type GeneratedUploadURLForbidden struct {
	Payload *basicclientmodels.ErrorEntity
}

GeneratedUploadURLForbidden handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20013</td><td>insufficient permission</td></tr></table>

func NewGeneratedUploadURLForbidden

func NewGeneratedUploadURLForbidden() *GeneratedUploadURLForbidden

NewGeneratedUploadURLForbidden creates a GeneratedUploadURLForbidden with default headers values

func (*GeneratedUploadURLForbidden) Error

func (*GeneratedUploadURLForbidden) GetPayload

func (*GeneratedUploadURLForbidden) ToJSONString

func (o *GeneratedUploadURLForbidden) ToJSONString() string

type GeneratedUploadURLInternalServerError

type GeneratedUploadURLInternalServerError struct {
	Payload *basicclientmodels.ErrorEntity
}

GeneratedUploadURLInternalServerError handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20000</td><td>internal server error</td></tr></table>

func NewGeneratedUploadURLInternalServerError

func NewGeneratedUploadURLInternalServerError() *GeneratedUploadURLInternalServerError

NewGeneratedUploadURLInternalServerError creates a GeneratedUploadURLInternalServerError with default headers values

func (*GeneratedUploadURLInternalServerError) Error

func (*GeneratedUploadURLInternalServerError) GetPayload

func (*GeneratedUploadURLInternalServerError) ToJSONString

type GeneratedUploadURLOK

type GeneratedUploadURLOK struct {
	Payload *basicclientmodels.FileUploadURLInfo
}

GeneratedUploadURLOK handles this case with default header values.

Successful operation

func NewGeneratedUploadURLOK

func NewGeneratedUploadURLOK() *GeneratedUploadURLOK

NewGeneratedUploadURLOK creates a GeneratedUploadURLOK with default headers values

func (*GeneratedUploadURLOK) Error

func (o *GeneratedUploadURLOK) Error() string

func (*GeneratedUploadURLOK) GetPayload

func (*GeneratedUploadURLOK) ToJSONString

func (o *GeneratedUploadURLOK) ToJSONString() string

type GeneratedUploadURLParams

type GeneratedUploadURLParams struct {

	/*RetryPolicy*/
	RetryPolicy *utils.Retry
	/*Folder
	  the name of folder where the file will be uploaded, must be between 1-256 characters, all characters allowed no whitespace

	*/
	Folder string
	/*Namespace
	  namespace, only accept alphabet and numeric

	*/
	Namespace string
	/*FileType
	  one of the these types: jpeg, jpg, png, bmp, gif, mp3, bin, webp, mp4, webm

	*/
	FileType string

	AuthInfoWriter runtime.ClientAuthInfoWriter
	Context        context.Context
	HTTPClient     *http.Client

	// XFlightId is an optional parameter from this SDK
	XFlightId *string
	// contains filtered or unexported fields
}

GeneratedUploadURLParams contains all the parameters to send to the API endpoint for the generated upload url operation typically these are written to a http.Request

func NewGeneratedUploadURLParams

func NewGeneratedUploadURLParams() *GeneratedUploadURLParams

NewGeneratedUploadURLParams creates a new GeneratedUploadURLParams object with the default values initialized.

func NewGeneratedUploadURLParamsWithContext

func NewGeneratedUploadURLParamsWithContext(ctx context.Context) *GeneratedUploadURLParams

NewGeneratedUploadURLParamsWithContext creates a new GeneratedUploadURLParams object with the default values initialized, and the ability to set a context for a request

func NewGeneratedUploadURLParamsWithHTTPClient

func NewGeneratedUploadURLParamsWithHTTPClient(client *http.Client) *GeneratedUploadURLParams

NewGeneratedUploadURLParamsWithHTTPClient creates a new GeneratedUploadURLParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGeneratedUploadURLParamsWithTimeout

func NewGeneratedUploadURLParamsWithTimeout(timeout time.Duration) *GeneratedUploadURLParams

NewGeneratedUploadURLParamsWithTimeout creates a new GeneratedUploadURLParams object with the default values initialized, and the ability to set a timeout on a request

func (*GeneratedUploadURLParams) SetAuthInfoWriter

func (o *GeneratedUploadURLParams) SetAuthInfoWriter(authInfoWriter runtime.ClientAuthInfoWriter)

SetAuthInfoWriter adds the authInfoWriter to the generated upload url params

func (*GeneratedUploadURLParams) SetContext

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

SetContext adds the context to the generated upload url params

func (*GeneratedUploadURLParams) SetFileType

func (o *GeneratedUploadURLParams) SetFileType(fileType string)

SetFileType adds the fileType to the generated upload url params

func (*GeneratedUploadURLParams) SetFlightId

func (o *GeneratedUploadURLParams) SetFlightId(flightId string)

SetFlightId adds the flightId as the header value for this specific endpoint

func (*GeneratedUploadURLParams) SetFolder

func (o *GeneratedUploadURLParams) SetFolder(folder string)

SetFolder adds the folder to the generated upload url params

func (*GeneratedUploadURLParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the generated upload url params

func (*GeneratedUploadURLParams) SetHTTPClientTransport

func (o *GeneratedUploadURLParams) SetHTTPClientTransport(roundTripper http.RoundTripper)

SetHTTPClient adds the HTTPClient Transport to the generated upload url params

func (*GeneratedUploadURLParams) SetNamespace

func (o *GeneratedUploadURLParams) SetNamespace(namespace string)

SetNamespace adds the namespace to the generated upload url params

func (*GeneratedUploadURLParams) SetTimeout

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

SetTimeout adds the timeout to the generated upload url params

func (*GeneratedUploadURLParams) WithContext

WithContext adds the context to the generated upload url params

func (*GeneratedUploadURLParams) WithFileType

func (o *GeneratedUploadURLParams) WithFileType(fileType string) *GeneratedUploadURLParams

WithFileType adds the fileType to the generated upload url params

func (*GeneratedUploadURLParams) WithFolder

WithFolder adds the folder to the generated upload url params

func (*GeneratedUploadURLParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the generated upload url params

func (*GeneratedUploadURLParams) WithNamespace

func (o *GeneratedUploadURLParams) WithNamespace(namespace string) *GeneratedUploadURLParams

WithNamespace adds the namespace to the generated upload url params

func (*GeneratedUploadURLParams) WithTimeout

WithTimeout adds the timeout to the generated upload url params

func (*GeneratedUploadURLParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GeneratedUploadURLReader

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

GeneratedUploadURLReader is a Reader for the GeneratedUploadURL structure.

func (*GeneratedUploadURLReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GeneratedUploadURLUnauthorized

type GeneratedUploadURLUnauthorized struct {
	Payload *basicclientmodels.ErrorEntity
}

GeneratedUploadURLUnauthorized handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20001</td><td>unauthorized</td></tr></table>

func NewGeneratedUploadURLUnauthorized

func NewGeneratedUploadURLUnauthorized() *GeneratedUploadURLUnauthorized

NewGeneratedUploadURLUnauthorized creates a GeneratedUploadURLUnauthorized with default headers values

func (*GeneratedUploadURLUnauthorized) Error

func (*GeneratedUploadURLUnauthorized) GetPayload

func (*GeneratedUploadURLUnauthorized) ToJSONString

func (o *GeneratedUploadURLUnauthorized) ToJSONString() string

type GeneratedUserUploadContentURLBadRequest

type GeneratedUserUploadContentURLBadRequest struct {
	Payload *basicclientmodels.ValidationErrorEntity
}

GeneratedUserUploadContentURLBadRequest handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20002</td><td>validation error</td></tr><tr><td>11121</td><td>Unable to {action}: category {category} is not valid</td></tr><tr><td>11131</td><td>Unable to {action}: File type is not supported</td></tr></table>

func NewGeneratedUserUploadContentURLBadRequest

func NewGeneratedUserUploadContentURLBadRequest() *GeneratedUserUploadContentURLBadRequest

NewGeneratedUserUploadContentURLBadRequest creates a GeneratedUserUploadContentURLBadRequest with default headers values

func (*GeneratedUserUploadContentURLBadRequest) Error

func (*GeneratedUserUploadContentURLBadRequest) GetPayload

func (*GeneratedUserUploadContentURLBadRequest) ToJSONString

type GeneratedUserUploadContentURLConflict

type GeneratedUserUploadContentURLConflict struct {
	Payload *basicclientmodels.ErrorEntity
}

GeneratedUserUploadContentURLConflict handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>11132</td><td>Unable to {action}: file storage exceed limitation, user ID: {userId}, namespace: {namespace}</td></tr></table>

func NewGeneratedUserUploadContentURLConflict

func NewGeneratedUserUploadContentURLConflict() *GeneratedUserUploadContentURLConflict

NewGeneratedUserUploadContentURLConflict creates a GeneratedUserUploadContentURLConflict with default headers values

func (*GeneratedUserUploadContentURLConflict) Error

func (*GeneratedUserUploadContentURLConflict) GetPayload

func (*GeneratedUserUploadContentURLConflict) ToJSONString

type GeneratedUserUploadContentURLForbidden

type GeneratedUserUploadContentURLForbidden struct {
	Payload *basicclientmodels.ErrorEntity
}

GeneratedUserUploadContentURLForbidden handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20013</td><td>insufficient permission</td></tr></table>

func NewGeneratedUserUploadContentURLForbidden

func NewGeneratedUserUploadContentURLForbidden() *GeneratedUserUploadContentURLForbidden

NewGeneratedUserUploadContentURLForbidden creates a GeneratedUserUploadContentURLForbidden with default headers values

func (*GeneratedUserUploadContentURLForbidden) Error

func (*GeneratedUserUploadContentURLForbidden) GetPayload

func (*GeneratedUserUploadContentURLForbidden) ToJSONString

type GeneratedUserUploadContentURLInternalServerError

type GeneratedUserUploadContentURLInternalServerError struct {
	Payload *basicclientmodels.ErrorEntity
}

GeneratedUserUploadContentURLInternalServerError handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20000</td><td>internal server error</td></tr></table>

func NewGeneratedUserUploadContentURLInternalServerError

func NewGeneratedUserUploadContentURLInternalServerError() *GeneratedUserUploadContentURLInternalServerError

NewGeneratedUserUploadContentURLInternalServerError creates a GeneratedUserUploadContentURLInternalServerError with default headers values

func (*GeneratedUserUploadContentURLInternalServerError) Error

func (*GeneratedUserUploadContentURLInternalServerError) GetPayload

func (*GeneratedUserUploadContentURLInternalServerError) ToJSONString

type GeneratedUserUploadContentURLOK

type GeneratedUserUploadContentURLOK struct {
	Payload *basicclientmodels.FileUploadURLInfo
}

GeneratedUserUploadContentURLOK handles this case with default header values.

Successful operation

func NewGeneratedUserUploadContentURLOK

func NewGeneratedUserUploadContentURLOK() *GeneratedUserUploadContentURLOK

NewGeneratedUserUploadContentURLOK creates a GeneratedUserUploadContentURLOK with default headers values

func (*GeneratedUserUploadContentURLOK) Error

func (*GeneratedUserUploadContentURLOK) GetPayload

func (*GeneratedUserUploadContentURLOK) ToJSONString

func (o *GeneratedUserUploadContentURLOK) ToJSONString() string

type GeneratedUserUploadContentURLParams

type GeneratedUserUploadContentURLParams struct {

	/*RetryPolicy*/
	RetryPolicy *utils.Retry
	/*Namespace
	  namespace, only accept alphabet and numeric

	*/
	Namespace string
	/*UserID
	  user's id, should follow UUID version 4 without hyphen

	*/
	UserID string
	/*Category
	  Upload category. Supported categories: default, reporting

	*/
	Category *string
	/*FileType
	  one of the these types: jpeg, jpg, png, bmp, gif, mp3, bin, webp, mp4, webm

	*/
	FileType string

	AuthInfoWriter runtime.ClientAuthInfoWriter
	Context        context.Context
	HTTPClient     *http.Client

	// XFlightId is an optional parameter from this SDK
	XFlightId *string
	// contains filtered or unexported fields
}

GeneratedUserUploadContentURLParams contains all the parameters to send to the API endpoint for the generated user upload content url operation typically these are written to a http.Request

func NewGeneratedUserUploadContentURLParams

func NewGeneratedUserUploadContentURLParams() *GeneratedUserUploadContentURLParams

NewGeneratedUserUploadContentURLParams creates a new GeneratedUserUploadContentURLParams object with the default values initialized.

func NewGeneratedUserUploadContentURLParamsWithContext

func NewGeneratedUserUploadContentURLParamsWithContext(ctx context.Context) *GeneratedUserUploadContentURLParams

NewGeneratedUserUploadContentURLParamsWithContext creates a new GeneratedUserUploadContentURLParams object with the default values initialized, and the ability to set a context for a request

func NewGeneratedUserUploadContentURLParamsWithHTTPClient

func NewGeneratedUserUploadContentURLParamsWithHTTPClient(client *http.Client) *GeneratedUserUploadContentURLParams

NewGeneratedUserUploadContentURLParamsWithHTTPClient creates a new GeneratedUserUploadContentURLParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGeneratedUserUploadContentURLParamsWithTimeout

func NewGeneratedUserUploadContentURLParamsWithTimeout(timeout time.Duration) *GeneratedUserUploadContentURLParams

NewGeneratedUserUploadContentURLParamsWithTimeout creates a new GeneratedUserUploadContentURLParams object with the default values initialized, and the ability to set a timeout on a request

func (*GeneratedUserUploadContentURLParams) SetAuthInfoWriter

func (o *GeneratedUserUploadContentURLParams) SetAuthInfoWriter(authInfoWriter runtime.ClientAuthInfoWriter)

SetAuthInfoWriter adds the authInfoWriter to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) SetCategory

func (o *GeneratedUserUploadContentURLParams) SetCategory(category *string)

SetCategory adds the category to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) SetContext

SetContext adds the context to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) SetFileType

func (o *GeneratedUserUploadContentURLParams) SetFileType(fileType string)

SetFileType adds the fileType to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) SetFlightId

func (o *GeneratedUserUploadContentURLParams) SetFlightId(flightId string)

SetFlightId adds the flightId as the header value for this specific endpoint

func (*GeneratedUserUploadContentURLParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) SetHTTPClientTransport

func (o *GeneratedUserUploadContentURLParams) SetHTTPClientTransport(roundTripper http.RoundTripper)

SetHTTPClient adds the HTTPClient Transport to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) SetNamespace

func (o *GeneratedUserUploadContentURLParams) SetNamespace(namespace string)

SetNamespace adds the namespace to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) SetTimeout

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

SetTimeout adds the timeout to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) SetUserID

func (o *GeneratedUserUploadContentURLParams) SetUserID(userID string)

SetUserID adds the userId to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) WithCategory

WithCategory adds the category to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) WithContext

WithContext adds the context to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) WithFileType

WithFileType adds the fileType to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) WithNamespace

WithNamespace adds the namespace to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) WithTimeout

WithTimeout adds the timeout to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) WithUserID

WithUserID adds the userID to the generated user upload content url params

func (*GeneratedUserUploadContentURLParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GeneratedUserUploadContentURLReader

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

GeneratedUserUploadContentURLReader is a Reader for the GeneratedUserUploadContentURL structure.

func (*GeneratedUserUploadContentURLReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GeneratedUserUploadContentURLUnauthorized

type GeneratedUserUploadContentURLUnauthorized struct {
	Payload *basicclientmodels.ErrorEntity
}

GeneratedUserUploadContentURLUnauthorized handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20001</td><td>unauthorized</td></tr></table>

func NewGeneratedUserUploadContentURLUnauthorized

func NewGeneratedUserUploadContentURLUnauthorized() *GeneratedUserUploadContentURLUnauthorized

NewGeneratedUserUploadContentURLUnauthorized creates a GeneratedUserUploadContentURLUnauthorized with default headers values

func (*GeneratedUserUploadContentURLUnauthorized) Error

func (*GeneratedUserUploadContentURLUnauthorized) GetPayload

func (*GeneratedUserUploadContentURLUnauthorized) ToJSONString

type PublicGeneratedUploadURLBadRequest

type PublicGeneratedUploadURLBadRequest struct {
	Payload *basicclientmodels.ValidationErrorEntity
}

PublicGeneratedUploadURLBadRequest handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20002</td><td>validation error</td></tr><tr><td>11131</td><td>Unable to {action}: File type is not supported</td></tr></table>

func NewPublicGeneratedUploadURLBadRequest

func NewPublicGeneratedUploadURLBadRequest() *PublicGeneratedUploadURLBadRequest

NewPublicGeneratedUploadURLBadRequest creates a PublicGeneratedUploadURLBadRequest with default headers values

func (*PublicGeneratedUploadURLBadRequest) Error

func (*PublicGeneratedUploadURLBadRequest) GetPayload

func (*PublicGeneratedUploadURLBadRequest) ToJSONString

func (o *PublicGeneratedUploadURLBadRequest) ToJSONString() string

type PublicGeneratedUploadURLForbidden

type PublicGeneratedUploadURLForbidden struct {
	Payload *basicclientmodels.ErrorEntity
}

PublicGeneratedUploadURLForbidden handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20013</td><td>insufficient permission</td></tr></table>

func NewPublicGeneratedUploadURLForbidden

func NewPublicGeneratedUploadURLForbidden() *PublicGeneratedUploadURLForbidden

NewPublicGeneratedUploadURLForbidden creates a PublicGeneratedUploadURLForbidden with default headers values

func (*PublicGeneratedUploadURLForbidden) Error

func (*PublicGeneratedUploadURLForbidden) GetPayload

func (*PublicGeneratedUploadURLForbidden) ToJSONString

func (o *PublicGeneratedUploadURLForbidden) ToJSONString() string

type PublicGeneratedUploadURLInternalServerError

type PublicGeneratedUploadURLInternalServerError struct {
	Payload *basicclientmodels.ErrorEntity
}

PublicGeneratedUploadURLInternalServerError handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20000</td><td>internal server error</td></tr></table>

func NewPublicGeneratedUploadURLInternalServerError

func NewPublicGeneratedUploadURLInternalServerError() *PublicGeneratedUploadURLInternalServerError

NewPublicGeneratedUploadURLInternalServerError creates a PublicGeneratedUploadURLInternalServerError with default headers values

func (*PublicGeneratedUploadURLInternalServerError) Error

func (*PublicGeneratedUploadURLInternalServerError) GetPayload

func (*PublicGeneratedUploadURLInternalServerError) ToJSONString

type PublicGeneratedUploadURLOK

type PublicGeneratedUploadURLOK struct {
	Payload *basicclientmodels.FileUploadURLInfo
}

PublicGeneratedUploadURLOK handles this case with default header values.

Successful operation

func NewPublicGeneratedUploadURLOK

func NewPublicGeneratedUploadURLOK() *PublicGeneratedUploadURLOK

NewPublicGeneratedUploadURLOK creates a PublicGeneratedUploadURLOK with default headers values

func (*PublicGeneratedUploadURLOK) Error

func (*PublicGeneratedUploadURLOK) GetPayload

func (*PublicGeneratedUploadURLOK) ToJSONString

func (o *PublicGeneratedUploadURLOK) ToJSONString() string

type PublicGeneratedUploadURLParams

type PublicGeneratedUploadURLParams struct {

	/*RetryPolicy*/
	RetryPolicy *utils.Retry
	/*Folder
	  the name of folder where the file will be uploaded, must be between 1-256 characters, all characters allowed no whitespace

	*/
	Folder string
	/*Namespace
	  namespace, only accept alphabet and numeric

	*/
	Namespace string
	/*FileType
	  one of the these types: jpeg, jpg, png, bmp, gif, mp3, bin, webp

	*/
	FileType string

	AuthInfoWriter runtime.ClientAuthInfoWriter
	Context        context.Context
	HTTPClient     *http.Client

	// XFlightId is an optional parameter from this SDK
	XFlightId *string
	// contains filtered or unexported fields
}

PublicGeneratedUploadURLParams contains all the parameters to send to the API endpoint for the public generated upload url operation typically these are written to a http.Request

func NewPublicGeneratedUploadURLParams

func NewPublicGeneratedUploadURLParams() *PublicGeneratedUploadURLParams

NewPublicGeneratedUploadURLParams creates a new PublicGeneratedUploadURLParams object with the default values initialized.

func NewPublicGeneratedUploadURLParamsWithContext

func NewPublicGeneratedUploadURLParamsWithContext(ctx context.Context) *PublicGeneratedUploadURLParams

NewPublicGeneratedUploadURLParamsWithContext creates a new PublicGeneratedUploadURLParams object with the default values initialized, and the ability to set a context for a request

func NewPublicGeneratedUploadURLParamsWithHTTPClient

func NewPublicGeneratedUploadURLParamsWithHTTPClient(client *http.Client) *PublicGeneratedUploadURLParams

NewPublicGeneratedUploadURLParamsWithHTTPClient creates a new PublicGeneratedUploadURLParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewPublicGeneratedUploadURLParamsWithTimeout

func NewPublicGeneratedUploadURLParamsWithTimeout(timeout time.Duration) *PublicGeneratedUploadURLParams

NewPublicGeneratedUploadURLParamsWithTimeout creates a new PublicGeneratedUploadURLParams object with the default values initialized, and the ability to set a timeout on a request

func (*PublicGeneratedUploadURLParams) SetAuthInfoWriter

func (o *PublicGeneratedUploadURLParams) SetAuthInfoWriter(authInfoWriter runtime.ClientAuthInfoWriter)

SetAuthInfoWriter adds the authInfoWriter to the public generated upload url params

func (*PublicGeneratedUploadURLParams) SetContext

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

SetContext adds the context to the public generated upload url params

func (*PublicGeneratedUploadURLParams) SetFileType

func (o *PublicGeneratedUploadURLParams) SetFileType(fileType string)

SetFileType adds the fileType to the public generated upload url params

func (*PublicGeneratedUploadURLParams) SetFlightId

func (o *PublicGeneratedUploadURLParams) SetFlightId(flightId string)

SetFlightId adds the flightId as the header value for this specific endpoint

func (*PublicGeneratedUploadURLParams) SetFolder

func (o *PublicGeneratedUploadURLParams) SetFolder(folder string)

SetFolder adds the folder to the public generated upload url params

func (*PublicGeneratedUploadURLParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the public generated upload url params

func (*PublicGeneratedUploadURLParams) SetHTTPClientTransport

func (o *PublicGeneratedUploadURLParams) SetHTTPClientTransport(roundTripper http.RoundTripper)

SetHTTPClient adds the HTTPClient Transport to the public generated upload url params

func (*PublicGeneratedUploadURLParams) SetNamespace

func (o *PublicGeneratedUploadURLParams) SetNamespace(namespace string)

SetNamespace adds the namespace to the public generated upload url params

func (*PublicGeneratedUploadURLParams) SetTimeout

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

SetTimeout adds the timeout to the public generated upload url params

func (*PublicGeneratedUploadURLParams) WithContext

WithContext adds the context to the public generated upload url params

func (*PublicGeneratedUploadURLParams) WithFileType

WithFileType adds the fileType to the public generated upload url params

func (*PublicGeneratedUploadURLParams) WithFolder

WithFolder adds the folder to the public generated upload url params

func (*PublicGeneratedUploadURLParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the public generated upload url params

func (*PublicGeneratedUploadURLParams) WithNamespace

WithNamespace adds the namespace to the public generated upload url params

func (*PublicGeneratedUploadURLParams) WithTimeout

WithTimeout adds the timeout to the public generated upload url params

func (*PublicGeneratedUploadURLParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type PublicGeneratedUploadURLReader

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

PublicGeneratedUploadURLReader is a Reader for the PublicGeneratedUploadURL structure.

func (*PublicGeneratedUploadURLReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type PublicGeneratedUploadURLUnauthorized

type PublicGeneratedUploadURLUnauthorized struct {
	Payload *basicclientmodels.ErrorEntity
}

PublicGeneratedUploadURLUnauthorized handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20001</td><td>unauthorized</td></tr></table>

func NewPublicGeneratedUploadURLUnauthorized

func NewPublicGeneratedUploadURLUnauthorized() *PublicGeneratedUploadURLUnauthorized

NewPublicGeneratedUploadURLUnauthorized creates a PublicGeneratedUploadURLUnauthorized with default headers values

func (*PublicGeneratedUploadURLUnauthorized) Error

func (*PublicGeneratedUploadURLUnauthorized) GetPayload

func (*PublicGeneratedUploadURLUnauthorized) ToJSONString

func (o *PublicGeneratedUploadURLUnauthorized) ToJSONString() string

type PublicGeneratedUserUploadContentURLBadRequest

type PublicGeneratedUserUploadContentURLBadRequest struct {
	Payload *basicclientmodels.ValidationErrorEntity
}

PublicGeneratedUserUploadContentURLBadRequest handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20002</td><td>validation error</td></tr><tr><td>11121</td><td>Unable to {action}: category {category} is not valid</td></tr><tr><td>11131</td><td>Unable to {action}: File type is not supported</td></tr></table>

func NewPublicGeneratedUserUploadContentURLBadRequest

func NewPublicGeneratedUserUploadContentURLBadRequest() *PublicGeneratedUserUploadContentURLBadRequest

NewPublicGeneratedUserUploadContentURLBadRequest creates a PublicGeneratedUserUploadContentURLBadRequest with default headers values

func (*PublicGeneratedUserUploadContentURLBadRequest) Error

func (*PublicGeneratedUserUploadContentURLBadRequest) GetPayload

func (*PublicGeneratedUserUploadContentURLBadRequest) ToJSONString

type PublicGeneratedUserUploadContentURLConflict

type PublicGeneratedUserUploadContentURLConflict struct {
	Payload *basicclientmodels.ErrorEntity
}

PublicGeneratedUserUploadContentURLConflict handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>11132</td><td>Unable to {action}: file storage exceed limitation, user ID: {userId}, namespace: {namespace}</td></tr></table>

func NewPublicGeneratedUserUploadContentURLConflict

func NewPublicGeneratedUserUploadContentURLConflict() *PublicGeneratedUserUploadContentURLConflict

NewPublicGeneratedUserUploadContentURLConflict creates a PublicGeneratedUserUploadContentURLConflict with default headers values

func (*PublicGeneratedUserUploadContentURLConflict) Error

func (*PublicGeneratedUserUploadContentURLConflict) GetPayload

func (*PublicGeneratedUserUploadContentURLConflict) ToJSONString

type PublicGeneratedUserUploadContentURLForbidden

type PublicGeneratedUserUploadContentURLForbidden struct {
	Payload *basicclientmodels.ErrorEntity
}

PublicGeneratedUserUploadContentURLForbidden handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20013</td><td>insufficient permission</td></tr></table>

func NewPublicGeneratedUserUploadContentURLForbidden

func NewPublicGeneratedUserUploadContentURLForbidden() *PublicGeneratedUserUploadContentURLForbidden

NewPublicGeneratedUserUploadContentURLForbidden creates a PublicGeneratedUserUploadContentURLForbidden with default headers values

func (*PublicGeneratedUserUploadContentURLForbidden) Error

func (*PublicGeneratedUserUploadContentURLForbidden) GetPayload

func (*PublicGeneratedUserUploadContentURLForbidden) ToJSONString

type PublicGeneratedUserUploadContentURLInternalServerError

type PublicGeneratedUserUploadContentURLInternalServerError struct {
	Payload *basicclientmodels.ErrorEntity
}

PublicGeneratedUserUploadContentURLInternalServerError handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20000</td><td>internal server error</td></tr></table>

func NewPublicGeneratedUserUploadContentURLInternalServerError

func NewPublicGeneratedUserUploadContentURLInternalServerError() *PublicGeneratedUserUploadContentURLInternalServerError

NewPublicGeneratedUserUploadContentURLInternalServerError creates a PublicGeneratedUserUploadContentURLInternalServerError with default headers values

func (*PublicGeneratedUserUploadContentURLInternalServerError) Error

func (*PublicGeneratedUserUploadContentURLInternalServerError) GetPayload

func (*PublicGeneratedUserUploadContentURLInternalServerError) ToJSONString

type PublicGeneratedUserUploadContentURLOK

type PublicGeneratedUserUploadContentURLOK struct {
	Payload *basicclientmodels.FileUploadURLInfo
}

PublicGeneratedUserUploadContentURLOK handles this case with default header values.

Successful operation

func NewPublicGeneratedUserUploadContentURLOK

func NewPublicGeneratedUserUploadContentURLOK() *PublicGeneratedUserUploadContentURLOK

NewPublicGeneratedUserUploadContentURLOK creates a PublicGeneratedUserUploadContentURLOK with default headers values

func (*PublicGeneratedUserUploadContentURLOK) Error

func (*PublicGeneratedUserUploadContentURLOK) GetPayload

func (*PublicGeneratedUserUploadContentURLOK) ToJSONString

type PublicGeneratedUserUploadContentURLParams

type PublicGeneratedUserUploadContentURLParams struct {

	/*RetryPolicy*/
	RetryPolicy *utils.Retry
	/*Namespace
	  namespace, only accept alphabet and numeric

	*/
	Namespace string
	/*UserID
	  user's id, should follow UUID version 4 without hyphen

	*/
	UserID string
	/*Category
	  Upload category. Supported categories: default, reporting

	*/
	Category *string
	/*FileType
	  one of the these types: jpeg, jpg, png, bmp, gif, mp3, bin, webp

	*/
	FileType string

	AuthInfoWriter runtime.ClientAuthInfoWriter
	Context        context.Context
	HTTPClient     *http.Client

	// XFlightId is an optional parameter from this SDK
	XFlightId *string
	// contains filtered or unexported fields
}

PublicGeneratedUserUploadContentURLParams contains all the parameters to send to the API endpoint for the public generated user upload content url operation typically these are written to a http.Request

func NewPublicGeneratedUserUploadContentURLParams

func NewPublicGeneratedUserUploadContentURLParams() *PublicGeneratedUserUploadContentURLParams

NewPublicGeneratedUserUploadContentURLParams creates a new PublicGeneratedUserUploadContentURLParams object with the default values initialized.

func NewPublicGeneratedUserUploadContentURLParamsWithContext

func NewPublicGeneratedUserUploadContentURLParamsWithContext(ctx context.Context) *PublicGeneratedUserUploadContentURLParams

NewPublicGeneratedUserUploadContentURLParamsWithContext creates a new PublicGeneratedUserUploadContentURLParams object with the default values initialized, and the ability to set a context for a request

func NewPublicGeneratedUserUploadContentURLParamsWithHTTPClient

func NewPublicGeneratedUserUploadContentURLParamsWithHTTPClient(client *http.Client) *PublicGeneratedUserUploadContentURLParams

NewPublicGeneratedUserUploadContentURLParamsWithHTTPClient creates a new PublicGeneratedUserUploadContentURLParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewPublicGeneratedUserUploadContentURLParamsWithTimeout

func NewPublicGeneratedUserUploadContentURLParamsWithTimeout(timeout time.Duration) *PublicGeneratedUserUploadContentURLParams

NewPublicGeneratedUserUploadContentURLParamsWithTimeout creates a new PublicGeneratedUserUploadContentURLParams object with the default values initialized, and the ability to set a timeout on a request

func (*PublicGeneratedUserUploadContentURLParams) SetAuthInfoWriter

func (o *PublicGeneratedUserUploadContentURLParams) SetAuthInfoWriter(authInfoWriter runtime.ClientAuthInfoWriter)

SetAuthInfoWriter adds the authInfoWriter to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) SetCategory

func (o *PublicGeneratedUserUploadContentURLParams) SetCategory(category *string)

SetCategory adds the category to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) SetContext

SetContext adds the context to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) SetFileType

func (o *PublicGeneratedUserUploadContentURLParams) SetFileType(fileType string)

SetFileType adds the fileType to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) SetFlightId

func (o *PublicGeneratedUserUploadContentURLParams) SetFlightId(flightId string)

SetFlightId adds the flightId as the header value for this specific endpoint

func (*PublicGeneratedUserUploadContentURLParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) SetHTTPClientTransport

func (o *PublicGeneratedUserUploadContentURLParams) SetHTTPClientTransport(roundTripper http.RoundTripper)

SetHTTPClient adds the HTTPClient Transport to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) SetNamespace

func (o *PublicGeneratedUserUploadContentURLParams) SetNamespace(namespace string)

SetNamespace adds the namespace to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) SetTimeout

SetTimeout adds the timeout to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) SetUserID

SetUserID adds the userId to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) WithCategory

WithCategory adds the category to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) WithContext

WithContext adds the context to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) WithFileType

WithFileType adds the fileType to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) WithNamespace

WithNamespace adds the namespace to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) WithTimeout

WithTimeout adds the timeout to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) WithUserID

WithUserID adds the userID to the public generated user upload content url params

func (*PublicGeneratedUserUploadContentURLParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type PublicGeneratedUserUploadContentURLReader

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

PublicGeneratedUserUploadContentURLReader is a Reader for the PublicGeneratedUserUploadContentURL structure.

func (*PublicGeneratedUserUploadContentURLReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type PublicGeneratedUserUploadContentURLUnauthorized

type PublicGeneratedUserUploadContentURLUnauthorized struct {
	Payload *basicclientmodels.ErrorEntity
}

PublicGeneratedUserUploadContentURLUnauthorized handles this case with default header values.

<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20001</td><td>unauthorized</td></tr></table>

func NewPublicGeneratedUserUploadContentURLUnauthorized

func NewPublicGeneratedUserUploadContentURLUnauthorized() *PublicGeneratedUserUploadContentURLUnauthorized

NewPublicGeneratedUserUploadContentURLUnauthorized creates a PublicGeneratedUserUploadContentURLUnauthorized with default headers values

func (*PublicGeneratedUserUploadContentURLUnauthorized) Error

func (*PublicGeneratedUserUploadContentURLUnauthorized) GetPayload

func (*PublicGeneratedUserUploadContentURLUnauthorized) ToJSONString

Jump to

Keyboard shortcuts

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