Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlistStorageConfig ¶
type AlistStorageConfig struct {
BaseConfig
URL string `toml:"url" mapstructure:"url" json:"url"`
Username string `toml:"username" mapstructure:"username" json:"username"`
Password string `toml:"password" mapstructure:"password" json:"password"`
Token string `toml:"token" mapstructure:"token" json:"token"`
BasePath string `toml:"base_path" mapstructure:"base_path" json:"base_path"`
TokenExp int64 `toml:"token_exp" mapstructure:"token_exp" json:"token_exp"`
}
func (*AlistStorageConfig) GetName ¶
func (a *AlistStorageConfig) GetName() string
func (*AlistStorageConfig) GetType ¶
func (a *AlistStorageConfig) GetType() storenum.StorageType
func (*AlistStorageConfig) Validate ¶
func (a *AlistStorageConfig) Validate() error
type BaseConfig ¶
type LocalStorageConfig ¶
type LocalStorageConfig struct {
BaseConfig
BasePath string `toml:"base_path" mapstructure:"base_path" json:"base_path"`
}
func (*LocalStorageConfig) GetName ¶
func (l *LocalStorageConfig) GetName() string
func (*LocalStorageConfig) GetType ¶
func (l *LocalStorageConfig) GetType() storenum.StorageType
func (*LocalStorageConfig) Validate ¶
func (l *LocalStorageConfig) Validate() error
type MinioStorageConfig ¶
type MinioStorageConfig struct {
BaseConfig
Endpoint string `toml:"endpoint" mapstructure:"endpoint" json:"endpoint"`
AccessKeyID string `toml:"access_key_id" mapstructure:"access_key_id" json:"access_key_id"`
SecretAccessKey string `toml:"secret_access_key" mapstructure:"secret_access_key" json:"secret_access_key"`
BucketName string `toml:"bucket_name" mapstructure:"bucket_name" json:"bucket_name"`
UseSSL bool `toml:"use_ssl" mapstructure:"use_ssl" json:"use_ssl"`
BasePath string `toml:"base_path" mapstructure:"base_path" json:"base_path"`
}
func (*MinioStorageConfig) GetName ¶
func (m *MinioStorageConfig) GetName() string
func (*MinioStorageConfig) GetType ¶
func (m *MinioStorageConfig) GetType() storenum.StorageType
func (*MinioStorageConfig) Validate ¶
func (m *MinioStorageConfig) Validate() error
type RcloneStorageConfig ¶ added in v0.54.0
type RcloneStorageConfig struct {
BaseConfig
// The name of the remote as defined in rclone config
Remote string `toml:"remote" mapstructure:"remote" json:"remote"`
BasePath string `toml:"base_path" mapstructure:"base_path" json:"base_path"`
// The path to the rclone config file, if not using the default
ConfigPath string `toml:"config_path" mapstructure:"config_path" json:"config_path"`
// Additional flags to pass to rclone commands
Flags []string `toml:"flags" mapstructure:"flags" json:"flags"`
}
func (*RcloneStorageConfig) GetName ¶ added in v0.54.0
func (r *RcloneStorageConfig) GetName() string
func (*RcloneStorageConfig) GetType ¶ added in v0.54.0
func (r *RcloneStorageConfig) GetType() storenum.StorageType
func (*RcloneStorageConfig) Validate ¶ added in v0.54.0
func (r *RcloneStorageConfig) Validate() error
type S3StorageConfig ¶ added in v0.41.0
type S3StorageConfig struct {
BaseConfig
Endpoint string `toml:"endpoint" mapstructure:"endpoint" json:"endpoint"`
AccessKeyID string `toml:"access_key_id" mapstructure:"access_key_id" json:"access_key_id"`
SecretAccessKey string `toml:"secret_access_key" mapstructure:"secret_access_key" json:"secret_access_key"`
BucketName string `toml:"bucket_name" mapstructure:"bucket_name" json:"bucket_name"`
UseSSL bool `toml:"use_ssl" mapstructure:"use_ssl" json:"use_ssl"`
BasePath string `toml:"base_path" mapstructure:"base_path" json:"base_path"`
Region string `toml:"region" mapstructure:"region" json:"region"`
VirtualHost bool `toml:"virtual_host" mapstructure:"virtual_host" json:"virtual_host"`
}
func (*S3StorageConfig) GetName ¶ added in v0.41.0
func (m *S3StorageConfig) GetName() string
func (*S3StorageConfig) GetType ¶ added in v0.41.0
func (m *S3StorageConfig) GetType() storenum.StorageType
func (*S3StorageConfig) Validate ¶ added in v0.41.0
func (m *S3StorageConfig) Validate() error
type StorageConfig ¶
type StorageConfig interface {
Validate() error
GetType() storenum.StorageType
GetName() string
}
func LoadStorageConfigs ¶
func LoadStorageConfigs(v *viper.Viper) ([]StorageConfig, error)
type TelegramStorageConfig ¶ added in v0.23.0
type TelegramStorageConfig struct {
BaseConfig
ChatID int64 `toml:"chat_id" mapstructure:"chat_id" json:"chat_id"`
ForceFile bool `toml:"force_file" mapstructure:"force_file" json:"force_file"`
RateLimit int `toml:"rate_limit" mapstructure:"rate_limit" json:"rate_limit"`
RateBurst int `toml:"rate_burst" mapstructure:"rate_burst" json:"rate_burst"`
SkipLarge bool `toml:"skip_large" mapstructure:"skip_large" json:"skip_large"` // skip files larger than Telegram limit(2GB)
// split files larger than Telegram limit(2GB) into parts of specified size, in MB, leave 0 to set default(2000MB)
// only effective when SkipLarge is false
// use zip when splitting
SplitSizeMB int64 `toml:"split_size_mb" mapstructure:"split_size_mb" json:"split_size_mb"`
}
func (*TelegramStorageConfig) GetName ¶ added in v0.23.0
func (m *TelegramStorageConfig) GetName() string
func (*TelegramStorageConfig) GetType ¶ added in v0.23.0
func (m *TelegramStorageConfig) GetType() storenum.StorageType
func (*TelegramStorageConfig) Validate ¶ added in v0.23.0
func (m *TelegramStorageConfig) Validate() error
type WebdavStorageConfig ¶
type WebdavStorageConfig struct {
BaseConfig
URL string `toml:"url" mapstructure:"url" json:"url"`
Username string `toml:"username" mapstructure:"username" json:"username"`
Password string `toml:"password" mapstructure:"password" json:"password"`
BasePath string `toml:"base_path" mapstructure:"base_path" json:"base_path"`
}
func (*WebdavStorageConfig) GetName ¶
func (w *WebdavStorageConfig) GetName() string
func (*WebdavStorageConfig) GetType ¶
func (w *WebdavStorageConfig) GetType() storenum.StorageType
func (*WebdavStorageConfig) Validate ¶
func (w *WebdavStorageConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.