OSDN Git Service

Create ossClient.go (#574)
[bytom/vapor.git] / vendor / github.com / aliyun / aliyun-oss-go-sdk / oss / const.go
1 package oss
2
3 import "os"
4
5 // ACLType bucket/object ACL
6 type ACLType string
7
8 const (
9         // ACLPrivate definition : private read and write
10         ACLPrivate ACLType = "private"
11
12         // ACLPublicRead definition : public read and private write
13         ACLPublicRead ACLType = "public-read"
14
15         // ACLPublicReadWrite definition : public read and public write
16         ACLPublicReadWrite ACLType = "public-read-write"
17
18         // ACLDefault Object. It's only applicable for object.
19         ACLDefault ACLType = "default"
20 )
21
22 // bucket versioning status
23 type VersioningStatus string
24
25 const (
26         // Versioning Status definition: Enabled
27         VersionEnabled VersioningStatus = "Enabled"
28
29         // Versioning Status definition: Suspended
30         VersionSuspended VersioningStatus = "Suspended"
31 )
32
33 // MetadataDirectiveType specifying whether use the metadata of source object when copying object.
34 type MetadataDirectiveType string
35
36 const (
37         // MetaCopy the target object's metadata is copied from the source one
38         MetaCopy MetadataDirectiveType = "COPY"
39
40         // MetaReplace the target object's metadata is created as part of the copy request (not same as the source one)
41         MetaReplace MetadataDirectiveType = "REPLACE"
42 )
43
44 // TaggingDirectiveType specifying whether use the tagging of source object when copying object.
45 type TaggingDirectiveType string
46
47 const (
48         // TaggingCopy the target object's tagging is copied from the source one
49         TaggingCopy TaggingDirectiveType = "COPY"
50
51         // TaggingReplace the target object's tagging is created as part of the copy request (not same as the source one)
52         TaggingReplace TaggingDirectiveType = "REPLACE"
53 )
54
55 // AlgorithmType specifying the server side encryption algorithm name
56 type AlgorithmType string
57
58 const (
59         KMSAlgorithm AlgorithmType = "KMS"
60         AESAlgorithm AlgorithmType = "AES256"
61         SM4Algorithm AlgorithmType = "SM4"
62 )
63
64 // StorageClassType bucket storage type
65 type StorageClassType string
66
67 const (
68         // StorageStandard standard
69         StorageStandard StorageClassType = "Standard"
70
71         // StorageIA infrequent access
72         StorageIA StorageClassType = "IA"
73
74         // StorageArchive archive
75         StorageArchive StorageClassType = "Archive"
76
77         // StorageColdArchive cold archive
78         StorageColdArchive StorageClassType = "ColdArchive"
79 )
80
81 //RedundancyType bucket data Redundancy type
82 type DataRedundancyType string
83
84 const (
85         // RedundancyLRS Local redundancy, default value
86         RedundancyLRS DataRedundancyType = "LRS"
87
88         // RedundancyZRS Same city redundancy
89         RedundancyZRS DataRedundancyType = "ZRS"
90 )
91
92 // PayerType the type of request payer
93 type PayerType string
94
95 const (
96         // Requester the requester who send the request
97         Requester PayerType = "Requester"
98
99         // BucketOwner the requester who send the request
100         BucketOwner PayerType = "BucketOwner"
101 )
102
103 //RestoreMode the restore mode for coldArchive object
104 type RestoreMode string
105
106 const (
107         //RestoreExpedited object will be restored in 1 hour
108         RestoreExpedited RestoreMode = "Expedited"
109
110         //RestoreStandard object will be restored in 2-5 hours
111         RestoreStandard RestoreMode = "Standard"
112
113         //RestoreBulk object will be restored in 5-10 hours
114         RestoreBulk RestoreMode = "Bulk"
115 )
116
117 // HTTPMethod HTTP request method
118 type HTTPMethod string
119
120 const (
121         // HTTPGet HTTP GET
122         HTTPGet HTTPMethod = "GET"
123
124         // HTTPPut HTTP PUT
125         HTTPPut HTTPMethod = "PUT"
126
127         // HTTPHead HTTP HEAD
128         HTTPHead HTTPMethod = "HEAD"
129
130         // HTTPPost HTTP POST
131         HTTPPost HTTPMethod = "POST"
132
133         // HTTPDelete HTTP DELETE
134         HTTPDelete HTTPMethod = "DELETE"
135 )
136
137 // HTTP headers
138 const (
139         HTTPHeaderAcceptEncoding     string = "Accept-Encoding"
140         HTTPHeaderAuthorization             = "Authorization"
141         HTTPHeaderCacheControl              = "Cache-Control"
142         HTTPHeaderContentDisposition        = "Content-Disposition"
143         HTTPHeaderContentEncoding           = "Content-Encoding"
144         HTTPHeaderContentLength             = "Content-Length"
145         HTTPHeaderContentMD5                = "Content-MD5"
146         HTTPHeaderContentType               = "Content-Type"
147         HTTPHeaderContentLanguage           = "Content-Language"
148         HTTPHeaderDate                      = "Date"
149         HTTPHeaderEtag                      = "ETag"
150         HTTPHeaderExpires                   = "Expires"
151         HTTPHeaderHost                      = "Host"
152         HTTPHeaderLastModified              = "Last-Modified"
153         HTTPHeaderRange                     = "Range"
154         HTTPHeaderLocation                  = "Location"
155         HTTPHeaderOrigin                    = "Origin"
156         HTTPHeaderServer                    = "Server"
157         HTTPHeaderUserAgent                 = "User-Agent"
158         HTTPHeaderIfModifiedSince           = "If-Modified-Since"
159         HTTPHeaderIfUnmodifiedSince         = "If-Unmodified-Since"
160         HTTPHeaderIfMatch                   = "If-Match"
161         HTTPHeaderIfNoneMatch               = "If-None-Match"
162         HTTPHeaderACReqMethod               = "Access-Control-Request-Method"
163         HTTPHeaderACReqHeaders              = "Access-Control-Request-Headers"
164
165         HTTPHeaderOssACL                         = "X-Oss-Acl"
166         HTTPHeaderOssMetaPrefix                  = "X-Oss-Meta-"
167         HTTPHeaderOssObjectACL                   = "X-Oss-Object-Acl"
168         HTTPHeaderOssSecurityToken               = "X-Oss-Security-Token"
169         HTTPHeaderOssServerSideEncryption        = "X-Oss-Server-Side-Encryption"
170         HTTPHeaderOssServerSideEncryptionKeyID   = "X-Oss-Server-Side-Encryption-Key-Id"
171         HTTPHeaderOssServerSideDataEncryption    = "X-Oss-Server-Side-Data-Encryption"
172         HTTPHeaderSSECAlgorithm                  = "X-Oss-Server-Side-Encryption-Customer-Algorithm"
173         HTTPHeaderSSECKey                        = "X-Oss-Server-Side-Encryption-Customer-Key"
174         HTTPHeaderSSECKeyMd5                     = "X-Oss-Server-Side-Encryption-Customer-Key-MD5"
175         HTTPHeaderOssCopySource                  = "X-Oss-Copy-Source"
176         HTTPHeaderOssCopySourceRange             = "X-Oss-Copy-Source-Range"
177         HTTPHeaderOssCopySourceIfMatch           = "X-Oss-Copy-Source-If-Match"
178         HTTPHeaderOssCopySourceIfNoneMatch       = "X-Oss-Copy-Source-If-None-Match"
179         HTTPHeaderOssCopySourceIfModifiedSince   = "X-Oss-Copy-Source-If-Modified-Since"
180         HTTPHeaderOssCopySourceIfUnmodifiedSince = "X-Oss-Copy-Source-If-Unmodified-Since"
181         HTTPHeaderOssMetadataDirective           = "X-Oss-Metadata-Directive"
182         HTTPHeaderOssNextAppendPosition          = "X-Oss-Next-Append-Position"
183         HTTPHeaderOssRequestID                   = "X-Oss-Request-Id"
184         HTTPHeaderOssCRC64                       = "X-Oss-Hash-Crc64ecma"
185         HTTPHeaderOssSymlinkTarget               = "X-Oss-Symlink-Target"
186         HTTPHeaderOssStorageClass                = "X-Oss-Storage-Class"
187         HTTPHeaderOssCallback                    = "X-Oss-Callback"
188         HTTPHeaderOssCallbackVar                 = "X-Oss-Callback-Var"
189         HTTPHeaderOssRequester                   = "X-Oss-Request-Payer"
190         HTTPHeaderOssTagging                     = "X-Oss-Tagging"
191         HTTPHeaderOssTaggingDirective            = "X-Oss-Tagging-Directive"
192         HTTPHeaderOssTrafficLimit                = "X-Oss-Traffic-Limit"
193         HTTPHeaderOssForbidOverWrite             = "X-Oss-Forbid-Overwrite"
194         HTTPHeaderOssRangeBehavior               = "X-Oss-Range-Behavior"
195         HTTPHeaderOssTaskID                      = "X-Oss-Task-Id"
196 )
197
198 // HTTP Param
199 const (
200         HTTPParamExpires       = "Expires"
201         HTTPParamAccessKeyID   = "OSSAccessKeyId"
202         HTTPParamSignature     = "Signature"
203         HTTPParamSecurityToken = "security-token"
204         HTTPParamPlaylistName  = "playlistName"
205
206         HTTPParamSignatureVersion    = "x-oss-signature-version"
207         HTTPParamExpiresV2           = "x-oss-expires"
208         HTTPParamAccessKeyIDV2       = "x-oss-access-key-id"
209         HTTPParamSignatureV2         = "x-oss-signature"
210         HTTPParamAdditionalHeadersV2 = "x-oss-additional-headers"
211 )
212
213 // Other constants
214 const (
215         MaxPartSize = 5 * 1024 * 1024 * 1024 // Max part size, 5GB
216         MinPartSize = 100 * 1024             // Min part size, 100KB
217
218         FilePermMode = os.FileMode(0664) // Default file permission
219
220         TempFilePrefix = "oss-go-temp-" // Temp file prefix
221         TempFileSuffix = ".temp"        // Temp file suffix
222
223         CheckpointFileSuffix = ".cp" // Checkpoint file suffix
224
225         NullVersion = "null"
226
227         Version = "v2.1.6" // Go SDK version
228 )
229
230 // FrameType
231 const (
232         DataFrameType        = 8388609
233         ContinuousFrameType  = 8388612
234         EndFrameType         = 8388613
235         MetaEndFrameCSVType  = 8388614
236         MetaEndFrameJSONType = 8388615
237 )
238
239 // AuthVersion the version of auth
240 type AuthVersionType string
241
242 const (
243         // AuthV1 v1
244         AuthV1 AuthVersionType = "v1"
245         // AuthV2 v2
246         AuthV2 AuthVersionType = "v2"
247 )