1 // Protocol Buffers for Go with Gadgets
3 // Copyright (c) 2018, The GoGo Authors. All rights reserved.
4 // http://github.com/gogo/protobuf
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are
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
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.
31 type float64Value struct {
32 Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
35 func (m *float64Value) Reset() { *m = float64Value{} }
36 func (*float64Value) ProtoMessage() {}
37 func (*float64Value) String() string { return "float64<string>" }
39 type float32Value struct {
40 Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"`
43 func (m *float32Value) Reset() { *m = float32Value{} }
44 func (*float32Value) ProtoMessage() {}
45 func (*float32Value) String() string { return "float32<string>" }
47 type int64Value struct {
48 Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
51 func (m *int64Value) Reset() { *m = int64Value{} }
52 func (*int64Value) ProtoMessage() {}
53 func (*int64Value) String() string { return "int64<string>" }
55 type uint64Value struct {
56 Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
59 func (m *uint64Value) Reset() { *m = uint64Value{} }
60 func (*uint64Value) ProtoMessage() {}
61 func (*uint64Value) String() string { return "uint64<string>" }
63 type int32Value struct {
64 Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
67 func (m *int32Value) Reset() { *m = int32Value{} }
68 func (*int32Value) ProtoMessage() {}
69 func (*int32Value) String() string { return "int32<string>" }
71 type uint32Value struct {
72 Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
75 func (m *uint32Value) Reset() { *m = uint32Value{} }
76 func (*uint32Value) ProtoMessage() {}
77 func (*uint32Value) String() string { return "uint32<string>" }
79 type boolValue struct {
80 Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
83 func (m *boolValue) Reset() { *m = boolValue{} }
84 func (*boolValue) ProtoMessage() {}
85 func (*boolValue) String() string { return "bool<string>" }
87 type stringValue struct {
88 Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
91 func (m *stringValue) Reset() { *m = stringValue{} }
92 func (*stringValue) ProtoMessage() {}
93 func (*stringValue) String() string { return "string<string>" }
95 type bytesValue struct {
96 Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
99 func (m *bytesValue) Reset() { *m = bytesValue{} }
100 func (*bytesValue) ProtoMessage() {}
101 func (*bytesValue) String() string { return "[]byte<string>" }
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")