blob: c1cf7bf85e9ad55a02e467e213ecfd9c6b762fa9 [file] [log] [blame]
divyadesai81bb7ba2020-03-11 11:45:23 +00001// Protocol Buffers for Go with Gadgets
2//
3// Copyright (c) 2018, The GoGo Authors. All rights reserved.
4// http://github.com/gogo/protobuf
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met:
9//
10// * Redistributions of source code must retain the above copyright
11// notice, this list of conditions and the following disclaimer.
12// * Redistributions in binary form must reproduce the above
13// copyright notice, this list of conditions and the following disclaimer
14// in the documentation and/or other materials provided with the
15// distribution.
16//
17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29package proto
30
31type float64Value struct {
32 Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
33}
34
35func (m *float64Value) Reset() { *m = float64Value{} }
36func (*float64Value) ProtoMessage() {}
37func (*float64Value) String() string { return "float64<string>" }
38
39type float32Value struct {
40 Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"`
41}
42
43func (m *float32Value) Reset() { *m = float32Value{} }
44func (*float32Value) ProtoMessage() {}
45func (*float32Value) String() string { return "float32<string>" }
46
47type int64Value struct {
48 Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
49}
50
51func (m *int64Value) Reset() { *m = int64Value{} }
52func (*int64Value) ProtoMessage() {}
53func (*int64Value) String() string { return "int64<string>" }
54
55type uint64Value struct {
56 Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
57}
58
59func (m *uint64Value) Reset() { *m = uint64Value{} }
60func (*uint64Value) ProtoMessage() {}
61func (*uint64Value) String() string { return "uint64<string>" }
62
63type int32Value struct {
64 Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
65}
66
67func (m *int32Value) Reset() { *m = int32Value{} }
68func (*int32Value) ProtoMessage() {}
69func (*int32Value) String() string { return "int32<string>" }
70
71type uint32Value struct {
72 Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
73}
74
75func (m *uint32Value) Reset() { *m = uint32Value{} }
76func (*uint32Value) ProtoMessage() {}
77func (*uint32Value) String() string { return "uint32<string>" }
78
79type boolValue struct {
80 Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
81}
82
83func (m *boolValue) Reset() { *m = boolValue{} }
84func (*boolValue) ProtoMessage() {}
85func (*boolValue) String() string { return "bool<string>" }
86
87type stringValue struct {
88 Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
89}
90
91func (m *stringValue) Reset() { *m = stringValue{} }
92func (*stringValue) ProtoMessage() {}
93func (*stringValue) String() string { return "string<string>" }
94
95type bytesValue struct {
96 Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
97}
98
99func (m *bytesValue) Reset() { *m = bytesValue{} }
100func (*bytesValue) ProtoMessage() {}
101func (*bytesValue) String() string { return "[]byte<string>" }
102
103func init() {
104 RegisterType((*float64Value)(nil), "gogo.protobuf.proto.DoubleValue")
105 RegisterType((*float32Value)(nil), "gogo.protobuf.proto.FloatValue")
106 RegisterType((*int64Value)(nil), "gogo.protobuf.proto.Int64Value")
107 RegisterType((*uint64Value)(nil), "gogo.protobuf.proto.UInt64Value")
108 RegisterType((*int32Value)(nil), "gogo.protobuf.proto.Int32Value")
109 RegisterType((*uint32Value)(nil), "gogo.protobuf.proto.UInt32Value")
110 RegisterType((*boolValue)(nil), "gogo.protobuf.proto.BoolValue")
111 RegisterType((*stringValue)(nil), "gogo.protobuf.proto.StringValue")
112 RegisterType((*bytesValue)(nil), "gogo.protobuf.proto.BytesValue")
113}