-
Notifications
You must be signed in to change notification settings - Fork 3
/
types.go
58 lines (50 loc) · 1.39 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
package file
type PageFileRequest struct {
Page uint32 `json:"page"`
PageSize uint32 `json:"page_size"`
Name string `json:"name"`
DirectoryId uint32 `json:"directory_id"`
}
type GetDirectoryByAppRequest struct {
App string `json:"app"`
ParentID uint32 `json:"parent_id"`
}
type PrepareUploadFileRequest struct {
DirectoryId uint32 `json:"directory_id"`
DirectoryPath string `json:"directory_path"`
App string `json:"app"`
Name string `json:"name"`
Sha string `json:"sha"`
Size uint32 `json:"size"`
}
type PrepareUploadFileReply struct {
Uploaded *bool `json:"uploaded"`
Src *string `json:"src"`
ChunkSize *uint32 `json:"chunk_size"`
ChunkCount *uint32 `json:"chunk_count"`
UploadId *string `json:"upload_id"`
UploadChunks []int `json:"upload_chunks"`
Sha *string `json:"sha"`
}
type UploadFileRequest struct {
Data []byte `json:"data"`
UploadId string `json:"upload_id"`
Index uint32 `json:"index"`
}
type UploadFileReply struct {
Src string
Sha string
}
type GetFileRequest struct {
Src string `json:"src"`
Width int `json:"width"`
Height int `json:"height"`
Mode string `json:"mode"`
IsRange bool `json:"is_range"`
Start int64 `json:"start"`
End int64 `json:"end"`
}
type GetFileResponse struct {
Data []byte `json:"data"`
Mime string `json:"mime"`
}