Documentation
¶
Index ¶
Constants ¶
View Source
const ( TypeMinio = StorageType("minio") TypeDisk = StorageType("disk") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface {
// Put a file to storage.
//
// Errors:
//
// - `codes.CodeStorageNoFile`: if failed to put file to storage.
Put(ctx context.Context, params PutParams) (PutResult, error)
// Delete data from storage.
//
// Errors:
//
// - `codes.CodeStorageDelFailure`: if cannot delete file.
Del(ctx context.Context, params DelParams) error
// Generate url based on given full path of file.
//
// Errors:
//
// - `codes.CodeStorageGenerateURLFailure`: if failed on generate url.
Url(ctx context.Context, params UrlParams) (UrlResult, error)
}
type StorageType ¶ added in v0.0.25
type StorageType string
Click to show internal directories.
Click to hide internal directories.