From 42942189828f83d1dd69a44daa198abef944336f Mon Sep 17 00:00:00 2001 From: toranger Date: Mon, 1 Jul 2019 11:57:11 +0800 Subject: [PATCH] Fix the param type --- example/object/listParts.go | 2 +- object.go | 4 ++-- object_part.go | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/example/object/listParts.go b/example/object/listParts.go index 20ec7aa..ecf8674 100644 --- a/example/object/listParts.go +++ b/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 { diff --git a/object.go b/object.go index edde8ea..dcd74bd 100644 --- a/object.go +++ b/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"` diff --git a/object_part.go b/object_part.go index dc7185e..6ef5773 100644 --- a/object_part.go +++ b/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"` }