diff options
author | Nathan Dench <ndenc2@gmail.com> | 2019-05-24 15:16:44 +1000 |
---|---|---|
committer | Nathan Dench <ndenc2@gmail.com> | 2019-05-24 15:16:44 +1000 |
commit | 107c1cdb09c575aa2f61d97f48d8587eb6bada4c (patch) | |
tree | ca7d008643efc555c388baeaf1d986e0b6b3e28c /vendor/github.com/vmihailenco/msgpack/codes | |
parent | 844b5a68d8af4791755b8f0ad293cc99f5959183 (diff) | |
download | terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.gz terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.zst terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.zip |
Upgrade to 0.12
Diffstat (limited to 'vendor/github.com/vmihailenco/msgpack/codes')
-rw-r--r-- | vendor/github.com/vmihailenco/msgpack/codes/codes.go | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/vendor/github.com/vmihailenco/msgpack/codes/codes.go b/vendor/github.com/vmihailenco/msgpack/codes/codes.go new file mode 100644 index 0000000..906af37 --- /dev/null +++ b/vendor/github.com/vmihailenco/msgpack/codes/codes.go | |||
@@ -0,0 +1,86 @@ | |||
1 | package codes | ||
2 | |||
3 | type Code byte | ||
4 | |||
5 | var ( | ||
6 | PosFixedNumHigh Code = 0x7f | ||
7 | NegFixedNumLow Code = 0xe0 | ||
8 | |||
9 | Nil Code = 0xc0 | ||
10 | |||
11 | False Code = 0xc2 | ||
12 | True Code = 0xc3 | ||
13 | |||
14 | Float Code = 0xca | ||
15 | Double Code = 0xcb | ||
16 | |||
17 | Uint8 Code = 0xcc | ||
18 | Uint16 Code = 0xcd | ||
19 | Uint32 Code = 0xce | ||
20 | Uint64 Code = 0xcf | ||
21 | |||
22 | Int8 Code = 0xd0 | ||
23 | Int16 Code = 0xd1 | ||
24 | Int32 Code = 0xd2 | ||
25 | Int64 Code = 0xd3 | ||
26 | |||
27 | FixedStrLow Code = 0xa0 | ||
28 | FixedStrHigh Code = 0xbf | ||
29 | FixedStrMask Code = 0x1f | ||
30 | Str8 Code = 0xd9 | ||
31 | Str16 Code = 0xda | ||
32 | Str32 Code = 0xdb | ||
33 | |||
34 | Bin8 Code = 0xc4 | ||
35 | Bin16 Code = 0xc5 | ||
36 | Bin32 Code = 0xc6 | ||
37 | |||
38 | FixedArrayLow Code = 0x90 | ||
39 | FixedArrayHigh Code = 0x9f | ||
40 | FixedArrayMask Code = 0xf | ||
41 | Array16 Code = 0xdc | ||
42 | Array32 Code = 0xdd | ||
43 | |||
44 | FixedMapLow Code = 0x80 | ||
45 | FixedMapHigh Code = 0x8f | ||
46 | FixedMapMask Code = 0xf | ||
47 | Map16 Code = 0xde | ||
48 | Map32 Code = 0xdf | ||
49 | |||
50 | FixExt1 Code = 0xd4 | ||
51 | FixExt2 Code = 0xd5 | ||
52 | FixExt4 Code = 0xd6 | ||
53 | FixExt8 Code = 0xd7 | ||
54 | FixExt16 Code = 0xd8 | ||
55 | Ext8 Code = 0xc7 | ||
56 | Ext16 Code = 0xc8 | ||
57 | Ext32 Code = 0xc9 | ||
58 | ) | ||
59 | |||
60 | func IsFixedNum(c Code) bool { | ||
61 | return c <= PosFixedNumHigh || c >= NegFixedNumLow | ||
62 | } | ||
63 | |||
64 | func IsFixedMap(c Code) bool { | ||
65 | return c >= FixedMapLow && c <= FixedMapHigh | ||
66 | } | ||
67 | |||
68 | func IsFixedArray(c Code) bool { | ||
69 | return c >= FixedArrayLow && c <= FixedArrayHigh | ||
70 | } | ||
71 | |||
72 | func IsFixedString(c Code) bool { | ||
73 | return c >= FixedStrLow && c <= FixedStrHigh | ||
74 | } | ||
75 | |||
76 | func IsString(c Code) bool { | ||
77 | return IsFixedString(c) || c == Str8 || c == Str16 || c == Str32 | ||
78 | } | ||
79 | |||
80 | func IsFixedExt(c Code) bool { | ||
81 | return c >= FixExt1 && c <= FixExt16 | ||
82 | } | ||
83 | |||
84 | func IsExt(c Code) bool { | ||
85 | return IsFixedExt(c) || c == Ext8 || c == Ext16 || c == Ext32 | ||
86 | } | ||