Documentation ¶
Index ¶
- type File
- func (f *File) BucketExists(name string) (bool, error)
- func (f *File) Connect(cfg config.Provider) (err error)
- func (f *File) CreateBucket(name string, location ...string) error
- func (f *File) CreateBucketIfNotExists(name string, location ...string) (err error)
- func (f *File) DeleteObject(bucketName, objectName string) error
- func (f *File) GetObject(bucketName string, objectName string) (io.ReadCloser, int64, error)
- func (f *File) PutObject(bucketName string, objectName string, reader io.Reader, objectSize int64, ...) (err error)
- func (f *File) Status() error
- type Minio
- func (m *Minio) BucketExists(name string) (bool, error)
- func (m *Minio) Connect(cfg config.Provider) (err error)
- func (m *Minio) CreateBucket(name string, location ...string) error
- func (m *Minio) CreateBucketIfNotExists(name string, location ...string) (err error)
- func (m *Minio) DeleteObject(bucketName, objectName string) error
- func (m *Minio) GetObject(bucketName, objectName string) (io.ReadCloser, int64, error)
- func (m *Minio) PutObject(bucketName, objectName string, reader io.Reader, objectSize int64, ...) (err error)
- func (m *Minio) Status() error
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 (*File) CreateBucketIfNotExists ¶
func (*File) DeleteObject ¶
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 (*Minio) CreateBucketIfNotExists ¶
func (*Minio) DeleteObject ¶
type Storage ¶
type Storage interface { Connect(cfg config.Provider) error Status() error 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 }
Storage interface provides functionalities to access an object storage driver.
Click to show internal directories.
Click to hide internal directories.