Debian Codegraph @

vanity/test/slick/proto3.pb.go

raw
1 // Code generated by protoc-gen-gogo. DO NOT EDIT.
2 // source: proto3.proto
3
4 package vanity
5
6 import (
7 fmt "fmt"
8 proto "github.com/gogo/protobuf/proto"
9 io "io"
10 math "math"
11 math_bits "math/bits"
12 reflect "reflect"
13 strings "strings"
14 )
15
16 // Reference imports to suppress errors if they are not otherwise used.
17 var _ = proto.Marshal
18 var _ = fmt.Errorf
19 var _ = math.Inf
20
21 // This is a compile-time assertion to ensure that this generated file
22 // is compatible with the proto package it is being compiled against.
23 // A compilation error at this line likely means your copy of the
24 // proto package needs to be updated.
25 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
26
27 type Aproto3 struct {
28 B string `protobuf:"bytes,1,opt,name=B,proto3" json:"B,omitempty"`
29 }
30
31 func (m *Aproto3) Reset() { *m = Aproto3{} }
32 func (*Aproto3) ProtoMessage() {}
33 func (*Aproto3) Descriptor() ([]byte, []int) {
34 return fileDescriptor_4fee6d65e34a64b6, []int{0}
35 }
36 func (m *Aproto3) XXX_Unmarshal(b []byte) error {
37 return m.Unmarshal(b)
38 }
39 func (m *Aproto3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
40 if deterministic {
41 return xxx_messageInfo_Aproto3.Marshal(b, m, deterministic)
42 } else {
43 b = b[:cap(b)]
44 n, err := m.MarshalToSizedBuffer(b)
45 if err != nil {
46 return nil, err
47 }
48 return b[:n], nil
49 }
50 }
51 func (m *Aproto3) XXX_Merge(src proto.Message) {
52 xxx_messageInfo_Aproto3.Merge(m, src)
53 }
54 func (m *Aproto3) XXX_Size() int {
55 return m.Size()
56 }
57 func (m *Aproto3) XXX_DiscardUnknown() {
58 xxx_messageInfo_Aproto3.DiscardUnknown(m)
59 }
60
61 var xxx_messageInfo_Aproto3 proto.InternalMessageInfo
62
63 func (m *Aproto3) GetB() string {
64 if m != nil {
65 return m.B
66 }
67 return ""
68 }
69
70 func init() {
71 proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3")
72 }
73
74 func init() { proto.RegisterFile("proto3.proto", fileDescriptor_4fee6d65e34a64b6) }
75
76 var fileDescriptor_4fee6d65e34a64b6 = []byte{
77 // 125 bytes of a gzipped FileDescriptorProto
78 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f,
79 0xc9, 0x37, 0xd6, 0x03, 0x53, 0x42, 0x6c, 0x65, 0x89, 0x79, 0x99, 0x25, 0x95, 0x4a, 0xe2, 0x5c,
80 0xec, 0x8e, 0x10, 0x09, 0x21, 0x1e, 0x2e, 0x46, 0x27, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20,
81 0x46, 0x27, 0x27, 0x93, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8, 0xf0, 0x50, 0x8e,
82 0xb1, 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24,
83 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8b, 0x47, 0x72, 0x0c, 0x1f, 0x1e, 0xc9, 0x31, 0x4e, 0x78,
84 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x49, 0x6c, 0x10, 0xb3, 0x00,
85 0x01, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x6e, 0x6a, 0x0e, 0x6d, 0x00, 0x00, 0x00,
86 }
87
88 func (this *Aproto3) Equal(that interface{}) bool {
89 if that == nil {
90 return this == nil
91 }
92
93 that1, ok := that.(*Aproto3)
94 if !ok {
95 that2, ok := that.(Aproto3)
96 if ok {
97 that1 = &that2
98 } else {
99 return false
100 }
101 }
102 if that1 == nil {
103 return this == nil
104 } else if this == nil {
105 return false
106 }
107 if this.B != that1.B {
108 return false
109 }
110 return true
111 }
112 func (this *Aproto3) GoString() string {
113 if this == nil {
114 return "nil"
115 }
116 s := make([]string, 0, 5)
117 s = append(s, "&vanity.Aproto3{")
118 s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n")
119 s = append(s, "}")
120 return strings.Join(s, "")
121 }
122 func valueToGoStringProto3(v interface{}, typ string) string {
123 rv := reflect.ValueOf(v)
124 if rv.IsNil() {
125 return "nil"
126 }
127 pv := reflect.Indirect(rv).Interface()
128 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
129 }
130 func (m *Aproto3) Marshal() (dAtA []byte, err error) {
131 size := m.Size()
132 dAtA = make([]byte, size)
133 n, err := m.MarshalToSizedBuffer(dAtA[:size])
134 if err != nil {
135 return nil, err
136 }
137 return dAtA[:n], nil
138 }
139
140 func (m *Aproto3) MarshalTo(dAtA []byte) (int, error) {
141 size := m.Size()
142 return m.MarshalToSizedBuffer(dAtA[:size])
143 }
144
145 func (m *Aproto3) MarshalToSizedBuffer(dAtA []byte) (int, error) {
146 i := len(dAtA)
147 _ = i
148 var l int
149 _ = l
150 if len(m.B) > 0 {
151 i -= len(m.B)
152 copy(dAtA[i:], m.B)
153 i = encodeVarintProto3(dAtA, i, uint64(len(m.B)))
154 i--
155 dAtA[i] = 0xa
156 }
157 return len(dAtA) - i, nil
158 }
159
160 func encodeVarintProto3(dAtA []byte, offset int, v uint64) int {
161 offset -= sovProto3(v)
162 base := offset
163 for v >= 1<<7 {
164 dAtA[offset] = uint8(v&0x7f | 0x80)
165 v >>= 7
166 offset++
167 }
168 dAtA[offset] = uint8(v)
169 return base
170 }
171 func (m *Aproto3) Size() (n int) {
172 if m == nil {
173 return 0
174 }
175 var l int
176 _ = l
177 l = len(m.B)
178 if l > 0 {
179 n += 1 + l + sovProto3(uint64(l))
180 }
181 return n
182 }
183
184 func sovProto3(x uint64) (n int) {
185 return (math_bits.Len64(x|1) + 6) / 7
186 }
187 func sozProto3(x uint64) (n int) {
188 return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63))))
189 }
190 func (this *Aproto3) String() string {
191 if this == nil {
192 return "nil"
193 }
194 s := strings.Join([]string{`&Aproto3{`,
195 `B:` + fmt.Sprintf("%v", this.B) + `,`,
196 `}`,
197 }, "")
198 return s
199 }
200 func valueToStringProto3(v interface{}) string {
201 rv := reflect.ValueOf(v)
202 if rv.IsNil() {
203 return "nil"
204 }
205 pv := reflect.Indirect(rv).Interface()
206 return fmt.Sprintf("*%v", pv)
207 }
208 func (m *Aproto3) Unmarshal(dAtA []byte) error {
209 l := len(dAtA)
210 iNdEx := 0
211 for iNdEx < l {
212 preIndex := iNdEx
213 var wire uint64
214 for shift := uint(0); ; shift += 7 {
215 if shift >= 64 {
216 return ErrIntOverflowProto3
217 }
218 if iNdEx >= l {
219 return io.ErrUnexpectedEOF
220 }
221 b := dAtA[iNdEx]
222 iNdEx++
223 wire |= uint64(b&0x7F) << shift
224 if b < 0x80 {
225 break
226 }
227 }
228 fieldNum := int32(wire >> 3)
229 wireType := int(wire & 0x7)
230 if wireType == 4 {
231 return fmt.Errorf("proto: Aproto3: wiretype end group for non-group")
232 }
233 if fieldNum <= 0 {
234 return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire)
235 }
236 switch fieldNum {
237 case 1:
238 if wireType != 2 {
239 return fmt.Errorf("proto: wrong wireType = %d for field B", wireType)
240 }
241 var stringLen uint64
242 for shift := uint(0); ; shift += 7 {
243 if shift >= 64 {
244 return ErrIntOverflowProto3
245 }
246 if iNdEx >= l {
247 return io.ErrUnexpectedEOF
248 }
249 b := dAtA[iNdEx]
250 iNdEx++
251 stringLen |= uint64(b&0x7F) << shift
252 if b < 0x80 {
253 break
254 }
255 }
256 intStringLen := int(stringLen)
257 if intStringLen < 0 {
258 return ErrInvalidLengthProto3
259 }
260 postIndex := iNdEx + intStringLen
261 if postIndex < 0 {
262 return ErrInvalidLengthProto3
263 }
264 if postIndex > l {
265 return io.ErrUnexpectedEOF
266 }
267 m.B = string(dAtA[iNdEx:postIndex])
268 iNdEx = postIndex
269 default:
270 iNdEx = preIndex
271 skippy, err := skipProto3(dAtA[iNdEx:])
272 if err != nil {
273 return err
274 }
275 if (skippy < 0) || (iNdEx+skippy) < 0 {
276 return ErrInvalidLengthProto3
277 }
278 if (iNdEx + skippy) > l {
279 return io.ErrUnexpectedEOF
280 }
281 iNdEx += skippy
282 }
283 }
284
285 if iNdEx > l {
286 return io.ErrUnexpectedEOF
287 }
288 return nil
289 }
290 func skipProto3(dAtA []byte) (n int, err error) {
291 l := len(dAtA)
292 iNdEx := 0
293 depth := 0
294 for iNdEx < l {
295 var wire uint64
296 for shift := uint(0); ; shift += 7 {
297 if shift >= 64 {
298 return 0, ErrIntOverflowProto3
299 }
300 if iNdEx >= l {
301 return 0, io.ErrUnexpectedEOF
302 }
303 b := dAtA[iNdEx]
304 iNdEx++
305 wire |= (uint64(b) & 0x7F) << shift
306 if b < 0x80 {
307 break
308 }
309 }
310 wireType := int(wire & 0x7)
311 switch wireType {
312 case 0:
313 for shift := uint(0); ; shift += 7 {
314 if shift >= 64 {
315 return 0, ErrIntOverflowProto3
316 }
317 if iNdEx >= l {
318 return 0, io.ErrUnexpectedEOF
319 }
320 iNdEx++
321 if dAtA[iNdEx-1] < 0x80 {
322 break
323 }
324 }
325 case 1:
326 iNdEx += 8
327 case 2:
328 var length int
329 for shift := uint(0); ; shift += 7 {
330 if shift >= 64 {
331 return 0, ErrIntOverflowProto3
332 }
333 if iNdEx >= l {
334 return 0, io.ErrUnexpectedEOF
335 }
336 b := dAtA[iNdEx]
337 iNdEx++
338 length |= (int(b) & 0x7F) << shift
339 if b < 0x80 {
340 break
341 }
342 }
343 if length < 0 {
344 return 0, ErrInvalidLengthProto3
345 }
346 iNdEx += length
347 case 3:
348 depth++
349 case 4:
350 if depth == 0 {
351 return 0, ErrUnexpectedEndOfGroupProto3
352 }
353 depth--
354 case 5:
355 iNdEx += 4
356 default:
357 return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
358 }
359 if iNdEx < 0 {
360 return 0, ErrInvalidLengthProto3
361 }
362 if depth == 0 {
363 return iNdEx, nil
364 }
365 }
366 return 0, io.ErrUnexpectedEOF
367 }
368
369 var (
370 ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling")
371 ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow")
372 ErrUnexpectedEndOfGroupProto3 = fmt.Errorf("proto: unexpected end of group")
373 )