forked from alecthomas/go_serialization_benchmarks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
structdef.pb.go
130 lines (107 loc) · 2.97 KB
/
structdef.pb.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Code generated by protoc-gen-go.
// source: structdef.proto
// DO NOT EDIT!
/*
Package goserbench is a generated protocol buffer package.
It is generated from these files:
structdef.proto
It has these top-level messages:
PBPrimitive
PBData
PBMap
*/
package goserbench
import proto "code.google.com/p/goprotobuf/proto"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf
type PBPrimitive struct {
Str *string `protobuf:"bytes,1,req" json:"Str,omitempty"`
Int64 *int64 `protobuf:"varint,2,req" json:"Int64,omitempty"`
Bool *bool `protobuf:"varint,3,req" json:"Bool,omitempty"`
Float64 *float64 `protobuf:"fixed64,4,req" json:"Float64,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PBPrimitive) Reset() { *m = PBPrimitive{} }
func (m *PBPrimitive) String() string { return proto.CompactTextString(m) }
func (*PBPrimitive) ProtoMessage() {}
func (m *PBPrimitive) GetStr() string {
if m != nil && m.Str != nil {
return *m.Str
}
return ""
}
func (m *PBPrimitive) GetInt64() int64 {
if m != nil && m.Int64 != nil {
return *m.Int64
}
return 0
}
func (m *PBPrimitive) GetBool() bool {
if m != nil && m.Bool != nil {
return *m.Bool
}
return false
}
func (m *PBPrimitive) GetFloat64() float64 {
if m != nil && m.Float64 != nil {
return *m.Float64
}
return 0
}
type PBData struct {
Metadata *string `protobuf:"bytes,1,req" json:"Metadata,omitempty"`
Data []byte `protobuf:"bytes,2,req" json:"Data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PBData) Reset() { *m = PBData{} }
func (m *PBData) String() string { return proto.CompactTextString(m) }
func (*PBData) ProtoMessage() {}
func (m *PBData) GetMetadata() string {
if m != nil && m.Metadata != nil {
return *m.Metadata
}
return ""
}
func (m *PBData) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
type PBMap struct {
Kvps []*PBMap_KVP `protobuf:"bytes,1,rep,name=kvps" json:"kvps,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PBMap) Reset() { *m = PBMap{} }
func (m *PBMap) String() string { return proto.CompactTextString(m) }
func (*PBMap) ProtoMessage() {}
func (m *PBMap) GetKvps() []*PBMap_KVP {
if m != nil {
return m.Kvps
}
return nil
}
type PBMap_KVP struct {
Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PBMap_KVP) Reset() { *m = PBMap_KVP{} }
func (m *PBMap_KVP) String() string { return proto.CompactTextString(m) }
func (*PBMap_KVP) ProtoMessage() {}
func (m *PBMap_KVP) GetKey() string {
if m != nil && m.Key != nil {
return *m.Key
}
return ""
}
func (m *PBMap_KVP) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
func init() {
}