From a73db4f4240d226efeb01f426d4350fe9abcd901 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Jul 2021 11:07:43 +0000 Subject: [PATCH 1/2] build(deps): bump github.com/beyondstorage/go-integration-test/v4 Bumps [github.com/beyondstorage/go-integration-test/v4](https://github.com/beyondstorage/go-integration-test) from 4.1.1 to 4.2.0. - [Release notes](https://github.com/beyondstorage/go-integration-test/releases) - [Changelog](https://github.com/beyondstorage/go-integration-test/blob/master/CHANGELOG.md) - [Commits](https://github.com/beyondstorage/go-integration-test/compare/v4.1.1...v4.2.0) --- updated-dependencies: - dependency-name: github.com/beyondstorage/go-integration-test/v4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 37 ++++++++++++++++++++++++------------- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 0add84a..b5fb932 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.14 require ( github.com/aws/aws-sdk-go v1.38.68 github.com/beyondstorage/go-endpoint v1.0.1 - github.com/beyondstorage/go-integration-test/v4 v4.1.1 - github.com/beyondstorage/go-storage/v4 v4.2.0 - github.com/google/uuid v1.2.0 + github.com/beyondstorage/go-integration-test/v4 v4.2.0 + github.com/beyondstorage/go-storage/v4 v4.3.2 + github.com/google/uuid v1.3.0 ) diff --git a/go.sum b/go.sum index 17c4bf9..4759eda 100644 --- a/go.sum +++ b/go.sum @@ -4,12 +4,11 @@ github.com/aws/aws-sdk-go v1.38.68 h1:aOG8geU4SohNp659eKBHRBgbqSrZ6jNZlfimIuJAwL github.com/aws/aws-sdk-go v1.38.68/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/beyondstorage/go-endpoint v1.0.1 h1:F8x2dGLMu9je6g7zPbKoxCXDlug97K26SeCx7KEHgyg= github.com/beyondstorage/go-endpoint v1.0.1/go.mod h1:P2hknaGrziOJJKySv/XnAiVw/d3v12/LZu2gSxEx4nM= -github.com/beyondstorage/go-integration-test/v4 v4.1.1 h1:9bSXKbr6hLb4+ZsmAhWE32fvqhyrpub4U4qgBGeth4A= -github.com/beyondstorage/go-integration-test/v4 v4.1.1/go.mod h1:ihtCaOJvaHGE0v+IhY6ZUF5NU1IND6xmdrJI9Lq/jhc= -github.com/beyondstorage/go-storage/v4 v4.2.0 h1:J0xqqy4qEQRtIS2zUWMA5wRXVHx/cxX5fHsU2ezA3+I= -github.com/beyondstorage/go-storage/v4 v4.2.0/go.mod h1:rUNzOXcikYk5w0ewvNsKbztg7ndQDyDvjDuP0bznSLU= -github.com/beyondstorage/specs/go v0.0.0-20210623065218-d1c2d7d81259 h1:mW9XpHLc6pdXBRnsha1VlqF0rNsB/Oc+8l+5UYngmRA= -github.com/beyondstorage/specs/go v0.0.0-20210623065218-d1c2d7d81259/go.mod h1:vF/Q0P1tCvhVAUrxg7i6NvrARRMQVTAuQdDNqpSzR1w= +github.com/beyondstorage/go-integration-test/v4 v4.2.0 h1:h2+SLmlDqjfBg+NzVcDr6VCmcD7I2xG+mqMzDlaCG+0= +github.com/beyondstorage/go-integration-test/v4 v4.2.0/go.mod h1:jLyYWSGUjQRH7U1HdaLbXE5sxBgqrtK73q+Q7PGIuSs= +github.com/beyondstorage/go-storage/v4 v4.3.0/go.mod h1:0fdcRCzLKMQe7Ve4zPlyTGgoPYwuINiV79Gx9tCt9tQ= +github.com/beyondstorage/go-storage/v4 v4.3.2 h1:F3xQVTcBJ+nSzEt/wBZCx4pE7aYhy43+tn1mwMYCacE= +github.com/beyondstorage/go-storage/v4 v4.3.2/go.mod h1:8FHjTUFuwLl/mmIGpOL9g3RTZPyye7vneFN/JkRj5Tg= github.com/dave/dst v0.26.2 h1:lnxLAKI3tx7MgLNVDirFCsDTlTG9nKTk7GcptKcWSwY= github.com/dave/dst v0.26.2/go.mod h1:UMDJuIRPfyUCC78eFuB+SV/WI8oDeyFDvM/JR6NI3IU= github.com/dave/gopackages v0.0.0-20170318123100-46e7023ec56e/go.mod h1:i00+b/gKdIDIxuLDFob7ustLAVqhsZRk2qVZrArELGQ= @@ -19,11 +18,13 @@ github.com/dave/rebecca v0.9.1/go.mod h1:N6XYdMD/OKw3lkF3ywh8Z6wPGuwNFDNtWYEMFWE github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/golang/mock v1.5.0 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/google/pprof v0.0.0-20181127221834-b4f47329b966/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -58,39 +59,49 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/arch v0.0.0-20180920145803-b19384d3c130/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5 h1:MeC2gMlMdkd67dn17MEby3rGXRxZtWeiRXOnISfTQ74= golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.1.1 h1:wGiQel/hW0NnEkJUk8lbzkX2gFJU6PFxf1v5OlCfuOs= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 14cf65e1ae242a0039e1c2c3c9a46e0432762512 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 15 Jul 2021 11:08:42 +0000 Subject: [PATCH 2/2] Commit from GitHub Actions (Dependabot auto build) --- generated.go | 127 ++++++++++++++------------------------------------- 1 file changed, 34 insertions(+), 93 deletions(-) diff --git a/generated.go b/generated.go index 38d880f..27254cc 100644 --- a/generated.go +++ b/generated.go @@ -6,14 +6,12 @@ import ( "io" "github.com/beyondstorage/go-storage/v4/pkg/credential" - "github.com/beyondstorage/go-storage/v4/pkg/endpoint" "github.com/beyondstorage/go-storage/v4/pkg/httpclient" "github.com/beyondstorage/go-storage/v4/services" . "github.com/beyondstorage/go-storage/v4/types" ) var _ credential.Provider -var _ endpoint.Value var _ Storager var _ services.ServiceError var _ httpclient.Options @@ -21,49 +19,6 @@ var _ httpclient.Options // Type is the type for s3 const Type = "s3" -// ObjectMetadata stores service metadata for object. -// -// Deprecated: Use ObjectSystemMetadata instead. -type ObjectMetadata struct { - // ServerSideEncryption - ServerSideEncryption string - // ServerSideEncryptionAwsKmsKeyID - ServerSideEncryptionAwsKmsKeyID string - // ServerSideEncryptionBucketKeyEnabled - ServerSideEncryptionBucketKeyEnabled bool - // ServerSideEncryptionContext - ServerSideEncryptionContext string - // ServerSideEncryptionCustomerAlgorithm - ServerSideEncryptionCustomerAlgorithm string - // ServerSideEncryptionCustomerKeyMd5 - ServerSideEncryptionCustomerKeyMd5 string - // StorageClass - StorageClass string -} - -// GetObjectMetadata will get ObjectMetadata from Object. -// -// - This function should not be called by service implementer. -// - The returning ObjectMetadata is read only and should not be modified. -// -// Deprecated: Use GetObjectSystemMetadata instead. -func GetObjectMetadata(o *Object) ObjectMetadata { - om, ok := o.GetServiceMetadata() - if ok { - return om.(ObjectMetadata) - } - return ObjectMetadata{} -} - -// setObjectMetadata will set ObjectMetadata into Object. -// -// - This function should only be called once, please make sure all data has been written before set. -// -// Deprecated: Use setObjectSystemMetadata instead. -func setObjectMetadata(o *Object, om ObjectMetadata) { - o.SetServiceMetadata(om) -} - // ObjectSystemMetadata stores system metadata for object. type ObjectSystemMetadata struct { // ServerSideEncryption @@ -324,22 +279,6 @@ var ( ) type ServiceFeatures struct { - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationAll bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationCreate bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationDelete bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationGet bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationList bool - - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - VirtualOperationAll bool - - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - VirtualPairAll bool } // pairServiceNew is the parsed struct @@ -688,38 +627,6 @@ var ( ) type StorageFeatures struct { - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationAll bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationCompleteMultipart bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationCreate bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationCreateDir bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationCreateMultipart bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationDelete bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationList bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationListMultipart bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationMetadata bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationRead bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationStat bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationWrite bool - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - LooseOperationWriteMultipart bool - - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - VirtualOperationAll bool - - // Deprecated: This field has been deprecated by GSP-109, planned be removed in v4.3.0. - VirtualPairAll bool // VirtualDir virtual_dir feature is designed for a service that doesn't have native dir support but wants to provide simulated operations. // // - If this feature is disabled (the default behavior), the service will behave like it doesn't have any dir support. @@ -1552,6 +1459,10 @@ func (s *Storage) CreateDirWithContext(ctx context.Context, path string, pairs . // CreateMultipart will create a new multipart. // +// ## Behavior +// +// - CreateMultipart SHOULD NOT return an error as the object exists. +// // This function will create a context by default. func (s *Storage) CreateMultipart(path string, pairs ...Pair) (o *Object, err error) { ctx := context.Background() @@ -1559,6 +1470,10 @@ func (s *Storage) CreateMultipart(path string, pairs ...Pair) (o *Object, err er } // CreateMultipartWithContext will create a new multipart. +// +// ## Behavior +// +// - CreateMultipart SHOULD NOT return an error as the object exists. func (s *Storage) CreateMultipartWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error) { defer func() { err = s.formatError("create_multipart", err, path) @@ -1622,6 +1537,12 @@ func (s *Storage) DeleteWithContext(ctx context.Context, path string, pairs ...P // List will return list a specific path. // +// ## Behavior +// +// - Service SHOULD support default `ListMode`. +// - Service SHOULD implement `ListModeDir` without the check for `VirtualDir`. +// - Service DON'T NEED to `Stat` while in `List`. +// // This function will create a context by default. func (s *Storage) List(path string, pairs ...Pair) (oi *ObjectIterator, err error) { ctx := context.Background() @@ -1629,6 +1550,12 @@ func (s *Storage) List(path string, pairs ...Pair) (oi *ObjectIterator, err erro } // ListWithContext will return list a specific path. +// +// ## Behavior +// +// - Service SHOULD support default `ListMode`. +// - Service SHOULD implement `ListModeDir` without the check for `VirtualDir`. +// - Service DON'T NEED to `Stat` while in `List`. func (s *Storage) ListWithContext(ctx context.Context, path string, pairs ...Pair) (oi *ObjectIterator, err error) { defer func() { err = s.formatError("list", err, path) @@ -1751,6 +1678,13 @@ func (s *Storage) StatWithContext(ctx context.Context, path string, pairs ...Pai // Write will write data into a file. // +// ## Behavior +// +// - Write SHOULD NOT return an error as the object exist. +// - Service that has native support for `overwrite` doesn't NEED to check the object exists or not. +// - Service that doesn't have native support for `overwrite` SHOULD check and delete the object if exists. +// - A successful write operation SHOULD be complete, which means the object's content and metadata should be the same as specified in write request. +// // This function will create a context by default. func (s *Storage) Write(path string, r io.Reader, size int64, pairs ...Pair) (n int64, err error) { ctx := context.Background() @@ -1758,6 +1692,13 @@ func (s *Storage) Write(path string, r io.Reader, size int64, pairs ...Pair) (n } // WriteWithContext will write data into a file. +// +// ## Behavior +// +// - Write SHOULD NOT return an error as the object exist. +// - Service that has native support for `overwrite` doesn't NEED to check the object exists or not. +// - Service that doesn't have native support for `overwrite` SHOULD check and delete the object if exists. +// - A successful write operation SHOULD be complete, which means the object's content and metadata should be the same as specified in write request. func (s *Storage) WriteWithContext(ctx context.Context, path string, r io.Reader, size int64, pairs ...Pair) (n int64, err error) { defer func() { err = s.formatError("write", err, path)