Documentation
¶
Index ¶
Constants ¶
View Source
const (
GitRepo = "krau/SaveAny-Bot"
)
Variables ¶
View Source
var ( Version string = "dev" BuildTime string = "unknown" GitCommit string = "unknown" Docker string = "false" // whether built inside Docker )
inject version by '-X' flag go build -ldflags "-X github.com/krau/SaveAny-Bot/config.Version=${{ env.VERSION }}"
Functions ¶
Types ¶
type Config ¶
type Config struct {
Lang string `toml:"lang" mapstructure:"lang" json:"lang"`
Workers int `toml:"workers" mapstructure:"workers"`
Retry int `toml:"retry" mapstructure:"retry"`
NoCleanCache bool `toml:"no_clean_cache" mapstructure:"no_clean_cache" json:"no_clean_cache"`
Threads int `toml:"threads" mapstructure:"threads" json:"threads"`
Stream bool `toml:"stream" mapstructure:"stream" json:"stream"`
Proxy string `toml:"proxy" mapstructure:"proxy" json:"proxy"`
Cache cacheConfig `toml:"cache" mapstructure:"cache" json:"cache"`
Users []userConfig `toml:"users" mapstructure:"users" json:"users"`
Temp tempConfig `toml:"temp" mapstructure:"temp"`
DB dbConfig `toml:"db" mapstructure:"db"`
Telegram telegramConfig `toml:"telegram" mapstructure:"telegram"`
Storages []storage.StorageConfig `toml:"-" mapstructure:"-" json:"storages"`
Parser parserConfig `toml:"parser" mapstructure:"parser" json:"parser"`
Hook hookConfig `toml:"hook" mapstructure:"hook" json:"hook"`
}
func (Config) GetParserConfigByName ¶ added in v0.29.3
func (Config) GetStorageByName ¶ added in v0.11.0
func (c Config) GetStorageByName(name string) storage.StorageConfig
func (Config) GetStorageNamesByUserID ¶ added in v0.11.0
func (Config) GetUsersID ¶ added in v0.11.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.