Documentation ¶
Index ¶
- type AdapatersConfig
- type ApiKeyStorageConfig
- type Config
- type FileStorageConfig
- type FilesystemStorage
- type FilesystemStorageConfig
- type HttpApiConfig
- type MediaStorageConfig
- type MetadataStorageConfig
- type NamedTransforationStorageConfig
- type RedisAdapterConfig
- type S3AdapterConfig
- type S3StorageConfig
- type ServerConfig
- type StorageConfig
- type TaskStorageConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapatersConfig ¶
type AdapatersConfig struct { S3 *S3AdapterConfig `yaml:"s3,omitempty"` Redis *RedisAdapterConfig `yaml:"redis,omitempty"` }
type ApiKeyStorageConfig ¶
type Config ¶
type Config struct { MasterKey string `yaml:"-"` Server ServerConfig `yaml:"api,omitempty" validate:"required"` Storage StorageConfig `yaml:"storage,omitempty" validate:"required"` Adapters AdapatersConfig `yaml:"adapter,omitempty" validate:"required"` }
type FileStorageConfig ¶
type FileStorageConfig struct { FilesystemStorageConfig *FilesystemStorageConfig `yaml:"filesystem,omitempty"` S3StorageConfig *S3StorageConfig `yaml:"s3,omitempty"` }
type FilesystemStorage ¶
type FilesystemStorage struct { }
func NewFilesystemStorage ¶
func NewFilesystemStorage() FilesystemStorage
func (*FilesystemStorage) LoadConfig ¶
func (c *FilesystemStorage) LoadConfig() (*Config, error)
func (*FilesystemStorage) SaveConfig ¶
func (c *FilesystemStorage) SaveConfig(config *Config) error
type FilesystemStorageConfig ¶
type FilesystemStorageConfig struct {
MountDir string `yaml:"mount_dir,omitempty" validate:"required"`
}
type HttpApiConfig ¶
type MediaStorageConfig ¶
type MediaStorageConfig struct { FileStorage FileStorageConfig `yaml:"file" validate:"required"` CacheStorage FileStorageConfig `yaml:"cache" validate:"required"` MetadataStorage MetadataStorageConfig `yaml:"metadata" validate:"required"` }
type MetadataStorageConfig ¶
type MetadataStorageConfig struct {
Redis *string `yaml:"redis"`
}
type RedisAdapterConfig ¶
type S3AdapterConfig ¶
type S3AdapterConfig struct { AccessKeyId string `yaml:"access_key_id,omitempty" validate:"required"` SecretAccessKey string `yaml:"secret_access_key,omitempty" validate:"required"` Endpoint string `yaml:"endpoint,omitempty" validate:"required"` Region string `yaml:"region,omitempty" validate:"required"` }
type S3StorageConfig ¶
type S3StorageConfig struct {
Bucket string `yaml:"bucket,omitempty" validate:"required"`
}
type ServerConfig ¶
type ServerConfig struct {
HttpApiConfig HttpApiConfig `yaml:"http,omitempty" validate:"required"`
}
type StorageConfig ¶
type StorageConfig struct { MediaStorage MediaStorageConfig `yaml:"media" validate:"required"` NamedTransforationStorage NamedTransforationStorageConfig `yaml:"named_transformation" validate:"required"` ApiKeyStorage ApiKeyStorageConfig `yaml:"apikey" validate:"required"` TaskStorage TaskStorageConfig `yaml:"task" validate:"required"` }
type TaskStorageConfig ¶
Click to show internal directories.
Click to hide internal directories.