Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MinioConfig ¶
type MinioConfig struct { BucketName string AccID string SecretKey string Region string Endpoint string }
MinioConfig is config for minio storage.
type MinioStorage ¶
type MinioStorage struct {
// contains filtered or unexported fields
}
MinioStorage holds config and minio client.
func NewMinio ¶
func NewMinio(conf *MinioConfig) (*MinioStorage, error)
NewMinio is constructor for MinioStorage.
func (*MinioStorage) DownloadImageFromID ¶
func (m *MinioStorage) DownloadImageFromID(fileID string) (string, error)
DownloadImageFromID downloads image from image id.
func (*MinioStorage) UploadFile ¶
func (m *MinioStorage) UploadFile(image io.ReadSeeker, fileID string) error
UploadFile uploads file to minio bucket.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage holds config and s3 methods.
func (*Storage) DownloadImageFromID ¶
DownloadImageFromID downloads image from image id.
func (*Storage) UploadFile ¶
func (s *Storage) UploadFile(image io.ReadSeeker, fileID string) error
UploadFile uploads file to aws s3 bucket.
type StoragesInterface ¶
type StoragesInterface interface { UploadFile(image io.ReadSeeker, fileID string) error DownloadImageFromID(fileID string) (string, error) }
StoragesInterface contains all minio and aws s3 methods.
Click to show internal directories.
Click to hide internal directories.