-
Notifications
You must be signed in to change notification settings - Fork 43
/
object.go
99 lines (83 loc) · 1.93 KB
/
object.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
package models
import (
"io"
"time"
)
type BucketsView struct {
Buckets []Bucket `json:"buckets"`
}
type ObjectStorageSourceViewV2 struct {
Sources map[string]ObjectStorageSourceV2 `json:"sources"`
}
type Bucket struct {
Name string `json:"name,omitempty"`
CreationDate time.Time `json:"createTime,omitempty"`
}
type ObjectStorageSourceV2 struct {
AccountEnabled bool `json:"accountEnabled,omitempty"`
}
type ObjectParams struct {
Marker string
MaxKeys int64
Prefix string
Delimiter string
}
type ObjectSummaryType struct {
ETag string
Key string
LastModified time.Time
Size int64
StorageClass string
}
type PrefixType struct {
Prefix string
}
type ListObjectsResult struct {
Name string
Prefix string
Delimiter string
Marker string
NextMarker string
MaxKeys int64
IsTruncated bool
Contents []ObjectSummaryType
CommonPrefixes []PrefixType
}
type ObjectsView struct {
Objects []ObjectView `json:"objects"`
}
type Object struct {
ObjectMeta
Body io.ReadCloser
}
type ObjectView struct {
Name string `json:"name,omitempty"`
}
type ObjectMeta struct {
AcceptRanges string
CacheControl string
ContentDisposition string
ContentEncoding string
ContentLength int64
ContentType string
ETag string
Expires string
LastModified time.Time
StorageClass string
}
type ObjectURL struct {
URL string
MD5 string
Token string
}
type ObjectRequestParams struct {
Source string `json:"source,omitempty"`
Bucket string `json:"bucket,omitempty"`
Account string `form:"account,omitempty"`
ExternalObjectInfo ExternalObjectInfo `form:",inline"`
}
type ExternalObjectInfo struct {
Endpoint string `form:"endpoint,omitempty"`
Ak string `form:"ak,omitempty"`
Sk string `form:"sk,omitempty"`
}