-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathstruct.go
75 lines (65 loc) · 1.5 KB
/
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package main
type mainConfig struct {
token string
parallel int
interval int
prefix string
debugMode bool
singleMode bool
version bool
keepMode bool
authCode string
blockSize int
hashCheck bool
passCode string
silentMode bool
validDays int
}
type uploadResult struct {
Hash string `json:"hash"`
Key string `json:"key"`
}
type initResp struct {
Token string
TransferGUID string
FileGUID string
EncodeID string
Exp int64 `json:"expireAt"`
ID string `json:"uploadId"`
}
type upResp struct {
Etag string `json:"etag"`
MD5 string `json:"md5"`
}
type prepareSendResp struct {
UploadToken string `json:"uptoken"`
TransferGUID string `json:"transferguid"`
FileGUID string `json:"fileguid"`
UniqueURL string `json:"uniqueurl"`
Prefix string `json:"prefix"`
QRCode string `json:"qrcode"`
Error bool `json:"error"`
ErrorMessage string `json:"error_message"`
}
// type uploadResponse struct {
// Ticket string `json:"ctx"`
// Hash int64 `json:"crc32"`
// }
type slek struct {
ETag string `json:"etag"`
Part int64 `json:"partNumber"`
}
type clds struct {
Parts []slek `json:"parts"`
FName string `json:"fname"`
Mimetype string `json:"mimeType"`
Metadata map[string]string
Vars map[string]string
}
type beforeSendResp struct {
FileGuid string `json:"fileGuid"`
}
type finishResponse struct {
TempDownloadCode string `json:"tempDownloadCode"`
Status bool `json:"complete"`
}