Documentation
¶
Index ¶
- Variables
- func DirectoryExists(dirName string) bool
- func EnsureDirectoriesExist(dirNames []string)
- func LoadConfig()
- func ReadConfig(fileName string) ([]byte, error)
- func SaveConfig()
- func UpdateConfig()
- type AppConfig
- type BoluobaoConfig
- type Hbooker
- type HbookerCommonParams
- type SFacg
- type ScriptConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Apps = AppConfig{} Vars = &Apps.Config FileLock = &sync.Mutex{} )
View Source
var APP = struct { Hbooker *Hbooker SFacg *SFacg }{}
View Source
var HelpMessage = []string{"input help to see the command list:",
"input quit to quit",
"input download <bookid/url> to download book",
"input search <keyword> to search book",
"input show to show config",
"input update config to update config by config.json",
"input login <account> <password> to login account",
"input app <app app keyword> to change app type",
"input max <thread> to change max thread number",
"you can input command like this: download <bookid/url>\n\n",
}
Functions ¶
func DirectoryExists ¶
func EnsureDirectoriesExist ¶
func EnsureDirectoriesExist(dirNames []string)
func LoadConfig ¶
func LoadConfig()
func ReadConfig ¶
func SaveConfig ¶
func SaveConfig()
func UpdateConfig ¶
func UpdateConfig()
Types ¶
type AppConfig ¶
type AppConfig struct {
Hbooker HbookerCommonParams `json:"common_params"`
Sfacg BoluobaoConfig `json:"sfacg_config"`
Config ScriptConfig `json:"script_config"`
}
type BoluobaoConfig ¶
type BoluobaoConfig struct {
Cookie string `json:"cookie"`
}
type Hbooker ¶
type Hbooker struct {
Client *hbookerLib.Client
BookInfo *hbookermodel.BookInfo
}
type HbookerCommonParams ¶
type SFacg ¶
type SFacg struct {
Client *boluobaoLib.Client
BookInfo *boluobaomodel.BookInfoData
}
Click to show internal directories.
Click to hide internal directories.