forked from zsakvo/dhbooker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstruct.go
59 lines (49 loc) · 993 Bytes
/
struct.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package main
import (
"runtime"
"sync"
"github.com/Unknwon/goconfig"
"github.com/tidwall/gjson"
"gopkg.in/cheggaaa/pb.v1"
)
const appVersion = "2.1.032"
const initEncryptKey = "zG2nSeEfSHfvTCHy5LCcqtBbQehKNLXn"
var ostype = runtime.GOOS
var pathSeparator string
var bar *pb.ProgressBar
var ping int64
var book cbook
var token ctoken
var path pathSettings
var config *goconfig.ConfigFile
var download cdownload
type ctoken struct {
readerID string
loginToken string
account string
}
type accountSettings struct {
username string
password string
}
type pathSettings struct {
tmp string
out string
}
type cbook struct {
format string
coverURL string
id string
name string
author string
tmpPath string
chapterNum int
rollNum int
chapters sync.Map
invalidChapters sync.Map
chapterIDs []string
rolls []gjson.Result
}
type cdownload struct {
failedChapters []string
}