Documentation ¶
Index ¶
- Variables
- func Error(Message string, err error, Line int) error
- func Exist(fileName any) bool
- func FindID(url string) string
- func LoadJson()
- func ReadConfig(fileName string) []byte
- func SaveJson()
- func UpdateConfig()
- type AppConfig
- type BoluobaoConfig
- type Hbooker
- type HbookerCommonParams
- type SFacg
- type ScriptConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var APP = struct { Hbooker *Hbooker SFacg *SFacg }{}
View Source
var Apps = AppConfig{}
View Source
var FileLock = &sync.Mutex{}
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",
}
View Source
var Vars = &Apps.Config
Functions ¶
func ReadConfig ¶
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.