generated from mrz1836/go-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
errors.go
32 lines (22 loc) · 1.22 KB
/
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
package cachestore
import (
"errors"
)
// ErrKeyNotFound is returned when a record is not found for a given key
var ErrKeyNotFound = errors.New("key not found")
// ErrKeyRequired is returned when the key is empty (key->value)
var ErrKeyRequired = errors.New("key is empty and required")
// ErrSecretRequired is returned when the secret is empty (value)
var ErrSecretRequired = errors.New("secret is empty and required")
// ErrSecretGenerationFailed is the error if the secret failed to generate
var ErrSecretGenerationFailed = errors.New("failed generating secret")
// ErrLockCreateFailed is the error when creating a lock fails
var ErrLockCreateFailed = errors.New("failed creating cache lock")
// ErrLockExists is the error when trying to create a lock fails due to an existing lock
var ErrLockExists = errors.New("lock already exists with a different secret")
// ErrTTWCannotBeEmpty is when the TTW field is empty
var ErrTTWCannotBeEmpty = errors.New("the TTW value cannot be empty")
// ErrInvalidRedisConfig is when the redis config is missing or invalid
var ErrInvalidRedisConfig = errors.New("invalid redis config")
// ErrAppNameRequired is when the app name is required
var ErrAppNameRequired = errors.New("app name is required")