github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/obs/model_bucket.go (about) 1 // Copyright 2019 Huawei Technologies Co.,Ltd. 2 // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 3 // this file except in compliance with the License. You may obtain a copy of the 4 // License at 5 // 6 // http://www.apache.org/licenses/LICENSE-2.0 7 // 8 // Unless required by applicable law or agreed to in writing, software distributed 9 // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 10 // CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 // specific language governing permissions and limitations under the License. 12 13 package obs 14 15 import ( 16 "encoding/xml" 17 ) 18 19 // DeleteBucketCustomDomainInput is the input parameter of DeleteBucketCustomDomain function 20 type DeleteBucketCustomDomainInput struct { 21 Bucket string 22 CustomDomain string 23 } 24 25 // GetBucketCustomDomainOuput is the result of GetBucketCustomdomain function 26 type GetBucketCustomDomainOuput struct { 27 BaseModel 28 Domains []Domain `xml:"Domains"` 29 } 30 31 // SetBucketCustomDomainInput is the input parameter of SetBucketCustomDomain function 32 type SetBucketCustomDomainInput struct { 33 Bucket string 34 CustomDomain string 35 } 36 37 // GetBucketMirrorBackToSourceOuput is the result of GetBucketMirrorBackToSource function 38 type GetBucketMirrorBackToSourceOuput struct { 39 BaseModel 40 Rules string `json:"body"` 41 } 42 43 type SetBucketMirrorBackToSourceInput struct { 44 Bucket string 45 Rules string `json:"body"` 46 } 47 48 // Content defines the object content properties 49 type Domain struct { 50 DomainName string `xml:"DomainName"` 51 CreateTime string `xml:"CreateTime"` 52 } 53 54 // ListBucketsInput is the input parameter of ListBuckets function 55 type ListBucketsInput struct { 56 QueryLocation bool 57 BucketType BucketType 58 MaxKeys int 59 Marker string 60 } 61 62 // ListBucketsOutput is the result of ListBuckets function 63 type ListBucketsOutput struct { 64 BaseModel 65 XMLName xml.Name `xml:"ListAllMyBucketsResult"` 66 Owner Owner `xml:"Owner"` 67 Buckets []Bucket `xml:"Buckets>Bucket"` 68 IsTruncated bool `xml:"IsTruncated"` 69 Marker string `xml:"Marker"` 70 NextMarker string `xml:"NextMarker"` 71 MaxKeys int `xml:"MaxKeys"` 72 } 73 74 // CreateBucketInput is the input parameter of CreateBucket function 75 type CreateBucketInput struct { 76 BucketLocation 77 Bucket string `xml:"-"` 78 ACL AclType `xml:"-"` 79 StorageClass StorageClassType `xml:"-"` 80 GrantReadId string `xml:"-"` 81 GrantWriteId string `xml:"-"` 82 GrantReadAcpId string `xml:"-"` 83 GrantWriteAcpId string `xml:"-"` 84 GrantFullControlId string `xml:"-"` 85 GrantReadDeliveredId string `xml:"-"` 86 GrantFullControlDeliveredId string `xml:"-"` 87 Epid string `xml:"-"` 88 AvailableZone string `xml:"-"` 89 IsFSFileInterface bool `xml:"-"` 90 BucketRedundancy BucketRedundancyType `xml:"-"` 91 IsFusionAllowUpgrade bool `xml:"-"` 92 IsRedundancyAllowALT bool `xml:"-"` 93 } 94 95 // SetBucketStoragePolicyInput is the input parameter of SetBucketStoragePolicy function 96 type SetBucketStoragePolicyInput struct { 97 Bucket string `xml:"-"` 98 BucketStoragePolicy 99 } 100 101 type getBucketStoragePolicyOutputS3 struct { 102 BaseModel 103 BucketStoragePolicy 104 } 105 106 // GetBucketStoragePolicyOutput is the result of GetBucketStoragePolicy function 107 type GetBucketStoragePolicyOutput struct { 108 BaseModel 109 StorageClass string 110 } 111 112 type getBucketStoragePolicyOutputObs struct { 113 BaseModel 114 bucketStoragePolicyObs 115 } 116 117 // SetBucketQuotaInput is the input parameter of SetBucketQuota function 118 type SetBucketQuotaInput struct { 119 Bucket string `xml:"-"` 120 BucketQuota 121 } 122 123 // GetBucketQuotaOutput is the result of GetBucketQuota function 124 type GetBucketQuotaOutput struct { 125 BaseModel 126 BucketQuota 127 } 128 129 // GetBucketStorageInfoOutput is the result of GetBucketStorageInfo function 130 type GetBucketStorageInfoOutput struct { 131 BaseModel 132 XMLName xml.Name `xml:"GetBucketStorageInfoResult"` 133 Size int64 `xml:"Size"` 134 ObjectNumber int `xml:"ObjectNumber"` 135 } 136 137 type getBucketLocationOutputS3 struct { 138 BaseModel 139 BucketLocation 140 } 141 type getBucketLocationOutputObs struct { 142 BaseModel 143 bucketLocationObs 144 } 145 146 // GetBucketLocationOutput is the result of GetBucketLocation function 147 type GetBucketLocationOutput struct { 148 BaseModel 149 Location string `xml:"-"` 150 } 151 152 // GetBucketAclOutput is the result of GetBucketAcl function 153 type GetBucketAclOutput struct { 154 BaseModel 155 AccessControlPolicy 156 } 157 158 type getBucketACLOutputObs struct { 159 BaseModel 160 accessControlPolicyObs 161 } 162 163 // SetBucketAclInput is the input parameter of SetBucketAcl function 164 type SetBucketAclInput struct { 165 Bucket string `xml:"-"` 166 ACL AclType `xml:"-"` 167 AccessControlPolicy 168 } 169 170 // SetBucketPolicyInput is the input parameter of SetBucketPolicy function 171 type SetBucketPolicyInput struct { 172 Bucket string 173 Policy string 174 } 175 176 // GetBucketPolicyOutput is the result of GetBucketPolicy function 177 type GetBucketPolicyOutput struct { 178 BaseModel 179 Policy string `json:"body"` 180 } 181 182 // SetBucketCorsInput is the input parameter of SetBucketCors function 183 type SetBucketCorsInput struct { 184 Bucket string `xml:"-"` 185 BucketCors 186 } 187 188 // GetBucketCorsOutput is the result of GetBucketCors function 189 type GetBucketCorsOutput struct { 190 BaseModel 191 BucketCors 192 } 193 194 // SetBucketVersioningInput is the input parameter of SetBucketVersioning function 195 type SetBucketVersioningInput struct { 196 Bucket string `xml:"-"` 197 BucketVersioningConfiguration 198 } 199 200 // GetBucketVersioningOutput is the result of GetBucketVersioning function 201 type GetBucketVersioningOutput struct { 202 BaseModel 203 BucketVersioningConfiguration 204 } 205 206 // SetBucketWebsiteConfigurationInput is the input parameter of SetBucketWebsiteConfiguration function 207 type SetBucketWebsiteConfigurationInput struct { 208 Bucket string `xml:"-"` 209 BucketWebsiteConfiguration 210 } 211 212 // GetBucketWebsiteConfigurationOutput is the result of GetBucketWebsiteConfiguration function 213 type GetBucketWebsiteConfigurationOutput struct { 214 BaseModel 215 BucketWebsiteConfiguration 216 } 217 218 // GetBucketMetadataInput is the input parameter of GetBucketMetadata function 219 type GetBucketMetadataInput struct { 220 Bucket string 221 Origin string 222 RequestHeader string 223 } 224 225 // GetBucketMetadataOutput is the result of GetBucketMetadata function 226 type GetBucketMetadataOutput struct { 227 BaseModel 228 StorageClass StorageClassType 229 Location string 230 Version string 231 AllowOrigin string 232 AllowMethod string 233 AllowHeader string 234 MaxAgeSeconds int 235 ExposeHeader string 236 Epid string 237 AZRedundancy AvailableZoneType 238 FSStatus FSStatusType 239 BucketRedundancy BucketRedundancyType 240 } 241 242 // SetBucketLoggingConfigurationInput is the input parameter of SetBucketLoggingConfiguration function 243 type SetBucketLoggingConfigurationInput struct { 244 Bucket string `xml:"-"` 245 BucketLoggingStatus 246 } 247 248 // GetBucketLoggingConfigurationOutput is the result of GetBucketLoggingConfiguration function 249 type GetBucketLoggingConfigurationOutput struct { 250 BaseModel 251 BucketLoggingStatus 252 } 253 254 // BucketLifecycleConfiguration defines the bucket lifecycle configuration 255 type BucketLifecycleConfiguration struct { 256 XMLName xml.Name `xml:"LifecycleConfiguration"` 257 LifecycleRules []LifecycleRule `xml:"Rule"` 258 } 259 260 // SetBucketLifecycleConfigurationInput is the input parameter of SetBucketLifecycleConfiguration function 261 type SetBucketLifecycleConfigurationInput struct { 262 Bucket string `xml:"-"` 263 BucketLifecycleConfiguration 264 } 265 266 // GetBucketLifecycleConfigurationOutput is the result of GetBucketLifecycleConfiguration function 267 type GetBucketLifecycleConfigurationOutput struct { 268 BaseModel 269 BucketLifecycleConfiguration 270 } 271 272 // SetBucketEncryptionInput is the input parameter of SetBucketEncryption function 273 type SetBucketEncryptionInput struct { 274 Bucket string `xml:"-"` 275 BucketEncryptionConfiguration 276 } 277 278 // GetBucketEncryptionOutput is the result of GetBucketEncryption function 279 type GetBucketEncryptionOutput struct { 280 BaseModel 281 BucketEncryptionConfiguration 282 } 283 284 // SetBucketReplicationInput is the input parameter of SetBucketReplication function 285 type SetBucketReplicationInput struct { 286 Bucket string `xml:"-"` 287 BucketReplicationConfiguration 288 } 289 290 // GetBucketReplicationOutput is the result of GetBucketReplication function 291 type GetBucketReplicationOutput struct { 292 BaseModel 293 BucketReplicationConfiguration 294 } 295 296 // SetBucketTaggingInput is the input parameter of SetBucketTagging function 297 type SetBucketTaggingInput struct { 298 Bucket string `xml:"-"` 299 BucketTagging 300 } 301 302 // GetBucketTaggingOutput is the result of GetBucketTagging function 303 type GetBucketTaggingOutput struct { 304 BaseModel 305 BucketTagging 306 } 307 308 // SetBucketNotificationInput is the input parameter of SetBucketNotification function 309 type SetBucketNotificationInput struct { 310 Bucket string `xml:"-"` 311 BucketNotification 312 } 313 314 type getBucketNotificationOutputS3 struct { 315 BaseModel 316 bucketNotificationS3 317 } 318 319 // GetBucketNotificationOutput is the result of GetBucketNotification function 320 type GetBucketNotificationOutput struct { 321 BaseModel 322 BucketNotification 323 } 324 325 // SetBucketFetchPolicyInput is the input parameter of SetBucketFetchPolicy function 326 type SetBucketFetchPolicyInput struct { 327 Bucket string 328 Status FetchPolicyStatusType `json:"status"` 329 Agency string `json:"agency"` 330 } 331 332 // GetBucketFetchPolicyInput is the input parameter of GetBucketFetchPolicy function 333 type GetBucketFetchPolicyInput struct { 334 Bucket string 335 } 336 337 // GetBucketFetchPolicyOutput is the result of GetBucketFetchPolicy function 338 type GetBucketFetchPolicyOutput struct { 339 BaseModel 340 FetchResponse `json:"fetch"` 341 } 342 343 // DeleteBucketFetchPolicyInput is the input parameter of DeleteBucketFetchPolicy function 344 type DeleteBucketFetchPolicyInput struct { 345 Bucket string 346 } 347 348 // SetBucketFetchJobInput is the input parameter of SetBucketFetchJob function 349 type SetBucketFetchJobInput struct { 350 Bucket string `json:"bucket"` 351 URL string `json:"url"` 352 Host string `json:"host,omitempty"` 353 Key string `json:"key,omitempty"` 354 Md5 string `json:"md5,omitempty"` 355 CallBackURL string `json:"callbackurl,omitempty"` 356 CallBackBody string `json:"callbackbody,omitempty"` 357 CallBackBodyType string `json:"callbackbodytype,omitempty"` 358 CallBackHost string `json:"callbackhost,omitempty"` 359 FileType string `json:"file_type,omitempty"` 360 IgnoreSameKey bool `json:"ignore_same_key,omitempty"` 361 ObjectHeaders map[string]string `json:"objectheaders,omitempty"` 362 Etag string `json:"etag,omitempty"` 363 TrustName string `json:"trustname,omitempty"` 364 } 365 366 // SetBucketFetchJobOutput is the result of SetBucketFetchJob function 367 type SetBucketFetchJobOutput struct { 368 BaseModel 369 SetBucketFetchJobResponse 370 } 371 372 // GetBucketFetchJobInput is the input parameter of GetBucketFetchJob function 373 type GetBucketFetchJobInput struct { 374 Bucket string 375 JobID string 376 } 377 378 // GetBucketFetchJobOutput is the result of GetBucketFetchJob function 379 type GetBucketFetchJobOutput struct { 380 BaseModel 381 GetBucketFetchJobResponse 382 } 383 384 type GetBucketFSStatusInput struct { 385 GetBucketMetadataInput 386 } 387 388 type GetBucketFSStatusOutput struct { 389 GetBucketMetadataOutput 390 FSStatus FSStatusType 391 }