-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
42 lines (38 loc) · 1.47 KB
/
config.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
package main
type config struct {
Login login
OrderInfo orderInfo `toml:"order_info"`
System system
OrderRequest map[string]string `toml:"order_request"`
GetQueueCountRequest map[string]string `toml:"get_queue_count"`
ConfirmSingleForQueue map[string]string `toml:"confirm_single_for_queue"`
}
type login struct {
Cookie string
UserAgent string `toml:"user_agent"`
}
type orderInfo struct {
TrainCode []string `toml:"train_code"`
TrainDate []string `toml:"train_date"`
FromStation string `toml:"from_station"`
ToStation string `toml:"to_station"`
PassengerName []string `toml:"passenger_name"`
SeatType string `toml:"seat_type"`
SeatTypeName string `toml:"seat_type_name"`
}
type system struct {
Proxy bool
OpenParams string `toml:"open_params"`
Open string `toml:"open"`
ProxyUrl string `toml:"proxy_url"`
LogLevel int `toml:"log_level"`
OrderSize int `toml:"order_size"`
QuerySize int `toml:"query_size"`
RefreshTime int64 `toml:"refresh_time"` //查询订单时间
SubmitTime int64 `toml:"submit_time"` //提交订单的停顿时间
Cdn []string
ShowCDN bool `toml:"show_cdn"` //是否显示CDN的过滤结果
Mobile string //成功后的短信提示
TimeOut int `toml:"time_out"` //DoForWardRequest()的超时时间
GoBoth bool `toml:"go_both"` //是否并行执行 getQueueCount()和confirmSingleForQueue()
}