-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
85 lines (68 loc) · 1.72 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package stickers
import (
"fmt"
)
// ErrFetchingLabelsForUser
type ErrFetchingLabelsForUser struct {
User string
}
// Error
func (e ErrFetchingLabelsForUser) Error() string {
return fmt.Sprintf("could not fetch labels for user '%s'", e.User)
}
// ErrFilterNotFound
type ErrFilterNotFound struct {
Filter string
User string
}
// ErrFilterNotFound
func (e ErrFilterNotFound) Error() string {
return fmt.Sprintf("could not fetch filter '%s' for user '%s'", e.Filter, e.User)
}
// ErrLabelNotFound
type ErrLabelNotFound struct {
Label string
User string
}
// Error
func (e ErrLabelNotFound) Error() string {
return fmt.Sprintf("could not fetch label '%s' for user '%s'", e.Label, e.User)
}
// ErrFetchingFiltersForUser
type ErrFetchingFiltersForUser struct {
User string
}
// Error
func (e ErrFetchingFiltersForUser) Error() string {
return fmt.Sprintf("could not fetch filters for user '%s'", e.User)
}
// ErrMissingServiceAccountFile
type ErrMissingServiceAccountFile struct{}
// Error
func (e ErrMissingServiceAccountFile) Error() string {
return "missing service account file, set with `SetServiceAccountFile(filename)`"
}
// ErrInvalidServiceAccountFile
type ErrInvalidServiceAccountFile struct {
File string
}
// Error
func (e ErrInvalidServiceAccountFile) Error() string {
return fmt.Sprintf("invalid service account file, `%s`", e.File)
}
// ErrLabelMismatch
type ErrLabelMismatch struct {
Label string
}
// ErrLabelMismatch
func (e ErrLabelMismatch) Error() string {
return fmt.Sprintf("label mismatch for `%s`", e.Label)
}
// ErrFilterMismatch
type ErrFilterMismatch struct {
Filter string
}
// ErrLabelMismatch
func (e ErrFilterMismatch) Error() string {
return fmt.Sprintf("filter mismatch for `%s`", e.Filter)
}