From 20ca57b39905395b505475181d469a6bb9796f15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Aug 2021 16:58:18 +0800 Subject: [PATCH] build(deps): bump github.com/beyondstorage/go-storage/v4 from 4.5.0 to 4.6.0 (#54) * build(deps): bump github.com/beyondstorage/go-storage/v4 Bumps [github.com/beyondstorage/go-storage/v4](https://github.com/beyondstorage/go-storage) from 4.5.0 to 4.6.0. - [Release notes](https://github.com/beyondstorage/go-storage/releases) - [Changelog](https://github.com/beyondstorage/go-storage/blob/master/CHANGELOG.md) - [Commits](https://github.com/beyondstorage/go-storage/compare/v4.5.0...v4.6.0) --- updated-dependencies: - dependency-name: github.com/beyondstorage/go-storage/v4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Auto build to generate code Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] --- generated.go | 32 ++++++++++++++++++++++++++++++++ go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/generated.go b/generated.go index 953597a..5940cd5 100644 --- a/generated.go +++ b/generated.go @@ -7,6 +7,7 @@ import ( "net/http" "time" + . "github.com/beyondstorage/go-storage/v4/pairs" "github.com/beyondstorage/go-storage/v4/pkg/httpclient" "github.com/beyondstorage/go-storage/v4/services" . "github.com/beyondstorage/go-storage/v4/types" @@ -17,6 +18,7 @@ var _ services.ServiceError var _ httpclient.Options var _ time.Duration var _ http.Request +var _ Error // Type is the type for cos const Type = "cos" @@ -245,6 +247,8 @@ type pairServiceNew struct { HTTPClientOptions *httpclient.Options HasServiceFeatures bool ServiceFeatures ServiceFeatures + // Enable features + // Default pairs } // parsePairServiceNew will parse Pair slice into *pairServiceNew @@ -287,8 +291,15 @@ func parsePairServiceNew(opts []Pair) (pairServiceNew, error) { } result.HasServiceFeatures = true result.ServiceFeatures = v.Value.(ServiceFeatures) + // Enable features + // Default pairs } } + + // Enable features + + // Default pairs + if !result.HasCredential { return pairServiceNew{}, services.PairRequiredError{Keys: []string{"credential"}} } @@ -565,6 +576,10 @@ type pairStorageNew struct { StorageFeatures StorageFeatures HasWorkDir bool WorkDir string + // Enable features + hasEnableVirtualDir bool + EnableVirtualDir bool + // Default pairs } // parsePairStorageNew will parse Pair slice into *pairStorageNew @@ -607,8 +622,25 @@ func parsePairStorageNew(opts []Pair) (pairStorageNew, error) { } result.HasWorkDir = true result.WorkDir = v.Value.(string) + // Enable features + case "enable_virtual_dir": + if result.hasEnableVirtualDir { + continue + } + result.hasEnableVirtualDir = true + result.EnableVirtualDir = true + // Default pairs } } + + // Enable features + if result.hasEnableVirtualDir { + result.HasStorageFeatures = true + result.StorageFeatures.VirtualDir = true + } + + // Default pairs + if !result.HasLocation { return pairStorageNew{}, services.PairRequiredError{Keys: []string{"location"}} } diff --git a/go.mod b/go.mod index ca6204a..39c4387 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.14 require ( github.com/beyondstorage/go-integration-test/v4 v4.2.0 - github.com/beyondstorage/go-storage/v4 v4.5.0 + github.com/beyondstorage/go-storage/v4 v4.6.0 github.com/google/uuid v1.3.0 github.com/tencentyun/cos-go-sdk-v5 v0.7.27 ) diff --git a/go.sum b/go.sum index 4cb48b8..640d6ca 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/Xuanwo/templateutils v0.1.0/go.mod h1:OdE0DJ+CJxDBq6psX5DPV+gOZi8bhuH 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.5.0 h1:cWkX1A+yVLldEpj/Ad9capev9K1fbVIVcRvwqWsMgpw= -github.com/beyondstorage/go-storage/v4 v4.5.0/go.mod h1:mc9VzBImjXDg1/1sLfta2MJH79elfM6m47ZZvZ+q/Uw= +github.com/beyondstorage/go-storage/v4 v4.6.0 h1:a05dtbYjMZB7LrUSvVzzHwlx33B4yEmd5oQB7Itk7VY= +github.com/beyondstorage/go-storage/v4 v4.6.0/go.mod h1:mc9VzBImjXDg1/1sLfta2MJH79elfM6m47ZZvZ+q/Uw= 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=