Documentation ¶
Index ¶
- Variables
- func New(ctx context.Context, conf StorageConfig) (domain.Storager, error)
- type Minio
- func (m *Minio) Get(ctx context.Context, album uint64, image uint64) (model.File, error)
- func (m *Minio) Health(ctx context.Context) (bool, error)
- func (m *Minio) Put(ctx context.Context, album uint64, image uint64, f model.File) (string, error)
- func (m *Minio) Remove(ctx context.Context, album uint64, image uint64) error
- func (m *Minio) Reset() error
- type MinioConfig
- type Mock
- type StorageConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultMinioConfig = MinioConfig{ Host: "localhost", Port: "9000", AccessKey: "12345678", SecretKey: "qwertyui", Token: "", Secure: false, RetryTimes: 4, RetryPause: 5 * time.Second, Timeout: 30 * time.Second, Location: "eu-central-1", Prefix: "", } )
Functions ¶
Types ¶
type Minio ¶
type Minio struct {
// contains filtered or unexported fields
}
type MinioConfig ¶
type MinioConfig struct { Host string `mapstructure:"STORAGE_MINIO_HOST" validate:"required"` Port string `mapstructure:"STORAGE_MINIO_PORT" validate:"required"` AccessKey string `mapstructure:"STORAGE_MINIO_ACCESS_KEY" validate:"required"` SecretKey string `mapstructure:"STORAGE_MINIO_SECRET_KEY" validate:"required"` Token string `mapstructure:"STORAGE_MINIO_TOKEN"` Secure bool `mapstructure:"STORAGE_MINIO_SECURE"` RetryTimes int `mapstructure:"STORAGE_MINIO_RETRY_TIMES" validate:"required"` RetryPause time.Duration `mapstructure:"STORAGE_MINIO_RETRY_PAUSE" validate:"required"` Timeout time.Duration `mapstructure:"STORAGE_MINIO_TIMEOUT" validate:"required"` Location string `mapstructure:"STORAGE_MINIO_LOCATION" validate:"required"` Prefix string `mapstructure:"STORAGE_MINIO_PREFIX"` }
type StorageConfig ¶
type StorageConfig struct { Storage string `mapstructure:"APP_STORAGE" validate:"required"` Minio MinioConfig `mapstructure:",squash"` }
Click to show internal directories.
Click to hide internal directories.