-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
35 lines (24 loc) · 828 Bytes
/
errors.go
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
26
27
28
29
30
31
32
33
34
35
package storage
// Err type for this package
type Err string
func (e Err) Error() string {
return string(e)
}
const (
// ErrNotInitialized raised when using a non initialized database
ErrNotInitialized = Err("db not initialized")
// ErrInitFailed raised when db cannot be initialized
ErrInitFailed = Err("db init failed")
// ErrCreate raised on creation errors
ErrCreate = Err("creation error")
// ErrUpdate raised on update errors
ErrUpdate = Err("update error")
// ErrDelete raised on delete errors
ErrDelete = Err("delete error")
// ErrTransaction raised on transaction errors
ErrTransaction = Err("transaction error")
// ErrNotFound raised when a resource is not found
ErrNotFound = Err("resource not found")
// ErrUnexpected raised on unexpected errors
ErrUnexpected = Err("unexpected error")
)