File size: 4,970 Bytes
215df2f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
package quqi

type BaseReqQuery struct {
	ID string `json:"quqiid"`
}

type BaseReq struct {
	GroupID string `json:"quqi_id"`
}

type BaseRes struct {
	//Data    interface{} `json:"data"`
	Code    int    `json:"err"`
	Message string `json:"msg"`
}

type GroupRes struct {
	BaseRes
	Data []*Group `json:"data"`
}

type ListRes struct {
	BaseRes
	Data *List `json:"data"`
}

type GetDocRes struct {
	BaseRes
	Data struct {
		OriginPath string `json:"origin_path"`
	} `json:"data"`
}

type GetDownloadResp struct {
	BaseRes
	Data struct {
		Url string `json:"url"`
	} `json:"data"`
}

type MakeDirRes struct {
	BaseRes
	Data struct {
		IsRoot   bool  `json:"is_root"`
		NodeID   int64 `json:"node_id"`
		ParentID int64 `json:"parent_id"`
	} `json:"data"`
}

type MoveRes struct {
	BaseRes
	Data struct {
		NodeChildNum int64  `json:"node_child_num"`
		NodeID       int64  `json:"node_id"`
		NodeName     string `json:"node_name"`
		ParentID     int64  `json:"parent_id"`
		GroupID      int64  `json:"quqi_id"`
		TreeID       int64  `json:"tree_id"`
	} `json:"data"`
}

type RenameRes struct {
	BaseRes
	Data struct {
		NodeID     int64  `json:"node_id"`
		GroupID    int64  `json:"quqi_id"`
		Rename     string `json:"rename"`
		TreeID     int64  `json:"tree_id"`
		UpdateTime int64  `json:"updatetime"`
	} `json:"data"`
}

type CopyRes struct {
	BaseRes
}

type RemoveRes struct {
	BaseRes
}

type Group struct {
	ID              int    `json:"quqi_id"`
	Type            int    `json:"type"`
	Name            string `json:"name"`
	IsAdministrator int    `json:"is_administrator"`
	Role            int    `json:"role"`
	Avatar          string `json:"avatar_url"`
	IsStick         int    `json:"is_stick"`
	Nickname        string `json:"nickname"`
	Status          int    `json:"status"`
}

type List struct {
	ListDir
	Dir  []*ListDir  `json:"dir"`
	File []*ListFile `json:"file"`
}

type ListItem struct {
	AddTime        int64  `json:"add_time"`
	IsDir          int    `json:"is_dir"`
	IsExpand       int    `json:"is_expand"`
	IsFinalize     int    `json:"is_finalize"`
	LastEditorName string `json:"last_editor_name"`
	Name           string `json:"name"`
	NodeID         int64  `json:"nid"`
	ParentID       int64  `json:"parent_id"`
	Permission     int    `json:"permission"`
	TreeID         int64  `json:"tid"`
	UpdateCNT      int64  `json:"update_cnt"`
	UpdateTime     int64  `json:"update_time"`
}

type ListDir struct {
	ListItem
	ChildDocNum int64  `json:"child_doc_num"`
	DirDetail   string `json:"dir_detail"`
	DirType     int    `json:"dir_type"`
}

type ListFile struct {
	ListItem
	BroadDocType       string `json:"broad_doc_type"`
	CanDisplay         bool   `json:"can_display"`
	Detail             string `json:"detail"`
	EXT                string `json:"ext"`
	Filetype           string `json:"filetype"`
	HasMobileThumbnail bool   `json:"has_mobile_thumbnail"`
	HasThumbnail       bool   `json:"has_thumbnail"`
	Size               int64  `json:"size"`
	Version            int    `json:"version"`
}

type UploadInitResp struct {
	Data struct {
		Bucket   string `json:"bucket"`
		Exist    bool   `json:"exist"`
		Key      string `json:"key"`
		TaskID   string `json:"task_id"`
		Token    string `json:"token"`
		UploadID string `json:"upload_id"`
		URL      string `json:"url"`
		NodeID   int64  `json:"node_id"`
		NodeName string `json:"node_name"`
		ParentID int64  `json:"parent_id"`
	} `json:"data"`
	Err int    `json:"err"`
	Msg string `json:"msg"`
}

type TempKeyResp struct {
	Err  int    `json:"err"`
	Msg  string `json:"msg"`
	Data struct {
		ExpiredTime int    `json:"expiredTime"`
		Expiration  string `json:"expiration"`
		Credentials struct {
			SessionToken string `json:"sessionToken"`
			TmpSecretID  string `json:"tmpSecretId"`
			TmpSecretKey string `json:"tmpSecretKey"`
		} `json:"credentials"`
		RequestID string `json:"requestId"`
		StartTime int    `json:"startTime"`
	} `json:"data"`
}

type UploadFinishResp struct {
	Data struct {
		NodeID   int64  `json:"node_id"`
		NodeName string `json:"node_name"`
		ParentID int64  `json:"parent_id"`
		QuqiID   int64  `json:"quqi_id"`
		TreeID   int64  `json:"tree_id"`
	} `json:"data"`
	Err int    `json:"err"`
	Msg string `json:"msg"`
}

type UrlExchangeResp struct {
	BaseRes
	Data struct {
		Name               string `json:"name"`
		Mime               string `json:"mime"`
		Size               int64  `json:"size"`
		DownloadType       int    `json:"download_type"`
		ChannelType        int    `json:"channel_type"`
		ChannelID          int    `json:"channel_id"`
		Url                string `json:"url"`
		ExpiredTime        int64  `json:"expired_time"`
		IsEncrypted        bool   `json:"is_encrypted"`
		EncryptedSize      int64  `json:"encrypted_size"`
		EncryptedAlg       string `json:"encrypted_alg"`
		EncryptedKey       string `json:"encrypted_key"`
		PassportID         int64  `json:"passport_id"`
		RequestExpiredTime int64  `json:"request_expired_time"`
	} `json:"data"`
}