github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/obs/model_part.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 "io" 18 "time" 19 ) 20 21 // ListMultipartUploadsInput is the input parameter of ListMultipartUploads function 22 type ListMultipartUploadsInput struct { 23 Bucket string 24 Prefix string 25 MaxUploads int 26 Delimiter string 27 KeyMarker string 28 UploadIdMarker string 29 EncodingType string 30 } 31 32 // ListMultipartUploadsOutput is the result of ListMultipartUploads function 33 type ListMultipartUploadsOutput struct { 34 BaseModel 35 XMLName xml.Name `xml:"ListMultipartUploadsResult"` 36 Bucket string `xml:"Bucket"` 37 KeyMarker string `xml:"KeyMarker"` 38 NextKeyMarker string `xml:"NextKeyMarker"` 39 UploadIdMarker string `xml:"UploadIdMarker"` 40 NextUploadIdMarker string `xml:"NextUploadIdMarker"` 41 Delimiter string `xml:"Delimiter"` 42 IsTruncated bool `xml:"IsTruncated"` 43 MaxUploads int `xml:"MaxUploads"` 44 Prefix string `xml:"Prefix"` 45 Uploads []Upload `xml:"Upload"` 46 CommonPrefixes []string `xml:"CommonPrefixes>Prefix"` 47 EncodingType string `xml:"EncodingType,omitempty"` 48 } 49 50 // AbortMultipartUploadInput is the input parameter of AbortMultipartUpload function 51 type AbortMultipartUploadInput struct { 52 Bucket string 53 Key string 54 UploadId string 55 } 56 57 // InitiateMultipartUploadInput is the input parameter of InitiateMultipartUpload function 58 type InitiateMultipartUploadInput struct { 59 ObjectOperationInput 60 ContentType string 61 EncodingType string 62 } 63 64 // InitiateMultipartUploadOutput is the result of InitiateMultipartUpload function 65 type InitiateMultipartUploadOutput struct { 66 BaseModel 67 XMLName xml.Name `xml:"InitiateMultipartUploadResult"` 68 Bucket string `xml:"Bucket"` 69 Key string `xml:"Key"` 70 UploadId string `xml:"UploadId"` 71 SseHeader ISseHeader 72 EncodingType string `xml:"EncodingType,omitempty"` 73 } 74 75 // UploadPartInput is the input parameter of UploadPart function 76 type UploadPartInput struct { 77 Bucket string 78 Key string 79 PartNumber int 80 UploadId string 81 ContentMD5 string 82 SseHeader ISseHeader 83 Body io.Reader 84 SourceFile string 85 Offset int64 86 PartSize int64 87 } 88 89 // UploadPartOutput is the result of UploadPart function 90 type UploadPartOutput struct { 91 BaseModel 92 PartNumber int 93 ETag string 94 SseHeader ISseHeader 95 } 96 97 // CompleteMultipartUploadInput is the input parameter of CompleteMultipartUpload function 98 type CompleteMultipartUploadInput struct { 99 Bucket string `xml:"-"` 100 Key string `xml:"-"` 101 UploadId string `xml:"-"` 102 XMLName xml.Name `xml:"CompleteMultipartUpload"` 103 Parts []Part `xml:"Part"` 104 EncodingType string `xml:"-"` 105 } 106 107 // CompleteMultipartUploadOutput is the result of CompleteMultipartUpload function 108 type CompleteMultipartUploadOutput struct { 109 BaseModel 110 VersionId string `xml:"-"` 111 SseHeader ISseHeader `xml:"-"` 112 XMLName xml.Name `xml:"CompleteMultipartUploadResult"` 113 Location string `xml:"Location"` 114 Bucket string `xml:"Bucket"` 115 Key string `xml:"Key"` 116 ETag string `xml:"ETag"` 117 EncodingType string `xml:"EncodingType,omitempty"` 118 CallbackBody 119 } 120 121 // ListPartsInput is the input parameter of ListParts function 122 type ListPartsInput struct { 123 Bucket string 124 Key string 125 UploadId string 126 MaxParts int 127 PartNumberMarker int 128 EncodingType string 129 } 130 131 // ListPartsOutput is the result of ListParts function 132 type ListPartsOutput struct { 133 BaseModel 134 XMLName xml.Name `xml:"ListPartsResult"` 135 Bucket string `xml:"Bucket"` 136 Key string `xml:"Key"` 137 UploadId string `xml:"UploadId"` 138 PartNumberMarker int `xml:"PartNumberMarker"` 139 NextPartNumberMarker int `xml:"NextPartNumberMarker"` 140 MaxParts int `xml:"MaxParts"` 141 IsTruncated bool `xml:"IsTruncated"` 142 StorageClass StorageClassType `xml:"StorageClass"` 143 Initiator Initiator `xml:"Initiator"` 144 Owner Owner `xml:"Owner"` 145 Parts []Part `xml:"Part"` 146 EncodingType string `xml:"EncodingType,omitempty"` 147 } 148 149 // CopyPartInput is the input parameter of CopyPart function 150 type CopyPartInput struct { 151 Bucket string 152 Key string 153 UploadId string 154 PartNumber int 155 CopySourceBucket string 156 CopySourceKey string 157 CopySourceVersionId string 158 CopySourceRangeStart int64 159 CopySourceRangeEnd int64 160 SseHeader ISseHeader 161 SourceSseHeader ISseHeader 162 } 163 164 // CopyPartOutput is the result of CopyPart function 165 type CopyPartOutput struct { 166 BaseModel 167 XMLName xml.Name `xml:"CopyPartResult"` 168 PartNumber int `xml:"-"` 169 ETag string `xml:"ETag"` 170 LastModified time.Time `xml:"LastModified"` 171 SseHeader ISseHeader `xml:"-"` 172 }