-
Notifications
You must be signed in to change notification settings - Fork 230
/
errors.go
39 lines (31 loc) · 952 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
36
37
38
39
package secrets
import (
"encr.dev/pkg/errors"
)
var (
errRange = errors.Range(
"secrets",
"For more information about how to use secrets, see https://encore.dev/docs/primitives/secrets",
errors.WithRangeSize(20),
)
errSecretsMustBeStruct = errRange.New(
"Invalid secrets variable",
"The \"secrets\" variable type must be an inline struct.",
)
errSecretsDefinedSeperately = errRange.New(
"Invalid secrets variable",
"The \"secrets\" variable must be declared separately and not in a var block.",
)
errSecretsGivenValue = errRange.New(
"Invalid secrets variable",
"The \"secrets\" variable must not be given a value. Encore will ensure that the secrets are loaded at runtime.",
)
errAnonymousFields = errRange.New(
"Invalid secrets struct",
"Anonymous fields are not allowed in the secrets struct.",
)
errSecretsMustBeString = errRange.New(
"Invalid secrets struct",
"Secrets must be of type string.",
)
)