Documentation
¶
Index ¶
- Variables
- func CreateMultiFormFile(writer *multipart.Writer, fieldName string, file *File, multiple bool) error
- func CreateUpdateMultiForm(file *File) (io.Reader, string, error)
- func CreateUploadMultiForm(files ...*File) (io.Reader, string, error)
- func WithMetadata(metdata map[string]any) func(file *File)
- func WithUUID(id string) func(file *File)
- type APIResponseError
- type Client
- func (c *Client) DeleteFile(ctx context.Context, fileID string) error
- func (c *Client) GetFile(ctx context.Context, fileID string, opts ...GetFileInformationOpt) (*FileInformationHeaderWithReader, error)
- func (c *Client) GetFileInformation(ctx context.Context, fileID string, opts ...GetFileInformationOpt) (*FileInformationHeader, error)
- func (c *Client) GetFilePresignedURL(ctx context.Context, fileID string) (*controller.GetFilePresignedURLResponse, error)
- func (c *Client) UpdateFile(ctx context.Context, fileID string, file *File) (*controller.UpdateFileResponse, error)
- func (c *Client) UploadFile(ctx context.Context, files ...*File) (*controller.UploadFileResponse, error)
- type File
- type FileInformationHeader
- type FileInformationHeaderWithReader
- type GetFileInformationOpt
- func WithIfMatch(etags ...string) GetFileInformationOpt
- func WithIfModifiedSince(modifiedSince string) GetFileInformationOpt
- func WithIfUnmodifiedSince(modifiedSince string) GetFileInformationOpt
- func WithImageBlur(blur int) GetFileInformationOpt
- func WithImageQuality(quality int) GetFileInformationOpt
- func WithImageSize(newSizeX, newSizeY int) GetFileInformationOpt
- func WithNoneMatch(etags ...string) GetFileInformationOpt
- func WithRange(rangeV string) GetFileInformationOpt
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoFiles = errors.New("no files specified") ErrFilenameNotFound = errors.New("file not found in content-disposition") )
Functions ¶
func CreateMultiFormFile ¶
func WithMetadata ¶ added in v0.4.0
Types ¶
type APIResponseError ¶
type APIResponseError struct { StatusCode int `json:"statusCode"` *controller.ErrorResponse Response interface{} `json:"response"` }
func (*APIResponseError) Error ¶
func (err *APIResponseError) Error() string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DeleteFile ¶
func (*Client) GetFile ¶
func (c *Client) GetFile( ctx context.Context, fileID string, opts ...GetFileInformationOpt, ) (*FileInformationHeaderWithReader, error)
func (*Client) GetFileInformation ¶
func (c *Client) GetFileInformation( ctx context.Context, fileID string, opts ...GetFileInformationOpt, ) (*FileInformationHeader, error)
func (*Client) GetFilePresignedURL ¶
func (c *Client) GetFilePresignedURL( ctx context.Context, fileID string, ) (*controller.GetFilePresignedURLResponse, error)
func (*Client) UpdateFile ¶
func (c *Client) UpdateFile( ctx context.Context, fileID string, file *File, ) (*controller.UpdateFileResponse, error)
func (*Client) UploadFile ¶
func (c *Client) UploadFile( ctx context.Context, files ...*File, ) (*controller.UploadFileResponse, error)
type FileInformationHeader ¶
type FileInformationHeaderWithReader ¶
type FileInformationHeaderWithReader struct { *FileInformationHeader Filename string Body io.ReadCloser }
type GetFileInformationOpt ¶
func WithIfMatch ¶
func WithIfMatch(etags ...string) GetFileInformationOpt
func WithIfModifiedSince ¶
func WithIfModifiedSince(modifiedSince string) GetFileInformationOpt
func WithIfUnmodifiedSince ¶
func WithIfUnmodifiedSince(modifiedSince string) GetFileInformationOpt
func WithImageBlur ¶
func WithImageBlur(blur int) GetFileInformationOpt
func WithImageQuality ¶
func WithImageQuality(quality int) GetFileInformationOpt
func WithImageSize ¶
func WithImageSize(newSizeX, newSizeY int) GetFileInformationOpt
func WithNoneMatch ¶
func WithNoneMatch(etags ...string) GetFileInformationOpt
func WithRange ¶ added in v0.2.0
func WithRange(rangeV string) GetFileInformationOpt
Click to show internal directories.
Click to hide internal directories.