-
Notifications
You must be signed in to change notification settings - Fork 265
/
Copy pathrpc_node.go
129 lines (107 loc) · 3.15 KB
/
rpc_node.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*
* @Copyright Reserved By Janusec (https://www.janusec.com/).
* @Author: U2
* @Date: 2018-07-14 16:39:23
* @Last Modified: U2, 2018-07-14 16:39:23
*/
package models
type RPCResponse struct {
Error *string `json:"err"`
Object interface{} `json:"object"`
}
type RPCRequest struct {
Action string `json:"action"`
ObjectID int64 `json:"id,string"`
NodeVersion string `json:"node_version"`
AuthKey string `json:"auth_key"`
Object interface{} `json:"object"`
// PublicIP used for dns load balance, added v1.4.1
PublicIP string `json:"public_ip"`
}
type RPCGroupHitLogRequest struct {
Action string `json:"action"`
ObjectID int64 `json:"id,string"`
NodeID int64 `json:"node_id,string"`
AuthKey string `json:"auth_key"`
Object *GroupHitLog `json:"object"`
}
type RPCCCLogRequest struct {
Action string `json:"action"`
ObjectID int64 `json:"id,string"`
NodeID int64 `json:"node_id,string"`
AuthKey string `json:"auth_key"`
Object *CCLog `json:"object"`
}
type RPCCertItems struct {
Error *string `json:"err"`
Object []*CertItem `json:"object"`
}
type RPCApplications struct {
Error *string `json:"err"`
Object []*Application `json:"object"`
}
type RPCVipApps struct {
Error *string `json:"err"`
Object []*VipApp `json:"object"`
}
type RPCDBDomains struct {
Error *string `json:"err"`
Object []*DBDomain `json:"object"`
}
type RPCCCPolicies struct {
Error *string `json:"err"`
Object []*CCPolicy `json:"object"`
}
type RPCGroupPolicies struct {
Error *string `json:"err"`
Object []*GroupPolicy `json:"object"`
}
type RPCVulntypes struct {
Error *string `json:"err"`
Object []*VulnType `json:"object"`
}
/*
type RPCSettings struct {
Error *string `json:"err"`
Object []*Setting `json:"object"`
}
*/
type RPCOAuthConfig struct {
Error *string `json:"err"`
Object *OAuthConfig `json:"object"`
}
type RPCTOTP struct {
Error *string `json:"err"`
Object *TOTP `json:"object"`
}
type RPCStatRequest struct {
Action string `json:"action"`
ObjectID int64 `json:"id,string"`
NodeID int64 `json:"node_id,string"`
AuthKey string `json:"auth_key"`
Object []*AccessStat `json:"object"`
}
type RPCRefererRequest struct {
Action string `json:"action"`
ObjectID int64 `json:"id,string"`
NodeID int64 `json:"node_id,string"`
AuthKey string `json:"auth_key"`
Object *map[int64]map[string]map[string]map[string]int64 `json:"object"`
}
type RPCNodeSetting struct {
Error *string `json:"err"`
Object *NodeShareSetting `json:"object"`
}
// PrimarySettingRequest for update NodeSetting
type PrimarySettingRequest struct {
Action string `json:"action"`
Object *PrimarySetting `json:"object"`
}
type RPCDiscoveryRules struct {
Error *string `json:"err"`
Object []*DiscoveryRule `json:"object"`
}
type RPCCookieRefs struct {
Error *string `json:"err"`
Object []*CookieRef `json:"object"`
}