forked from TRON-US/protobuf
-
Notifications
You must be signed in to change notification settings - Fork 7
/
proto.pb.go
198 lines (184 loc) · 5.57 KB
/
proto.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: proto/proto.proto
package proto
import (
bytes "bytes"
fmt "fmt"
_ "github.com/bittorrent/protobuf/gogoproto"
proto "github.com/bittorrent/protobuf/proto"
math "math"
reflect "reflect"
strings "strings"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type Subject struct {
XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"`
XXX_unrecognized []byte `json:"-" pg:"-"`
XXX_sizecache int32 `json:"-" pg:"-"`
}
func (m *Subject) Reset() { *m = Subject{} }
func (m *Subject) String() string { return proto.CompactTextString(m) }
func (*Subject) ProtoMessage() {}
func (*Subject) Descriptor() ([]byte, []int) {
return fileDescriptor_9897619deba694d0, []int{0}
}
func (m *Subject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Subject.Unmarshal(m, b)
}
func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Subject.Marshal(b, m, deterministic)
}
func (m *Subject) XXX_Merge(src proto.Message) {
xxx_messageInfo_Subject.Merge(m, src)
}
func (m *Subject) XXX_Size() int {
return xxx_messageInfo_Subject.Size(m)
}
func (m *Subject) XXX_DiscardUnknown() {
xxx_messageInfo_Subject.DiscardUnknown(m)
}
var xxx_messageInfo_Subject proto.InternalMessageInfo
func init() {
proto.RegisterType((*Subject)(nil), "proto.Subject")
}
func init() { proto.RegisterFile("proto/proto.proto", fileDescriptor_9897619deba694d0) }
var fileDescriptor_9897619deba694d0 = []byte{
// 114 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2c, 0x28, 0xca, 0x2f,
0xc9, 0xd7, 0x07, 0x93, 0x7a, 0x60, 0x52, 0x88, 0x15, 0x4c, 0x49, 0x19, 0xa7, 0x67, 0x96, 0x64,
0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x27, 0x65, 0x96, 0x94, 0xe4, 0x17, 0x15, 0xa5, 0xe6,
0x95, 0x40, 0x54, 0x26, 0x95, 0xa6, 0xe9, 0xa7, 0xe7, 0xa7, 0xe7, 0x43, 0x34, 0x83, 0x58, 0x10,
0xbd, 0x4a, 0x9c, 0x5c, 0xec, 0xc1, 0xa5, 0x49, 0x59, 0xa9, 0xc9, 0x25, 0x4e, 0x02, 0x1f, 0x1e,
0xca, 0x31, 0xfe, 0x78, 0x28, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, 0x8e, 0x47, 0x72, 0x8c, 0x49,
0x6c, 0x60, 0x35, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x17, 0x7e, 0x85, 0xe9, 0x74, 0x00,
0x00, 0x00,
}
func (this *Subject) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Subject)
if !ok {
that2, ok := that.(Subject)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Subject) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 4)
s = append(s, "&proto.Subject{")
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func valueToGoStringProto(v interface{}, typ string) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func NewPopulatedSubject(r randyProto, easy bool) *Subject {
this := &Subject{}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedProto(r, 1)
}
return this
}
type randyProto interface {
Float32() float32
Float64() float64
Int63() int64
Int31() int32
Uint32() uint32
Intn(n int) int
}
func randUTF8RuneProto(r randyProto) rune {
ru := r.Intn(62)
if ru < 10 {
return rune(ru + 48)
} else if ru < 36 {
return rune(ru + 55)
}
return rune(ru + 61)
}
func randStringProto(r randyProto) string {
v1 := r.Intn(100)
tmps := make([]rune, v1)
for i := 0; i < v1; i++ {
tmps[i] = randUTF8RuneProto(r)
}
return string(tmps)
}
func randUnrecognizedProto(r randyProto, maxFieldNumber int) (dAtA []byte) {
l := r.Intn(5)
for i := 0; i < l; i++ {
wire := r.Intn(4)
if wire == 3 {
wire = 5
}
fieldNumber := maxFieldNumber + r.Intn(100)
dAtA = randFieldProto(dAtA, r, fieldNumber, wire)
}
return dAtA
}
func randFieldProto(dAtA []byte, r randyProto, fieldNumber int, wire int) []byte {
key := uint32(fieldNumber)<<3 | uint32(wire)
switch wire {
case 0:
dAtA = encodeVarintPopulateProto(dAtA, uint64(key))
v2 := r.Int63()
if r.Intn(2) == 0 {
v2 *= -1
}
dAtA = encodeVarintPopulateProto(dAtA, uint64(v2))
case 1:
dAtA = encodeVarintPopulateProto(dAtA, uint64(key))
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
case 2:
dAtA = encodeVarintPopulateProto(dAtA, uint64(key))
ll := r.Intn(100)
dAtA = encodeVarintPopulateProto(dAtA, uint64(ll))
for j := 0; j < ll; j++ {
dAtA = append(dAtA, byte(r.Intn(256)))
}
default:
dAtA = encodeVarintPopulateProto(dAtA, uint64(key))
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
}
return dAtA
}
func encodeVarintPopulateProto(dAtA []byte, v uint64) []byte {
for v >= 1<<7 {
dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
v >>= 7
}
dAtA = append(dAtA, uint8(v))
return dAtA
}