aboutsummaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2018-04-29 21:19:14 +0200
committerStefan Majewsky <majewsky@gmx.net>2018-04-30 10:04:36 +0200
commit0df55a731aa3330f82d22b010a7a2a4d66521972 (patch)
tree9e207f01dbb52afb0de83f95e63ecfc771e809c6 /errors.go
parent1f3fcfa9366e49b371c7be2b5c90b957ce93b8dd (diff)
downloadgo-schwift-0df55a731aa3330f82d22b010a7a2a4d66521972.tar.gz
initial support for large objects
This has gone through a lot of iterations on my branch, and I'm quite happy with the parts of the API that exist now. Test coverage can still be better, and will get better in the following commits. The API is not yet finished: I want to add Options arguments to Object.Upload(), Object.Copy(), Object.Move() and Object.Delete() that specify how each of these operations affect existing segments (and, later, also existing symlinks). For Upload(), uploading in segments shall become as easy as flipping a single switch.
Diffstat (limited to 'errors.go')
-rw-r--r--errors.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/errors.go b/errors.go
index 5784126..2826df7 100644
--- a/errors.go
+++ b/errors.go
@@ -43,6 +43,17 @@ var (
//objects as arguments, if (some of) the provided objects are located in a
//different account.
ErrAccountMismatch = errors.New("some of the given objects are not in this account")
+ //ErrContainerMismatch is returned by operations on a container that accept
+ //objects as arguments, if (some of) the provided objects are located in a
+ //different container.
+ ErrContainerMismatch = errors.New("some of the given objects are not in this container")
+ //ErrNotLarge is returned by Object.AsLargeObject() if the object exists, but
+ //is not a large object that is composed out of segments.
+ ErrNotLarge = errors.New("not a large object")
+ //ErrSegmentInvalid is returned by LargeObject.AddSegment() if the segment
+ //provided is malformed or uses features not supported by the LargeObject's
+ //strategy. See documentation for LargeObject.AddSegment() for details.
+ ErrSegmentInvalid = errors.New("segment invalid or incompatible with large object strategy")
)
//UnexpectedStatusCodeError is generated when a request to Swift does not yield