Documentation ¶
Index ¶
- Variables
- type File
- func (t *File) BucketExists(name string) (bool, error)
- func (t *File) CreateBucket(name string, location ...string) error
- func (t *File) CreateBucketIfNotExists(name string, location ...string) error
- func (t *File) DeleteObject(bucketName, objectName string) error
- func (t *File) GetObject(bucketName string, objectName string) (io.ReadCloser, int64, error)
- func (t *File) PutObject(bucketName string, objectName string, reader io.Reader, objectSize int64, ...) error
- type FileConfig
- type IStorage
- type Minio
- func (t *Minio) BucketExists(name string) (bool, error)
- func (t *Minio) CreateBucket(name string, location ...string) error
- func (t *Minio) CreateBucketIfNotExists(name string, location ...string) error
- func (t *Minio) DeleteObject(bucketName, objectName string) error
- func (t *Minio) GetObject(bucketName, objectName string) (io.ReadCloser, int64, error)
- func (t *Minio) PutObject(bucketName string, objectName string, reader io.Reader, objectSize int64, ...) error
- type MinioConfig
- type StorageConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnsupportedProviderType = errors.New("unsupported storage provider type")
)
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File implements the Storage interface for a local file storage provider.
func NewFile ¶
func NewFile(c FileConfig) (*File, error)
func (*File) CreateBucketIfNotExists ¶
func (*File) DeleteObject ¶
type FileConfig ¶
type FileConfig struct {
BasePath string
}
type IStorage ¶
type IStorage interface { BucketExists(name string) (bool, error) CreateBucket(name string, location ...string) error CreateBucketIfNotExists(name string, location ...string) error PutObject(bucketName, objectName string, reader io.Reader, objectSize int64, mimeType string) error GetObject(bucketName, objectName string) (io.ReadCloser, int64, error) DeleteObject(bucketName, objectName string) error }
func New ¶
func New(c StorageConfig) (IStorage, error)
type Minio ¶
type Minio struct {
// contains filtered or unexported fields
}
Minio implements the Storage interface for the MinIO SDK to connect to a MinIO instance, Amazon S3 or Google Cloud.
func NewMinio ¶
func NewMinio(c MinioConfig) (*Minio, error)
func (*Minio) CreateBucketIfNotExists ¶
func (*Minio) DeleteObject ¶
type MinioConfig ¶
type StorageConfig ¶
type StorageConfig struct { Type string Minio MinioConfig File FileConfig }
Click to show internal directories.
Click to hide internal directories.