-
Notifications
You must be signed in to change notification settings - Fork 0
/
aliases.go
78 lines (72 loc) · 1.64 KB
/
aliases.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
package model
var typeAliases = map[string]struct {
Type, Format string
}{
// proto numeric types
"int32": {Type: "int", Format: "int32"},
"uint32": {Type: "int", Format: "uint32"},
"sint32": {Type: "int", Format: "int32"},
"fixed32": {Type: "int", Format: "int32"},
"sfixed32": {Type: "int", Format: "int32"},
// proto numeric types, 64bit
"int64": {Type: "int", Format: "int64"},
"uint64": {Type: "string", Format: "uint64"},
"sint64": {Type: "int", Format: "int64"},
"fixed64": {Type: "int", Format: "int64"},
"sfixed64": {Type: "int", Format: "int64"},
"double": {Type: "float", Format: "double"},
"float": {Type: "float", Format: "float"},
// effectively copies google.protobuf.BytesValue
"bytes": {
Type: "string",
Format: "byte",
},
// It is what it is
"bool": {
Type: "bool",
Format: "bool",
},
"google.protobuf.Timestamp": {
Type: "string",
Format: "date-time",
},
"google.protobuf.Duration": {
Type: "string",
},
"google.protobuf.StringValue": {
Type: "string",
},
"google.protobuf.BytesValue": {
Type: "string",
Format: "byte",
},
"google.protobuf.Int32Value": {
Type: "int",
Format: "int32",
},
"google.protobuf.UInt32Value": {
Type: "int",
Format: "uint32",
},
"google.protobuf.Int64Value": {
Type: "int",
Format: "int64",
},
"google.protobuf.UInt64Value": {
Type: "string",
Format: "uint64",
},
"google.protobuf.FloatValue": {
Type: "float",
Format: "float",
},
"google.protobuf.DoubleValue": {
Type: "float",
Format: "double",
},
"google.protobuf.BoolValue": {
Type: "bool",
Format: "bool",
},
"google.protobuf.Empty": {},
}