Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileManager ¶
type FileManager struct {
// contains filtered or unexported fields
}
func Init ¶
func Init(config ...StorageConfig) (*FileManager, error)
type Storage ¶
type Storage interface {
Upload(ctx context.Context, file []byte, key string, options ...types.UploadOptions) (string, error)
Download(ctx context.Context, key, filePath string) error
}
func GetStorage ¶
type StorageConfig ¶
type StorageConfig struct {
Type StorageType
Bucket string
Region string
}
type StorageType ¶
type StorageType string
const ( StorageDiskLocal StorageType = "local" StorageDiskS3 StorageType = "s3" )
Click to show internal directories.
Click to hide internal directories.