-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patherror.go
More file actions
25 lines (21 loc) · 922 Bytes
/
Copy patherror.go
File metadata and controls
25 lines (21 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package s2
import "errors"
// ErrNotExist is returned when an operation targets an object that does not
// exist. Backends wrap this with the missing object's name via fmt.Errorf, so
// callers should detect it with errors.Is rather than direct equality:
//
// if errors.Is(err, s2.ErrNotExist) {
// // handle missing object
// }
var ErrNotExist = errors.New("s2: object not exist")
// ErrRequiredConfigRoot is returned by NewStorage implementations when
// Config.Root is empty. Root identifies the bucket, container, or directory
// that the storage operates on and is always required.
var ErrRequiredConfigRoot = errors.New("s2: required config.root")
// ErrUnknownType is returned by NewStorage when no plugin is registered for
// the requested Type. Detect with errors.Is:
//
// if errors.Is(err, s2.ErrUnknownType) {
// // unknown backend
// }
var ErrUnknownType = errors.New("s2: unknown storage type")