-
Notifications
You must be signed in to change notification settings - Fork 118
/
const.go
51 lines (45 loc) · 1.5 KB
/
const.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
package resolve
import "errors"
var (
lBrace = []byte("{")
rBrace = []byte("}")
lBrack = []byte("[")
rBrack = []byte("]")
comma = []byte(",")
colon = []byte(":")
quote = []byte("\"")
null = []byte("null")
literalData = []byte("data")
literalTrue = []byte("true")
literalFalse = []byte("false")
literalErrors = []byte("errors")
literalMessage = []byte("message")
literalLocations = []byte("locations")
literalPath = []byte("path")
literalUnderscoreEntities = []byte("_entities")
literalExtensions = []byte("extensions")
literalTrace = []byte("trace")
literalRateLimit = []byte("rateLimit")
literalAuthorization = []byte("authorization")
emptyArray = []byte("[]")
emptyObject = []byte("{}")
)
var (
errNonNullableFieldValueIsNull = errors.New("non Nullable field value is null")
errHeaderPathInvalid = errors.New("invalid header path: header variables must be of this format: .request.header.{{ key }} ")
ErrUnableToResolve = errors.New("unable to resolve operation")
)
var (
errorPaths = [][]string{
{"message"},
{"locations"},
{"path"},
{"extensions"},
}
)
const (
errorsMessagePathIndex = 0
errorsLocationsPathIndex = 1
errorsPathPathIndex = 2
errorsExtensionsPathIndex = 3
)