forked from fission/fission-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
valuetypes.go
64 lines (61 loc) · 1.56 KB
/
valuetypes.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
package typedvalues
import (
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes/wrappers"
)
var (
TypeBool string
TypeInt32 string
TypeInt64 string
TypeUInt32 string
TypeUInt64 string
TypeFloat32 string
TypeFloat64 string
TypeString string
TypeBytes string
TypeNil string
TypeExpression string
TypeMap string
TypeList string
TypeNumber []string
Types []string
)
// Note: ensure that this file is lexically after the generated Protobufs because of package initialization order.
func init() {
TypeBool = proto.MessageName(&wrappers.BoolValue{})
TypeInt32 = proto.MessageName(&wrappers.Int32Value{})
TypeInt64 = proto.MessageName(&wrappers.Int64Value{})
TypeUInt32 = proto.MessageName(&wrappers.UInt32Value{})
TypeUInt64 = proto.MessageName(&wrappers.UInt64Value{})
TypeFloat32 = proto.MessageName(&wrappers.FloatValue{})
TypeFloat64 = proto.MessageName(&wrappers.DoubleValue{})
TypeString = proto.MessageName(&wrappers.StringValue{})
TypeBytes = proto.MessageName(&wrappers.BytesValue{})
TypeNil = proto.MessageName(&NilValue{})
TypeExpression = proto.MessageName(&Expression{})
TypeMap = proto.MessageName(&MapValue{})
TypeList = proto.MessageName(&ArrayValue{})
TypeNumber = []string{
TypeFloat64,
TypeFloat32,
TypeInt32,
TypeInt64,
TypeUInt32,
TypeUInt64,
}
Types = []string{
TypeBool,
TypeInt32,
TypeInt64,
TypeUInt32,
TypeUInt64,
TypeFloat32,
TypeFloat64,
TypeString,
TypeBytes,
TypeNil,
TypeExpression,
TypeMap,
TypeList,
}
}