Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrAlreadyExists = errors.New("already exists") ErrFileKeyEmpty = errors.New("file uploading key cannot be empty") ErrInvalidTotalParts = errors.New("total parts must be greater than zero and not more than 10000") )
Predefined errors.
Functions ¶
This section is empty.
Types ¶
type CompletedPart ¶
CompletedPart represents a part of a multipart upload.
type DB ¶
type DB interface { // CreateUpload creates a new multipart upload. CreateUpload(key string, uploadID string, totalParts int64) error // AddPart adds a new part to the multipart upload. AddPart(key string, partNumber int64, etag string) error // CompleteUpload completes the multipart upload. CompleteUpload(key string) error // AbortUpload aborts the multipart upload. AbortUpload(key string) error // GetUploadID returns the upload ID for the given key. GetUploadID(key string) (string, error) // GetParts returns the parts for the given key. GetParts(key string) ([]CompletedPart, error) // GetStatus returns the status of the given key. GetStatus(key string) (UploadStatus, error) }
DB is the interface for the storage database. The database is used to store the status of multipart uploads.
type UploadStatus ¶
UploadStatus represents the status of a multipart upload.
Click to show internal directories.
Click to hide internal directories.