Documentation
¶
Index ¶
Constants ¶
View Source
const DEFAULT_PORT = 6968 // 'E' (0x69) + 'D' (0x68)
View Source
const DEFAULT_ZIPMODE = 1 // Zip filename encoding detection mode. 0 - strict; 1 - guess the best (shift_jis > gbk)
Variables ¶
View Source
var ( Test1 = false Test2 = false VerboseLevel = 0 DefaultConfigFile = "" ConfigDir = "" // "/root/.config/erodownloader" ConfigFilename = "" // "erodownloader.toml" ConfigFile = "" // Fullpath, e.g. "/root/.config/erodownloader/erodownloader.toml" ConfigName = "" // "erodownloader" ConfigType = "" // "toml" Data *Config Db *gorm.DB )
View Source
var InternalClients = []*ClientConfig{ { Name: constants.LOCAL_CLIENT, Type: "aria2", Url: "http://localhost:6800/jsonrpc", SavePath: "", Internal: true, Local: true, }, }
Internal local clients.
View Source
var InternalSites = []*SiteConfig{ { Name: "asmrc", Type: "asmrconnecting", Url: "https://asmrconnecting.xyz/", Internal: true, }, }
Functions ¶
Types ¶
type ClientConfig ¶
type ClientConfig struct {
Name string
Type string // "aria2"
SavePath string
Url string // "http://localhost:6800/jsonrpc"
Token string // secret or authorization token
Internal bool
Local bool // the client is running in the same machine & fs as this tool
Windows bool // Windows use "\" as sep.
Comment string
}
func GetClientConfig ¶
func GetClientConfig(name string) *ClientConfig
type Config ¶
type Config struct {
Sites []*SiteConfig
Clients []*ClientConfig
Passwords []string
SavePath string // default save path for internal (local) clients
Aria2Url string // url of default local aria2 client
Aria2Token string // token of default local aria2 client
FlareSolverr string // 'http://localhost:8191/v1'
UserAgent string
Port int // web ui port
Token string //web ui token
Cookies []*fhttp.Cookie // used keys: name, value, domain, path
}
type SiteConfig ¶
type SiteConfig struct {
Name string
Aliases []string
Type string
Url string
Internal bool
Comment string
}
func GetSiteConfig ¶
func GetSiteConfig(name string) *SiteConfig
func (*SiteConfig) GetName ¶
func (siteConfig *SiteConfig) GetName() string
Click to show internal directories.
Click to hide internal directories.