vendor: update github.com/t3rm1n4l/go-mega to add new error codes

This commit is contained in:
Nick Craig-Wood 2019-02-05 17:22:28 +00:00
parent c680bb3254
commit fd370fcad2
4 changed files with 37 additions and 14 deletions

2
go.mod
View File

@ -49,7 +49,7 @@ require (
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3
github.com/stretchr/testify v1.2.2
github.com/t3rm1n4l/go-mega v0.0.0-20190204171941-1b8ac3503be8
github.com/t3rm1n4l/go-mega v0.0.0-20190205172012-55a226cf41da
github.com/xanzy/ssh-agent v0.2.0
github.com/yunify/qingstor-sdk-go v2.2.15+incompatible
golang.org/x/crypto v0.0.0-20190131182504-b8fe1690c613

2
go.sum
View File

@ -116,6 +116,8 @@ github.com/t3rm1n4l/go-mega v0.0.0-20180817194457-854bf31d998b h1:Yt/fB2INfWb29V
github.com/t3rm1n4l/go-mega v0.0.0-20180817194457-854bf31d998b/go.mod h1:ObGZcW2yPzFXEsaTZVMgLKhdUSHMYM3aEDE/u7YnfU8=
github.com/t3rm1n4l/go-mega v0.0.0-20190204171941-1b8ac3503be8 h1:pRD8qAFGq7u9wK/lTg64wkdpCZh4lsTvRoEzQWWLMGE=
github.com/t3rm1n4l/go-mega v0.0.0-20190204171941-1b8ac3503be8/go.mod h1:XWL4vDyd3JKmJx+hZWUVgCNmmhZ2dTBcaNDcxH465s0=
github.com/t3rm1n4l/go-mega v0.0.0-20190205172012-55a226cf41da h1:hWHAUYEtxnj8tb2pHj5WPGEIE8leSi/3cMND8fUjsBE=
github.com/t3rm1n4l/go-mega v0.0.0-20190205172012-55a226cf41da/go.mod h1:XWL4vDyd3JKmJx+hZWUVgCNmmhZ2dTBcaNDcxH465s0=
github.com/xanzy/ssh-agent v0.2.0 h1:Adglfbi5p9Z0BmK2oKU9nTG+zKfniSfnaMYB+ULd+Ro=
github.com/xanzy/ssh-agent v0.2.0/go.mod h1:0NyE30eGUDliuLEHJgYte/zncp2zdTStcOnWhgSqHD8=
github.com/yunify/qingstor-sdk-go v2.2.15+incompatible h1:/Z0q3/eSMoPYAuRmhjWtuGSmVVciFC6hfm3yfCKuvz0=

View File

@ -32,6 +32,13 @@ var (
ETEMPUNAVAIL = errors.New("Resource temporarily not available, please try again later")
EMACMISMATCH = errors.New("MAC verification failed")
EBADATTR = errors.New("Bad node attribute")
ETOOMANYCONNECTIONS = errors.New("Too many connections on this resource.")
EWRITE = errors.New("File could not be written to (or failed post-write integrity check).")
EREAD = errors.New("File could not be read from (or changed unexpectedly during reading).")
EAPPKEY = errors.New("Invalid or missing application key.")
ESSL = errors.New("SSL verification failed")
EGOINGOVERQUOTA = errors.New("Not enough quota")
EMFAREQUIRED = errors.New("Multi-factor authentication required")
// Config errors
EWORKER_LIMIT_EXCEEDED = errors.New("Maximum worker limit exceeded")
@ -79,6 +86,20 @@ func parseError(errno ErrorMsg) error {
return EOVERQUOTA
case errno == -18:
return ETEMPUNAVAIL
case errno == -19:
return ETOOMANYCONNECTIONS
case errno == -20:
return EWRITE
case errno == -21:
return EREAD
case errno == -22:
return EAPPKEY
case errno == -23:
return ESSL
case errno == -24:
return EGOINGOVERQUOTA
case errno == -26:
return EMFAREQUIRED
}
return fmt.Errorf("Unknown mega error %d", errno)

2
vendor/modules.txt vendored
View File

@ -139,7 +139,7 @@ github.com/spf13/pflag
# github.com/stretchr/testify v1.2.2
github.com/stretchr/testify/assert
github.com/stretchr/testify/require
# github.com/t3rm1n4l/go-mega v0.0.0-20190204171941-1b8ac3503be8
# github.com/t3rm1n4l/go-mega v0.0.0-20190205172012-55a226cf41da
github.com/t3rm1n4l/go-mega
# github.com/xanzy/ssh-agent v0.2.0
github.com/xanzy/ssh-agent