forked from huaweicloud/huaweicloud-obs-obsutil
/
model.go
1011 lines (878 loc) · 25.4 KB
/
model.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
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2019 Huawei Technologies Co.,Ltd.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
package obs
import (
"context"
"encoding/xml"
"io"
"net/http"
"time"
)
type BaseModel struct {
StatusCode int `xml:"-"`
RequestId string `xml:"RequestId"`
ResponseHeaders map[string][]string `xml:"-"`
}
type Bucket struct {
XMLName xml.Name `xml:"Bucket"`
Name string `xml:"Name"`
CreationDate time.Time `xml:"CreationDate"`
Location string `xml:"Location"`
BucketType string `xml:"BucketType,omitempty"`
}
type Owner struct {
XMLName xml.Name `xml:"Owner"`
ID string `xml:"ID"`
DisplayName string `xml:"DisplayName,omitempty"`
}
type Initiator struct {
XMLName xml.Name `xml:"Initiator"`
ID string `xml:"ID"`
DisplayName string `xml:"DisplayName,omitempty"`
}
type ListBucketsInput struct {
QueryLocation bool
}
type ListBucketsOutput struct {
BaseModel
XMLName xml.Name `xml:"ListAllMyBucketsResult"`
Owner Owner `xml:"Owner"`
Buckets []Bucket `xml:"Buckets>Bucket"`
}
type BucketLocation struct {
XMLName xml.Name `xml:"CreateBucketConfiguration"`
Location string `xml:"LocationConstraint"`
}
type CreateBucketInput struct {
BucketLocation
Bucket string `xml:"-"`
ACL AclType `xml:"-"`
StorageClass StorageClassType `xml:"-"`
AvailableZone AvailableZoneType `xml:"-"`
}
type NewBucketInput struct {
CreateBucketInput
}
type BucketStoragePolicy struct {
XMLName xml.Name `xml:"StoragePolicy"`
StorageClass StorageClassType `xml:"DefaultStorageClass"`
}
type SetBucketStoragePolicyInput struct {
Bucket string `xml:"-"`
BucketStoragePolicy
RequestPayer string `xml:"-"`
}
type GetBucketStoragePolicyOutput struct {
BaseModel
BucketStoragePolicy
}
type ListObjsInput struct {
Prefix string
MaxKeys int
Delimiter string
Origin string
RequestHeader string
}
type ListObjectsInput struct {
ListObjsInput
Bucket string
Marker string
RequestPayer string
}
type Content struct {
XMLName xml.Name `xml:"Contents"`
Owner Owner `xml:"Owner"`
ETag string `xml:"ETag"`
Key string `xml:"Key"`
LastModified time.Time `xml:"LastModified"`
Size int64 `xml:"Size"`
StorageClass StorageClassType `xml:"StorageClass"`
}
type ListObjectsOutput struct {
BaseModel
XMLName xml.Name `xml:"ListBucketResult"`
Delimiter string `xml:"Delimiter"`
IsTruncated bool `xml:"IsTruncated"`
Marker string `xml:"Marker"`
NextMarker string `xml:"NextMarker"`
MaxKeys int `xml:"MaxKeys"`
Name string `xml:"Name"`
Prefix string `xml:"Prefix"`
Contents []Content `xml:"Contents"`
CommonPrefixes []string `xml:"CommonPrefixes>Prefix"`
Location string `xml:"-"`
}
type ListVersionsInput struct {
ListObjsInput
Bucket string
KeyMarker string
VersionIdMarker string
RequestPayer string
}
type Version struct {
DeleteMarker
XMLName xml.Name `xml:"Version"`
ETag string `xml:"ETag"`
Size int64 `xml:"Size"`
}
type DeleteMarker struct {
XMLName xml.Name `xml:"DeleteMarker"`
Key string `xml:"Key"`
VersionId string `xml:"VersionId"`
IsLatest bool `xml:"IsLatest"`
LastModified time.Time `xml:"LastModified"`
Owner Owner `xml:"Owner"`
StorageClass StorageClassType `xml:"StorageClass"`
}
type ListVersionsOutput struct {
BaseModel
XMLName xml.Name `xml:"ListVersionsResult"`
Delimiter string `xml:"Delimiter"`
IsTruncated bool `xml:"IsTruncated"`
KeyMarker string `xml:"KeyMarker"`
NextKeyMarker string `xml:"NextKeyMarker"`
VersionIdMarker string `xml:"VersionIdMarker"`
NextVersionIdMarker string `xml:"NextVersionIdMarker"`
MaxKeys int `xml:"MaxKeys"`
Name string `xml:"Name"`
Prefix string `xml:"Prefix"`
Versions []Version `xml:"Version"`
DeleteMarkers []DeleteMarker `xml:"DeleteMarker"`
CommonPrefixes []string `xml:"CommonPrefixes>Prefix"`
Location string `xml:"-"`
}
type ListMultipartUploadsInput struct {
Bucket string
Prefix string
MaxUploads int
Delimiter string
KeyMarker string
UploadIdMarker string
RequestPayer string
}
type Upload struct {
XMLName xml.Name `xml:"Upload"`
Key string `xml:"Key"`
UploadId string `xml:"UploadId"`
Initiated time.Time `xml:"Initiated"`
StorageClass StorageClassType `xml:"StorageClass"`
Owner Owner `xml:"Owner"`
Initiator Initiator `xml:"Initiator"`
}
type ListMultipartUploadsOutput struct {
BaseModel
XMLName xml.Name `xml:"ListMultipartUploadsResult"`
Bucket string `xml:"Bucket"`
KeyMarker string `xml:"KeyMarker"`
NextKeyMarker string `xml:"NextKeyMarker"`
UploadIdMarker string `xml:"UploadIdMarker"`
NextUploadIdMarker string `xml:"NextUploadIdMarker"`
Delimiter string `xml:"Delimiter"`
IsTruncated bool `xml:"IsTruncated"`
MaxUploads int `xml:"MaxUploads"`
Prefix string `xml:"Prefix"`
Uploads []Upload `xml:"Upload"`
CommonPrefixes []string `xml:"CommonPrefixes>Prefix"`
}
type BucketQuota struct {
XMLName xml.Name `xml:"Quota"`
Quota int64 `xml:"StorageQuota"`
}
type SetBucketQuotaInput struct {
Bucket string `xml:"-"`
BucketQuota
RequestPayer string `xml:"-"`
}
type GetBucketQuotaOutput struct {
BaseModel
BucketQuota
}
type GetBucketStorageInfoOutput struct {
BaseModel
XMLName xml.Name `xml:"GetBucketStorageInfoResult"`
Size int64 `xml:"Size"`
ObjectNumber int `xml:"ObjectNumber"`
}
type GetBucketLocationOutput struct {
BaseModel
BucketLocation
}
type Grantee struct {
XMLName xml.Name `xml:"Grantee"`
Type GranteeType `xml:"type,attr"`
ID string `xml:"ID,omitempty"`
DisplayName string `xml:"DisplayName,omitempty"`
URI GroupUriType `xml:"URI,omitempty"`
}
type Grant struct {
XMLName xml.Name `xml:"Grant"`
Grantee Grantee `xml:"Grantee"`
Permission PermissionType `xml:"Permission"`
}
type AccessControlPolicy struct {
XMLName xml.Name `xml:"AccessControlPolicy"`
Owner Owner `xml:"Owner"`
Grants []Grant `xml:"AccessControlList>Grant"`
}
type GetBucketAclOutput struct {
BaseModel
AccessControlPolicy
}
type SetBucketAclInput struct {
Bucket string `xml:"-"`
ACL AclType `xml:"-"`
AccessControlPolicy
RequestPayer string
}
type SetBucketPolicyInput struct {
Bucket string
Policy string
RequestPayer string
}
type GetBucketPolicyOutput struct {
BaseModel
Policy string `body`
}
type CorsRule struct {
XMLName xml.Name `xml:"CORSRule"`
ID string `xml:"ID,omitempty"`
AllowedOrigin []string `xml:"AllowedOrigin"`
AllowedMethod []string `xml:"AllowedMethod"`
AllowedHeader []string `xml:"AllowedHeader,omitempty"`
MaxAgeSeconds int `xml:"MaxAgeSeconds"`
ExposeHeader []string `xml:"ExposeHeader,omitempty"`
}
type BucketCors struct {
XMLName xml.Name `xml:"CORSConfiguration"`
CorsRules []CorsRule `xml:"CORSRule"`
}
type SetBucketCorsInput struct {
Bucket string `xml:"-"`
BucketCors
RequestPayer string
}
type GetBucketCorsOutput struct {
BaseModel
BucketCors
}
type BucketVersioningConfiguration struct {
XMLName xml.Name `xml:"VersioningConfiguration"`
Status VersioningStatusType `xml:"Status"`
}
type SetBucketVersioningInput struct {
Bucket string `xml:"-"`
BucketVersioningConfiguration
RequestPayer string `xml:"-"`
}
type GetBucketVersioningOutput struct {
BaseModel
BucketVersioningConfiguration
}
type IndexDocument struct {
Suffix string `xml:"Suffix"`
}
type ErrorDocument struct {
Key string `xml:"Key,omitempty"`
}
type Condition struct {
XMLName xml.Name `xml:"Condition"`
KeyPrefixEquals string `xml:"KeyPrefixEquals,omitempty"`
HttpErrorCodeReturnedEquals string `xml:"HttpErrorCodeReturnedEquals,omitempty"`
}
type Redirect struct {
XMLName xml.Name `xml:"Redirect"`
Protocol ProtocolType `xml:"Protocol,omitempty"`
HostName string `xml:"HostName,omitempty"`
ReplaceKeyPrefixWith string `xml:"ReplaceKeyPrefixWith,omitempty"`
ReplaceKeyWith string `xml:"ReplaceKeyWith,omitempty"`
HttpRedirectCode string `xml:"HttpRedirectCode,omitempty"`
}
type RoutingRule struct {
XMLName xml.Name `xml:"RoutingRule"`
Condition Condition `xml:"Condition,omitempty"`
Redirect Redirect `xml:"Redirect"`
}
type RedirectAllRequestsTo struct {
XMLName xml.Name `xml:"RedirectAllRequestsTo"`
Protocol ProtocolType `xml:"Protocol,omitempty"`
HostName string `xml:"HostName"`
}
type BucketWebsiteConfiguration struct {
XMLName xml.Name `xml:"WebsiteConfiguration"`
RedirectAllRequestsTo RedirectAllRequestsTo `xml:"RedirectAllRequestsTo,omitempty"`
IndexDocument IndexDocument `xml:"IndexDocument,omitempty"`
ErrorDocument ErrorDocument `xml:"ErrorDocument,omitempty"`
RoutingRules []RoutingRule `xml:"RoutingRules>RoutingRule,omitempty"`
}
type SetBucketWebsiteConfigurationInput struct {
Bucket string `xml:"-"`
BucketWebsiteConfiguration
RequestPayer string
}
type GetBucketWebsiteConfigurationOutput struct {
BaseModel
BucketWebsiteConfiguration
}
type GetBucketMetadataInput struct {
Bucket string
Origin string
RequestHeader string
RequestPayer string
}
type GetBucketMetadataOutput struct {
BaseModel
StorageClass StorageClassType
Location string
ObsVersion string
AllowOrigin string
AllowMethod string
AllowHeader string
MaxAgeSeconds int
ExposeHeader string
AvailableZone AvailableZoneType
}
type GetBucketFSStatusInput struct {
GetBucketMetadataInput
}
type GetBucketFSStatusOutput struct {
GetBucketMetadataOutput
FSStatus FSStatusType
}
type BucketLoggingStatus struct {
XMLName xml.Name `xml:"BucketLoggingStatus"`
TargetBucket string `xml:"LoggingEnabled>TargetBucket,omitempty"`
TargetPrefix string `xml:"LoggingEnabled>TargetPrefix,omitempty"`
TargetGrants []Grant `xml:"LoggingEnabled>TargetGrants>Grant,omitempty"`
}
type SetBucketLoggingConfigurationInput struct {
Bucket string `xml:"-"`
BucketLoggingStatus
RequestPayer string
}
type GetBucketLoggingConfigurationOutput struct {
BaseModel
BucketLoggingStatus
}
type Transition struct {
XMLName xml.Name `xml:"Transition"`
Date time.Time `xml:"Date,omitempty"`
Days int `xml:"Days,omitempty"`
StorageClass StorageClassType `xml:"StorageClass"`
}
type Expiration struct {
XMLName xml.Name `xml:"Expiration"`
Date time.Time `xml:"Date,omitempty"`
Days int `xml:"Days,omitempty"`
}
type NoncurrentVersionTransition struct {
XMLName xml.Name `xml:"NoncurrentVersionTransition"`
NoncurrentDays int `xml:"NoncurrentDays"`
StorageClass StorageClassType `xml:"StorageClass"`
}
type NoncurrentVersionExpiration struct {
XMLName xml.Name `xml:"NoncurrentVersionExpiration"`
NoncurrentDays int `xml:"NoncurrentDays"`
}
type LifecycleRule struct {
ID string `xml:"ID,omitempty"`
Prefix string `xml:"Prefix"`
Status RuleStatusType `xml:"Status"`
Transitions []Transition `xml:"Transition,omitempty"`
Expiration Expiration `xml:"Expiration,omitempty"`
NoncurrentVersionTransitions []NoncurrentVersionTransition `xml:"NoncurrentVersionTransition,omitempty"`
NoncurrentVersionExpiration NoncurrentVersionExpiration `xml:"NoncurrentVersionExpiration,omitempty"`
}
type BucketLifecyleConfiguration struct {
XMLName xml.Name `xml:"LifecycleConfiguration"`
LifecycleRules []LifecycleRule `xml:"Rule"`
}
type SetBucketLifecycleConfigurationInput struct {
Bucket string `xml:"-"`
BucketLifecyleConfiguration
RequestPayer string
}
type GetBucketLifecycleConfigurationOutput struct {
BaseModel
BucketLifecyleConfiguration
}
type Tag struct {
XMLName xml.Name `xml:"Tag"`
Key string `xml:"Key"`
Value string `xml:"Value"`
}
type BucketTagging struct {
XMLName xml.Name `xml:"Tagging"`
Tags []Tag `xml:"TagSet>Tag"`
}
type SetBucketTaggingInput struct {
Bucket string `xml:"-"`
BucketTagging
RequestPayer string
}
type GetBucketTaggingOutput struct {
BaseModel
BucketTagging
}
type FilterRule struct {
XMLName xml.Name `xml:"FilterRule"`
Name string `xml:"Name,omitempty"`
Value string `xml:"Value,omitempty"`
}
type TopicConfiguration struct {
XMLName xml.Name `xml:"TopicConfiguration"`
ID string `xml:"Id,omitempty"`
Topic string `xml:"Topic"`
Events []string `xml:"Event"`
FilterRules []FilterRule `xml:"Filter>S3Key>FilterRule"`
}
type BucketNotification struct {
XMLName xml.Name `xml:"NotificationConfiguration"`
TopicConfigurations []TopicConfiguration `xml:"TopicConfiguration"`
}
type SetBucketNotificationInput struct {
Bucket string `xml:"-"`
BucketNotification
RequestPayer string
}
type GetBucketNotificationOutput struct {
BaseModel
BucketNotification
}
type DeleteObjectInput struct {
ContextWrapper
Bucket string
Key string
VersionId string
RequestPayer string
}
type DeleteObjectOutput struct {
BaseModel
VersionId string
DeleteMarker bool
}
type DropFileInput struct {
DeleteObjectInput
RequestPayer string
}
type DropFileOutput struct {
DeleteObjectOutput
}
type ObjectToDelete struct {
XMLName xml.Name `xml:"Object"`
Key string `xml:"Key"`
VersionId string `xml:"VersionId,omitempty"`
}
type DeleteObjectsInput struct {
ContextWrapper
Bucket string `xml:"-"`
XMLName xml.Name `xml:"Delete"`
Quiet bool `xml:"Quiet,omitempty"`
Objects []ObjectToDelete `xml:"Object"`
RequestPayer string
}
type Deleted struct {
XMLName xml.Name `xml:"Deleted"`
Key string `xml:"Key"`
VersionId string `xml:"VersionId"`
DeleteMarker bool `xml:"DeleteMarker"`
DeleteMarkerVersionId string `xml:"DeleteMarkerVersionId"`
}
type Error struct {
XMLName xml.Name `xml:"Error"`
Key string `xml:"Key"`
VersionId string `xml:"VersionId"`
Code string `xml:"Code"`
Message string `xml:"Message"`
}
type DeleteObjectsOutput struct {
BaseModel
XMLName xml.Name `xml:"DeleteResult"`
Deleteds []Deleted `xml:"Deleted"`
Errors []Error `xml:"Error"`
}
type SetObjectAclInput struct {
Bucket string `xml:"-"`
Key string `xml:"-"`
VersionId string `xml:"-"`
ACL AclType `xml:"-"`
AccessControlPolicy
RequestPayer string
}
type GetObjectAclInput struct {
Bucket string
Key string
VersionId string
RequestPayer string
}
type GetObjectAclOutput struct {
BaseModel
VersionId string
AccessControlPolicy
}
type RestoreObjectInput struct {
Bucket string `xml:"-"`
Key string `xml:"-"`
VersionId string `xml:"-"`
XMLName xml.Name `xml:"RestoreRequest"`
Days int `xml:"Days"`
Tier RestoreTierType `xml:"GlacierJobParameters>Tier,omitempty"`
RequestPayer string
}
type ISseHeader interface {
GetEncryption() string
GetKey() string
}
type SseKmsHeader struct {
Encryption string
Key string
}
type SseCHeader struct {
Encryption string
Key string
KeyMD5 string
}
type ContextWrapper struct {
Context context.Context `xml:"-"`
}
type GetObjectMetadataInput struct {
ContextWrapper
Bucket string
Key string
VersionId string
Origin string
RequestHeader string
SseHeader ISseHeader
RequestPayer string
}
type GetObjectMetadataOutput struct {
BaseModel
VersionId string
WebsiteRedirectLocation string
Expiration string
Restore string
StorageClass StorageClassType
ContentLength int64
ContentType string
ETag string
AllowOrigin string
AllowHeader string
AllowMethod string
ExposeHeader string
MaxAgeSeconds int
LastModified time.Time
SseHeader ISseHeader
Metadata map[string]string
}
type GetAttributeInput struct {
GetObjectMetadataInput
RequestPayer string
}
type GetAttributeOutput struct {
GetObjectMetadataOutput
Mode int
}
type SetObjectMetadataInput struct {
Bucket string
Key string
VersionId string
MetadataDirective MetadataDirectiveType
CacheControl string
ContentDisposition string
ContentEncoding string
ContentLanguage string
ContentType string
Expires string
WebsiteRedirectLocation string
StorageClass StorageClassType
Metadata map[string]string
RequestPayer string
}
type SetObjectMetadataOutput struct {
BaseModel
MetadataDirective MetadataDirectiveType
CacheControl string
ContentDisposition string
ContentEncoding string
ContentLanguage string
ContentType string
Expires string
WebsiteRedirectLocation string
StorageClass StorageClassType
Metadata map[string]string
}
type GetObjectInput struct {
GetObjectMetadataInput
IfMatch string
IfNoneMatch string
IfUnmodifiedSince time.Time
IfModifiedSince time.Time
RangeStart int64
RangeEnd int64
ImageProcess string
ResponseCacheControl string
ResponseContentDisposition string
ResponseContentEncoding string
ResponseContentLanguage string
ResponseContentType string
ResponseExpires string
RequestPayer string
}
type GetObjectOutput struct {
GetObjectMetadataOutput
DeleteMarker bool
CacheControl string
ContentDisposition string
ContentEncoding string
ContentLanguage string
Expires string
Body io.ReadCloser
}
type ObjectOperationInput struct {
ContextWrapper
Bucket string
Key string
ACL AclType
StorageClass StorageClassType
WebsiteRedirectLocation string
SseHeader ISseHeader
Metadata map[string]string
RequestPayer string
}
type PutObjectBasicInput struct {
ObjectOperationInput
ContentType string
ContentMD5 string
ContentLength int64
RequestPayer string
}
type PutObjectInput struct {
PutObjectBasicInput
Body io.Reader
RequestPayer string
}
type NewFolderInput struct {
ObjectOperationInput
RequestPayer string
}
type NewFileInput struct {
PutObjectInput
RequestPayer string
}
type PutFileInput struct {
PutObjectBasicInput
SourceFile string
RequestPayer string
}
type PutObjectOutput struct {
BaseModel
VersionId string
SseHeader ISseHeader
StorageClass StorageClassType
ETag string
ObjectUrl string
}
type NewFolderOutput struct {
PutObjectOutput
}
type NewFileOutput struct {
PutObjectOutput
}
type CopyObjectInput struct {
ObjectOperationInput
CopySourceBucket string
CopySourceKey string
CopySourceVersionId string
CopySourceIfMatch string
CopySourceIfNoneMatch string
CopySourceIfUnmodifiedSince time.Time
CopySourceIfModifiedSince time.Time
SourceSseHeader ISseHeader
CacheControl string
ContentDisposition string
ContentEncoding string
ContentLanguage string
ContentType string
Expires string
MetadataDirective MetadataDirectiveType
RequestPayer string
}
type CopyObjectOutput struct {
BaseModel
CopySourceVersionId string `xml:"-"`
VersionId string `xml:"-"`
SseHeader ISseHeader `xml:"-"`
XMLName xml.Name `xml:"CopyObjectResult"`
LastModified time.Time `xml:"LastModified"`
ETag string `xml:"ETag"`
}
type AbortMultipartUploadInput struct {
ContextWrapper
Bucket string
Key string
UploadId string
RequestPayer string
}
type InitiateMultipartUploadInput struct {
ObjectOperationInput
ContentType string
RequestPayer string
}
type InitiateMultipartUploadOutput struct {
BaseModel
XMLName xml.Name `xml:"InitiateMultipartUploadResult"`
Bucket string `xml:"Bucket"`
Key string `xml:"Key"`
UploadId string `xml:"UploadId"`
SseHeader ISseHeader
}
type UploadPartInput struct {
ContextWrapper
Bucket string
Key string
PartNumber int
UploadId string
ContentMD5 string
SseHeader ISseHeader
Body io.Reader
SourceFile string
Offset int64
PartSize int64
RequestPayer string
}
type UploadPartOutput struct {
BaseModel
PartNumber int
ETag string
SseHeader ISseHeader
}
type Part struct {
XMLName xml.Name `xml:"Part"`
PartNumber int `xml:"PartNumber"`
ETag string `xml:"ETag"`
LastModified time.Time `xml:"LastModified,omitempty"`
Size int64 `xml:"Size,omitempty"`
}
type CompleteMultipartUploadInput struct {
ContextWrapper
Bucket string `xml:"-"`
Key string `xml:"-"`
UploadId string `xml:"-"`
XMLName xml.Name `xml:"CompleteMultipartUpload"`
Parts []Part `xml:"Part"`
RequestPayer string
}
type CompleteMultipartUploadOutput struct {
BaseModel
VersionId string `xml:"-"`
SseHeader ISseHeader `xml:"-"`
XMLName xml.Name `xml:"CompleteMultipartUploadResult"`
Location string `xml:"Location"`
Bucket string `xml:"Bucket"`
Key string `xml:"Key"`
ETag string `xml:"ETag"`
}
type ListPartsInput struct {
Bucket string
Key string
UploadId string
MaxParts int
PartNumberMarker int
RequestPayer string
}
type ListPartsOutput struct {
BaseModel
XMLName xml.Name `xml:"ListPartsResult"`
Bucket string `xml:"Bucket"`
Key string `xml:"Key"`
UploadId string `xml:"UploadId"`
PartNumberMarker int `xml:"PartNumberMarker"`
NextPartNumberMarker int `xml:"NextPartNumberMarker"`
MaxParts int `xml:"MaxParts"`
IsTruncated bool `xml:"IsTruncated"`
StorageClass StorageClassType `xml:"StorageClass"`
Initiator Initiator `xml:"Initiator"`
Owner Owner `xml:"Owner"`
Parts []Part `xml:"Part"`
}
type CopyPartInput struct {
ContextWrapper
Bucket string
Key string
UploadId string
PartNumber int
CopySourceBucket string
CopySourceKey string
CopySourceVersionId string
CopySourceRangeStart int64
CopySourceRangeEnd int64
SseHeader ISseHeader
SourceSseHeader ISseHeader
RequestPayer string
}
type CopyPartOutput struct {
BaseModel
XMLName xml.Name `xml:"CopyPartResult"`
PartNumber int `xml:"-"`
ETag string `xml:"ETag"`
LastModified time.Time `xml:"LastModified"`
SseHeader ISseHeader `xml:"-"`
}
type CreateSignedUrlInput struct {
Method HttpMethodType
Bucket string
Key string
Policy string
SubResource SubResourceType
Expires int
Headers map[string]string
QueryParams map[string]string
RequestPayer string
}
type CreateSignedUrlOutput struct {
SignedUrl string
ActualSignedRequestHeaders http.Header
}
type CreateBrowserBasedSignatureInput struct {
Bucket string
Key string
Expires int
FormParams map[string]string
RequestPayer string
}
type CreateBrowserBasedSignatureOutput struct {
OriginPolicy string
Policy string
Algorithm string
Credential string
Date string
Signature string
}
type RenameFileInput struct {
ContextWrapper
Bucket string
Key string
NewObjectKey string
RequestPayer string
}
type RenameFolderInput struct {
ContextWrapper
Bucket string
Key string