forked from go-spatial/tegola
-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
49 lines (38 loc) · 1.1 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package cache
import "fmt"
type ErrInvalidFileKeyParts struct {
path string
keyPartsCount int
}
func (e ErrInvalidFileKeyParts) Error() string {
return fmt.Sprintf("cache: invalid fileKey (%v). expecting between three and five parts, got (%v) skipping.", e.path, e.keyPartsCount)
}
type ErrInvalidFileKey struct {
path string
key string
val string
}
func (e ErrInvalidFileKey) Error() string {
return fmt.Sprintf("cache: invalid fileKey (%v). unable to parse (%v) value (%v) into int", e.path, e.key, e.val)
}
type ErrGettingFromCache struct {
Err error
CacheType string
}
func (e ErrGettingFromCache) Error() string {
return fmt.Sprintf("cache: error getting from (%v) cache: %v", e.CacheType, e.Err)
}
type ErrSettingToCache struct {
Err error
CacheType string
}
func (e ErrSettingToCache) Error() string {
return fmt.Sprintf("cache: error setting to (%v) cache: %v", e.CacheType, e.Err)
}
type ErrPurgingCache struct {
Err error
CacheType string
}
func (e ErrPurgingCache) Error() string {
return fmt.Sprintf("cache: error purging (%v) cache: %v", e.CacheType, e.Err)
}