-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.go
234 lines (208 loc) · 6.36 KB
/
types.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
package zxl_go_sdk
type SaveResult struct {
//链上存证的hash
Hash string `json:"hash"`
//存证区块的高度
Height int64 `json:"height"`
//存证区块的时间
Time string `json:"time"`
}
type EvidenceData struct {
AppId string `json:"appId"`
EvId string `json:"evId"`
EvHash string `json:"evHash"`
ExtendInfo string `json:"extendInfo"`
TxHash string `json:"txHash"`
BlockHeight int64 `json:"blockHeight"`
CreateTime string `json:"createTime"`
}
type Config struct {
ServerAddr string `json:"serverAddr"`
EvidenceApply string `json:"evidenceApply"`
EvidenceSubmit string `json:"evidenceSubmit"`
EvidenceSave string
QueryWithEvId string `json:"queryWithEvId"`
QueryWithEvHash string `json:"queryWithEvHash"`
QueryWithTxHash string `json:"queryWithTxHash"`
UserCert string `json:"userCert"`
QueryWithHash string `json:"queryWithHash"`
ProxyHost string
ProxyPort string
IsProxy bool
ServerCrtPath string
ContentCapture string `json:"contentCapture"`
ReqFilePath string `json:"reqFilePath"`
DefaultHttpTimeout int
}
type CommonRet struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data"`
}
type UserCertReq struct {
Pk string `json:"pk"`
Sign string `json:"sign"`
RepresentAppId string `json:"representAppId"`
RepresentAppKey string `json:"representAppKey"`
}
type UserCertResp struct {
AppId string `json:"appId"`
BlockHeight string `json:"blockHeight"`
TxHash string `json:"txHash"`
CreateTime string `json:"createTime"`
}
type CetcEvidenceReq struct {
EvId string `json:"evId"`
EvHash string `json:"evHash"`
ExtendInfo string `json:"extendInfo"`
Sign string `json:"sign"`
AepresentAppId string `json:"representAppId"`
}
type TencentEvidenceReq struct {
BodyData string `json:"bodyData"`
BodySign string `json:"bodySign"`
}
type SystemParams struct {
MchType int `json:"mch_type"`
MchId string `json:"mch_id"`
SignType string `json:"sign_type"`
TimeStamp int64 `json:"timestamp"`
Version string `json:"version"`
}
type ApplyContent struct {
Content string `json:"content"`
EvId string `json:"ev_id"`
ExtendInfo string `json:"extend_info"`
}
type EvidenceApplyReq struct {
SysParams SystemParams `json:"sys_params"`
Content ApplyContent `json:"content"`
PublicKey string `json:"public_key"`
}
type EvidenceApplyResp struct {
ToBeSign string `json:"toBeSign"`
Session0 string `json:"session0"`
Session1 string `json:"session1"`
TxHash string `json:"txHash"`
}
type EvidenceSubmitReq struct {
SysParams SystemParams `json:"sys_params"`
Sign string `json:"sign"`
Session0 string `json:"session0"`
Session1 string `json:"session1"`
}
type QueryReq struct {
EvId string `json:"evId"`
TxHash string `json:"txHash"`
EvHash string `json:"evHash"`
}
type QueryResp struct {
AppId string `json:"appId"`
EvId string `json:"evId"`
EvHash string `json:"evHash"`
ExtendInfo string `json:"extendInfo"`
TxHash string `json:"txHash"`
BlockHeight int64 `json:"blockHeight"`
CreateTime string `json:"createTime"`
AccessCode string `json:"accessCode"`
}
type EvSaveResult struct {
BlockHeight int64 `json:"blockHeight"`
EvId string `json:"evId"`
TxHash string `json:"txHash"`
EvHash string `json:"evHash"`
CreateTime string `json:"createTime"`
Ext string `json:"ext"`
RequestId string
}
//下发截屏/录屏任务
type EvObtainTask struct {
WebUrls string `json:"webUrls"`
Type int `json:"type"`
AppId string `json:"appId"`
RequestType string `json:"requestType"`
RedirectUrl string `json:"redirectUrl"`
OrderNo string `json:"orderNo"`
Title string `json:"title"`
Remark string `json:"remark"`
RepresentAppId string `json:"representAppId"`
Duration int `json:"duration"`
}
//任务Data
type TaskEvData struct {
Status int `json:"status"`
StatusMsg string `json:"statusMsg"`
Url string `json:"url"`
Hash string `json:"hash"`
RequestId string
}
//证书状态及结果
type EvIdData struct {
Status int `json:"status"`
EvidUrl string `json:"evidUrl"`
VoucherUrl string `json:"voucherUrl"`
AbnormalTag int `json:"abnormalTag"`
Duration int `json:"duration"`
Evid string `json:"evid"`
EvHash string `json:"evHash"`
TxHash string `json:"txHash"`
BlockHeight string `json:"blockHeight"`
StorageTime string `json:"storageTime"`
RequestId string
}
//中版链证书状态及结果
type EvIdDataZbl struct {
Status int `json:"status"`
FileSize int `json:"fileSize"`
EvidUrl string `json:"evidUrl"`
Evid string `json:"evid"`
EvHash string `json:"evHash"`
TxHash string `json:"txHash"`
BlockHeight string `json:"blockHeight"`
StorageTime string `json:"storageTime"`
VoucherUrl string `json:"voucherUrl"`
WebTitle string `json:"webTitle"`
WebUrl string `json:"webUrl"`
CreateTime string `json:"createTime"`
Duration int `json:"duration"`
RequestId string
}
//定义tx接口返回结构体,最外层
type TxRetCommonData struct {
RetCode int `json:"retCode"`
RetMsg string `json:"retMsg"`
Detail interface{} `json:"detail"`
}
//定义tx接口返回结构体,最内层
type TxRetDetail struct {
OrderNo string `json:"orderNo"`
Msg string `json:"msg"`
Status int `json:"status"`
StatusMsg string `json:"statusMsg"`
Url string `json:"url"`
Hash string `json:"hash"`
EvIdUrl string `json:"evidUrl"`
VoucherUrl string `json:"voucherUrl"`
WebTitle string `json:"webTitle"`
Duration int `json:"duration"`
Evid string `json:"evid"`
EvHash string `json:"evHash"`
TxHash string `json:"txHash"`
BlockHeight string `json:"blockHeight"`
StorageTime string `json:"storageTime"`
}
func (evData *EvSaveResult) GetEvId() string {
return evData.EvId
}
func (evData *EvSaveResult) GetEvHash() string {
return evData.EvHash
}
func (evData *EvSaveResult) GetTxHash() string {
return evData.TxHash
}
func (evData *EvSaveResult) GetCreateTime() string {
return evData.CreateTime
}
func (evData *EvSaveResult) GetBlockHeight() int64 {
return evData.BlockHeight
}