config

package
v0.37.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig()

Types

type Config

type Config struct {
	Debug    bool           `toml:"debug" mapstructure:"debug" json:"debug" yaml:"debug"`
	API      apiConfig      `toml:"api" mapstructure:"api" json:"api" yaml:"api"`
	Auth     authConfig     `toml:"auth" mapstructure:"auth" json:"auth" yaml:"auth"`
	Fetcher  fetcherConfig  `toml:"fetcher" mapstructure:"fetcher" json:"fetcher" yaml:"fetcher"`
	Log      logConfig      `toml:"log" mapstructure:"log" json:"log" yaml:"log"`
	Source   sourceConfigs  `toml:"source" mapstructure:"source" json:"source" yaml:"source"`
	Storage  storageConfigs `toml:"storage" mapstructure:"storage" json:"storage" yaml:"storage"`
	Telegram telegramConfig `toml:"telegram" mapstructure:"telegram" json:"telegram" yaml:"telegram"`
	Database databaseConfig `toml:"database" mapstructure:"database" json:"database" yaml:"database"`
}
var Cfg *Config

type PathRule

type PathRule struct {
	Path       string `toml:"path" mapstructure:"path" json:"path" yaml:"path"`
	TrimPrefix string `toml:"trim_prefix" mapstructure:"trim_prefix" json:"trim_prefix" yaml:"trim_prefix"`
	JoinPrefix string `toml:"join_prefix" mapstructure:"join_prefix" json:"join_prefix" yaml:"join_prefix"`
}

type SourceBilibiliConfig

type SourceBilibiliConfig struct {
	Enable bool `toml:"enable" mapstructure:"enable" json:"enable" yaml:"enable"`
}

type SourceCommonConfig

type SourceCommonConfig struct {
	Enable   bool
	Intervel int
}

type SourceDanbooruConfig

type SourceDanbooruConfig struct {
	Enable bool `toml:"enable" mapstructure:"enable" json:"enable" yaml:"enable"`
}

type SourceKemonoConfig

type SourceKemonoConfig struct {
	Enable  bool   `toml:"enable" mapstructure:"enable" json:"enable" yaml:"enable"`
	Session string `toml:"session" mapstructure:"session" json:"session" yaml:"session"`
}

type SourcePixivConfig

type SourcePixivConfig struct {
	Enable   bool           `toml:"enable" mapstructure:"enable" json:"enable" yaml:"enable"`
	Proxy    string         `toml:"proxy" mapstructure:"proxy" json:"proxy" yaml:"proxy"`
	URLs     []string       `toml:"urls" mapstructure:"urls" json:"urls" yaml:"urls"`
	Intervel int            `toml:"intervel" mapstructure:"intervel" json:"intervel" yaml:"intervel"`
	Sleep    uint           `toml:"sleep" mapstructure:"sleep" json:"sleep" yaml:"sleep"`
	Cookies  []cookieConfig `toml:"cookies" mapstructure:"cookies" json:"cookies" yaml:"cookies"`
}

type SourceTwitterConfig

type SourceTwitterConfig struct {
	Enable          bool   `toml:"enable" mapstructure:"enable" json:"enable" yaml:"enable"`
	FxTwitterDomain string `toml:"fx_twitter_domain" mapstructure:"fx_twitter_domain" json:"fx_twitter_domain" yaml:"fx_twitter_domain"`
}

type StorageAlistConfig

type StorageAlistConfig struct {
	Enable       bool   `toml:"enable" mapstructure:"enable" json:"enable" yaml:"enable"`
	URL          string `toml:"url" mapstructure:"url" json:"url" yaml:"url"`
	Username     string `toml:"username" mapstructure:"username" json:"username" yaml:"username"`
	Password     string `toml:"password" mapstructure:"password" json:"password" yaml:"password"`
	Path         string `toml:"path" mapstructure:"path" json:"path" yaml:"path"`
	PathPassword string `toml:"path_password" mapstructure:"path_password" json:"path_password" yaml:"path_password"`
	TokenExpire  int    `toml:"token_expire" mapstructure:"token_expire" json:"token_expire" yaml:"token_expire"`
}

type StorageLocalConfig

type StorageLocalConfig struct {
	Enable bool   `toml:"enable" mapstructure:"enable" json:"enable" yaml:"enable"`
	Path   string `toml:"path" mapstructure:"path" json:"path" yaml:"path"`
}

type StorageWebdavConfig

type StorageWebdavConfig struct {
	Enable   bool   `toml:"enable" mapstructure:"enable" json:"enable" yaml:"enable"`
	URL      string `toml:"url" mapstructure:"url" json:"url" yaml:"url"`
	Username string `toml:"username" mapstructure:"username" json:"username" yaml:"username"`
	Password string `toml:"password" mapstructure:"password" json:"password" yaml:"password"`
	Path     string `toml:"path" mapstructure:"path" json:"path" yaml:"path"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL