Browse Source

Fix the param type

tags/v0.7.8
toranger 6 years ago
parent
commit
4294218982
  1. 2
      example/object/listParts.go
  2. 4
      object.go
  3. 10
      object_part.go

2
example/object/listParts.go

@ -69,7 +69,7 @@ func main() {
}
// opt := &cos.ObjectListPartsOptions{
// MaxParts: 1,
// MaxParts: "1",
// }
v, _, err := c.Object.ListParts(ctx, name, uploadID, nil)
if err != nil {

4
object.go

@ -412,8 +412,8 @@ func (s *ObjectService) DeleteMulti(ctx context.Context, opt *ObjectDeleteMultiO
type Object struct {
Key string `xml:",omitempty"`
ETag string `xml:",omitempty"`
Size int `xml:",omitempty"`
PartNumber int `xml:",omitempty"`
Size string `xml:",omitempty"`
PartNumber string `xml:",omitempty"`
LastModified string `xml:",omitempty"`
StorageClass string `xml:",omitempty"`
Owner *Owner `xml:",omitempty"`

10
object_part.go

@ -70,8 +70,8 @@ func (s *ObjectService) UploadPart(ctx context.Context, name, uploadID string, p
// ObjectListPartsOptions is the option of ListParts
type ObjectListPartsOptions struct {
EncodingType string `url:"Encoding-type,omitempty"`
MaxParts int `url:"max-parts,omitempty"`
PartNumberMarker int `url:"part-number-marker,omitempty"`
MaxParts string `url:"max-parts,omitempty"`
PartNumberMarker string `url:"part-number-marker,omitempty"`
}
// ObjectListPartsResult is the result of ListParts
@ -84,9 +84,9 @@ type ObjectListPartsResult struct {
Initiator *Initiator `xml:"Initiator,omitempty"`
Owner *Owner `xml:"Owner,omitempty"`
StorageClass string
PartNumberMarker int
NextPartNumberMarker int `xml:"NextPartNumberMarker,omitempty"`
MaxParts int
PartNumberMarker string
NextPartNumberMarker string `xml:"NextPartNumberMarker,omitempty"`
MaxParts string
IsTruncated bool
Parts []Object `xml:"Part,omitempty"`
}

Loading…
Cancel
Save