1
16
17
18
19
20 package v1alpha1
21
22 import (
23 fmt "fmt"
24
25 io "io"
26
27 proto "github.com/gogo/protobuf/proto"
28
29 math "math"
30 math_bits "math/bits"
31 reflect "reflect"
32 strings "strings"
33 )
34
35
36 var _ = proto.Marshal
37 var _ = fmt.Errorf
38 var _ = math.Inf
39
40
41
42
43
44 const _ = proto.GoGoProtoPackageIsVersion3
45
46 func (m *ClusterTrustBundle) Reset() { *m = ClusterTrustBundle{} }
47 func (*ClusterTrustBundle) ProtoMessage() {}
48 func (*ClusterTrustBundle) Descriptor() ([]byte, []int) {
49 return fileDescriptor_f73d5fe56c015bb8, []int{0}
50 }
51 func (m *ClusterTrustBundle) XXX_Unmarshal(b []byte) error {
52 return m.Unmarshal(b)
53 }
54 func (m *ClusterTrustBundle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
55 b = b[:cap(b)]
56 n, err := m.MarshalToSizedBuffer(b)
57 if err != nil {
58 return nil, err
59 }
60 return b[:n], nil
61 }
62 func (m *ClusterTrustBundle) XXX_Merge(src proto.Message) {
63 xxx_messageInfo_ClusterTrustBundle.Merge(m, src)
64 }
65 func (m *ClusterTrustBundle) XXX_Size() int {
66 return m.Size()
67 }
68 func (m *ClusterTrustBundle) XXX_DiscardUnknown() {
69 xxx_messageInfo_ClusterTrustBundle.DiscardUnknown(m)
70 }
71
72 var xxx_messageInfo_ClusterTrustBundle proto.InternalMessageInfo
73
74 func (m *ClusterTrustBundleList) Reset() { *m = ClusterTrustBundleList{} }
75 func (*ClusterTrustBundleList) ProtoMessage() {}
76 func (*ClusterTrustBundleList) Descriptor() ([]byte, []int) {
77 return fileDescriptor_f73d5fe56c015bb8, []int{1}
78 }
79 func (m *ClusterTrustBundleList) XXX_Unmarshal(b []byte) error {
80 return m.Unmarshal(b)
81 }
82 func (m *ClusterTrustBundleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
83 b = b[:cap(b)]
84 n, err := m.MarshalToSizedBuffer(b)
85 if err != nil {
86 return nil, err
87 }
88 return b[:n], nil
89 }
90 func (m *ClusterTrustBundleList) XXX_Merge(src proto.Message) {
91 xxx_messageInfo_ClusterTrustBundleList.Merge(m, src)
92 }
93 func (m *ClusterTrustBundleList) XXX_Size() int {
94 return m.Size()
95 }
96 func (m *ClusterTrustBundleList) XXX_DiscardUnknown() {
97 xxx_messageInfo_ClusterTrustBundleList.DiscardUnknown(m)
98 }
99
100 var xxx_messageInfo_ClusterTrustBundleList proto.InternalMessageInfo
101
102 func (m *ClusterTrustBundleSpec) Reset() { *m = ClusterTrustBundleSpec{} }
103 func (*ClusterTrustBundleSpec) ProtoMessage() {}
104 func (*ClusterTrustBundleSpec) Descriptor() ([]byte, []int) {
105 return fileDescriptor_f73d5fe56c015bb8, []int{2}
106 }
107 func (m *ClusterTrustBundleSpec) XXX_Unmarshal(b []byte) error {
108 return m.Unmarshal(b)
109 }
110 func (m *ClusterTrustBundleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
111 b = b[:cap(b)]
112 n, err := m.MarshalToSizedBuffer(b)
113 if err != nil {
114 return nil, err
115 }
116 return b[:n], nil
117 }
118 func (m *ClusterTrustBundleSpec) XXX_Merge(src proto.Message) {
119 xxx_messageInfo_ClusterTrustBundleSpec.Merge(m, src)
120 }
121 func (m *ClusterTrustBundleSpec) XXX_Size() int {
122 return m.Size()
123 }
124 func (m *ClusterTrustBundleSpec) XXX_DiscardUnknown() {
125 xxx_messageInfo_ClusterTrustBundleSpec.DiscardUnknown(m)
126 }
127
128 var xxx_messageInfo_ClusterTrustBundleSpec proto.InternalMessageInfo
129
130 func init() {
131 proto.RegisterType((*ClusterTrustBundle)(nil), "k8s.io.api.certificates.v1alpha1.ClusterTrustBundle")
132 proto.RegisterType((*ClusterTrustBundleList)(nil), "k8s.io.api.certificates.v1alpha1.ClusterTrustBundleList")
133 proto.RegisterType((*ClusterTrustBundleSpec)(nil), "k8s.io.api.certificates.v1alpha1.ClusterTrustBundleSpec")
134 }
135
136 func init() {
137 proto.RegisterFile("k8s.io/api/certificates/v1alpha1/generated.proto", fileDescriptor_f73d5fe56c015bb8)
138 }
139
140 var fileDescriptor_f73d5fe56c015bb8 = []byte{
141
142 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6a, 0xdb, 0x40,
143 0x10, 0xc6, 0xb5, 0x69, 0x02, 0xc9, 0xba, 0x85, 0xa2, 0x42, 0x31, 0x3e, 0x6c, 0x8c, 0x4f, 0xb9,
144 0x74, 0x37, 0x36, 0x69, 0xc9, 0x59, 0x85, 0x42, 0xa1, 0x7f, 0x40, 0xe9, 0xa5, 0xa1, 0x87, 0xae,
145 0xd7, 0x13, 0x79, 0x6b, 0x4b, 0x5a, 0x76, 0x57, 0x86, 0xde, 0x0a, 0x7d, 0x81, 0x3e, 0x96, 0x8f,
146 0x69, 0x4f, 0x39, 0x85, 0x5a, 0x7d, 0x91, 0xb2, 0x6b, 0xd9, 0x12, 0x55, 0x8b, 0x4b, 0x6e, 0x9a,
147 0xd1, 0xfc, 0xbe, 0x6f, 0xbe, 0x11, 0xc2, 0xa7, 0xb3, 0x73, 0x43, 0x65, 0xce, 0xb8, 0x92, 0x4c,
148 0x80, 0xb6, 0xf2, 0x4a, 0x0a, 0x6e, 0xc1, 0xb0, 0xc5, 0x90, 0xcf, 0xd5, 0x94, 0x0f, 0x59, 0x02,
149 0x19, 0x68, 0x6e, 0x61, 0x42, 0x95, 0xce, 0x6d, 0x1e, 0xf6, 0xd7, 0x04, 0xe5, 0x4a, 0xd2, 0x26,
150 0x41, 0x37, 0x44, 0xef, 0x49, 0x22, 0xed, 0xb4, 0x18, 0x53, 0x91, 0xa7, 0x2c, 0xc9, 0x93, 0x9c,
151 0x79, 0x70, 0x5c, 0x5c, 0xf9, 0xca, 0x17, 0xfe, 0x69, 0x2d, 0xd8, 0x3b, 0xab, 0x57, 0x48, 0xb9,
152 0x98, 0xca, 0x0c, 0xf4, 0x67, 0xa6, 0x66, 0x89, 0x6b, 0x18, 0x96, 0x82, 0xe5, 0x6c, 0xd1, 0x5a,
153 0xa3, 0xc7, 0xfe, 0x45, 0xe9, 0x22, 0xb3, 0x32, 0x85, 0x16, 0xf0, 0x6c, 0x17, 0x60, 0xc4, 0x14,
154 0x52, 0xfe, 0x27, 0x37, 0xf8, 0x81, 0x70, 0xf8, 0x7c, 0x5e, 0x18, 0x0b, 0xfa, 0x9d, 0x2e, 0x8c,
155 0x8d, 0x8a, 0x6c, 0x32, 0x87, 0xf0, 0x23, 0x3e, 0x74, 0xab, 0x4d, 0xb8, 0xe5, 0x5d, 0xd4, 0x47,
156 0x27, 0x9d, 0xd1, 0x29, 0xad, 0x2f, 0xb3, 0x75, 0xa0, 0x6a, 0x96, 0xb8, 0x86, 0xa1, 0x6e, 0x9a,
157 0x2e, 0x86, 0xf4, 0xed, 0xf8, 0x13, 0x08, 0xfb, 0x1a, 0x2c, 0x8f, 0xc2, 0xe5, 0xed, 0x71, 0x50,
158 0xde, 0x1e, 0xe3, 0xba, 0x17, 0x6f, 0x55, 0xc3, 0x4b, 0xbc, 0x6f, 0x14, 0x88, 0xee, 0x9e, 0x57,
159 0x3f, 0xa7, 0xbb, 0xee, 0x4e, 0xdb, 0x5b, 0x5e, 0x28, 0x10, 0xd1, 0xfd, 0xca, 0x65, 0xdf, 0x55,
160 0xb1, 0xd7, 0x1c, 0x7c, 0x47, 0xf8, 0x71, 0x7b, 0xfc, 0x95, 0x34, 0x36, 0xfc, 0xd0, 0x0a, 0x46,
161 0xff, 0x2f, 0x98, 0xa3, 0x7d, 0xac, 0x87, 0x95, 0xe1, 0xe1, 0xa6, 0xd3, 0x08, 0xf5, 0x1e, 0x1f,
162 0x48, 0x0b, 0xa9, 0xe9, 0xee, 0xf5, 0xef, 0x9d, 0x74, 0x46, 0x67, 0x77, 0x49, 0x15, 0x3d, 0xa8,
163 0x0c, 0x0e, 0x5e, 0x3a, 0xa9, 0x78, 0xad, 0x38, 0xf8, 0xfa, 0xd7, 0x4c, 0x2e, 0x74, 0x38, 0xc2,
164 0xd8, 0xc8, 0x24, 0x03, 0xfd, 0x86, 0xa7, 0xe0, 0x53, 0x1d, 0xd5, 0xc7, 0xbf, 0xd8, 0xbe, 0x89,
165 0x1b, 0x53, 0xe1, 0x53, 0xdc, 0xb1, 0xb5, 0x8c, 0xff, 0x0a, 0x47, 0xd1, 0xa3, 0x0a, 0xea, 0x34,
166 0x1c, 0xe2, 0xe6, 0x5c, 0xf4, 0x62, 0xb9, 0x22, 0xc1, 0xf5, 0x8a, 0x04, 0x37, 0x2b, 0x12, 0x7c,
167 0x29, 0x09, 0x5a, 0x96, 0x04, 0x5d, 0x97, 0x04, 0xdd, 0x94, 0x04, 0xfd, 0x2c, 0x09, 0xfa, 0xf6,
168 0x8b, 0x04, 0x97, 0xfd, 0x5d, 0xbf, 0xdd, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x1c, 0xcb,
169 0xdd, 0x99, 0x03, 0x00, 0x00,
170 }
171
172 func (m *ClusterTrustBundle) Marshal() (dAtA []byte, err error) {
173 size := m.Size()
174 dAtA = make([]byte, size)
175 n, err := m.MarshalToSizedBuffer(dAtA[:size])
176 if err != nil {
177 return nil, err
178 }
179 return dAtA[:n], nil
180 }
181
182 func (m *ClusterTrustBundle) MarshalTo(dAtA []byte) (int, error) {
183 size := m.Size()
184 return m.MarshalToSizedBuffer(dAtA[:size])
185 }
186
187 func (m *ClusterTrustBundle) MarshalToSizedBuffer(dAtA []byte) (int, error) {
188 i := len(dAtA)
189 _ = i
190 var l int
191 _ = l
192 {
193 size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
194 if err != nil {
195 return 0, err
196 }
197 i -= size
198 i = encodeVarintGenerated(dAtA, i, uint64(size))
199 }
200 i--
201 dAtA[i] = 0x12
202 {
203 size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
204 if err != nil {
205 return 0, err
206 }
207 i -= size
208 i = encodeVarintGenerated(dAtA, i, uint64(size))
209 }
210 i--
211 dAtA[i] = 0xa
212 return len(dAtA) - i, nil
213 }
214
215 func (m *ClusterTrustBundleList) Marshal() (dAtA []byte, err error) {
216 size := m.Size()
217 dAtA = make([]byte, size)
218 n, err := m.MarshalToSizedBuffer(dAtA[:size])
219 if err != nil {
220 return nil, err
221 }
222 return dAtA[:n], nil
223 }
224
225 func (m *ClusterTrustBundleList) MarshalTo(dAtA []byte) (int, error) {
226 size := m.Size()
227 return m.MarshalToSizedBuffer(dAtA[:size])
228 }
229
230 func (m *ClusterTrustBundleList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
231 i := len(dAtA)
232 _ = i
233 var l int
234 _ = l
235 if len(m.Items) > 0 {
236 for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
237 {
238 size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
239 if err != nil {
240 return 0, err
241 }
242 i -= size
243 i = encodeVarintGenerated(dAtA, i, uint64(size))
244 }
245 i--
246 dAtA[i] = 0x12
247 }
248 }
249 {
250 size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
251 if err != nil {
252 return 0, err
253 }
254 i -= size
255 i = encodeVarintGenerated(dAtA, i, uint64(size))
256 }
257 i--
258 dAtA[i] = 0xa
259 return len(dAtA) - i, nil
260 }
261
262 func (m *ClusterTrustBundleSpec) Marshal() (dAtA []byte, err error) {
263 size := m.Size()
264 dAtA = make([]byte, size)
265 n, err := m.MarshalToSizedBuffer(dAtA[:size])
266 if err != nil {
267 return nil, err
268 }
269 return dAtA[:n], nil
270 }
271
272 func (m *ClusterTrustBundleSpec) MarshalTo(dAtA []byte) (int, error) {
273 size := m.Size()
274 return m.MarshalToSizedBuffer(dAtA[:size])
275 }
276
277 func (m *ClusterTrustBundleSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
278 i := len(dAtA)
279 _ = i
280 var l int
281 _ = l
282 i -= len(m.TrustBundle)
283 copy(dAtA[i:], m.TrustBundle)
284 i = encodeVarintGenerated(dAtA, i, uint64(len(m.TrustBundle)))
285 i--
286 dAtA[i] = 0x12
287 i -= len(m.SignerName)
288 copy(dAtA[i:], m.SignerName)
289 i = encodeVarintGenerated(dAtA, i, uint64(len(m.SignerName)))
290 i--
291 dAtA[i] = 0xa
292 return len(dAtA) - i, nil
293 }
294
295 func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
296 offset -= sovGenerated(v)
297 base := offset
298 for v >= 1<<7 {
299 dAtA[offset] = uint8(v&0x7f | 0x80)
300 v >>= 7
301 offset++
302 }
303 dAtA[offset] = uint8(v)
304 return base
305 }
306 func (m *ClusterTrustBundle) Size() (n int) {
307 if m == nil {
308 return 0
309 }
310 var l int
311 _ = l
312 l = m.ObjectMeta.Size()
313 n += 1 + l + sovGenerated(uint64(l))
314 l = m.Spec.Size()
315 n += 1 + l + sovGenerated(uint64(l))
316 return n
317 }
318
319 func (m *ClusterTrustBundleList) Size() (n int) {
320 if m == nil {
321 return 0
322 }
323 var l int
324 _ = l
325 l = m.ListMeta.Size()
326 n += 1 + l + sovGenerated(uint64(l))
327 if len(m.Items) > 0 {
328 for _, e := range m.Items {
329 l = e.Size()
330 n += 1 + l + sovGenerated(uint64(l))
331 }
332 }
333 return n
334 }
335
336 func (m *ClusterTrustBundleSpec) Size() (n int) {
337 if m == nil {
338 return 0
339 }
340 var l int
341 _ = l
342 l = len(m.SignerName)
343 n += 1 + l + sovGenerated(uint64(l))
344 l = len(m.TrustBundle)
345 n += 1 + l + sovGenerated(uint64(l))
346 return n
347 }
348
349 func sovGenerated(x uint64) (n int) {
350 return (math_bits.Len64(x|1) + 6) / 7
351 }
352 func sozGenerated(x uint64) (n int) {
353 return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
354 }
355 func (this *ClusterTrustBundle) String() string {
356 if this == nil {
357 return "nil"
358 }
359 s := strings.Join([]string{`&ClusterTrustBundle{`,
360 `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
361 `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterTrustBundleSpec", "ClusterTrustBundleSpec", 1), `&`, ``, 1) + `,`,
362 `}`,
363 }, "")
364 return s
365 }
366 func (this *ClusterTrustBundleList) String() string {
367 if this == nil {
368 return "nil"
369 }
370 repeatedStringForItems := "[]ClusterTrustBundle{"
371 for _, f := range this.Items {
372 repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ClusterTrustBundle", "ClusterTrustBundle", 1), `&`, ``, 1) + ","
373 }
374 repeatedStringForItems += "}"
375 s := strings.Join([]string{`&ClusterTrustBundleList{`,
376 `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
377 `Items:` + repeatedStringForItems + `,`,
378 `}`,
379 }, "")
380 return s
381 }
382 func (this *ClusterTrustBundleSpec) String() string {
383 if this == nil {
384 return "nil"
385 }
386 s := strings.Join([]string{`&ClusterTrustBundleSpec{`,
387 `SignerName:` + fmt.Sprintf("%v", this.SignerName) + `,`,
388 `TrustBundle:` + fmt.Sprintf("%v", this.TrustBundle) + `,`,
389 `}`,
390 }, "")
391 return s
392 }
393 func valueToStringGenerated(v interface{}) string {
394 rv := reflect.ValueOf(v)
395 if rv.IsNil() {
396 return "nil"
397 }
398 pv := reflect.Indirect(rv).Interface()
399 return fmt.Sprintf("*%v", pv)
400 }
401 func (m *ClusterTrustBundle) Unmarshal(dAtA []byte) error {
402 l := len(dAtA)
403 iNdEx := 0
404 for iNdEx < l {
405 preIndex := iNdEx
406 var wire uint64
407 for shift := uint(0); ; shift += 7 {
408 if shift >= 64 {
409 return ErrIntOverflowGenerated
410 }
411 if iNdEx >= l {
412 return io.ErrUnexpectedEOF
413 }
414 b := dAtA[iNdEx]
415 iNdEx++
416 wire |= uint64(b&0x7F) << shift
417 if b < 0x80 {
418 break
419 }
420 }
421 fieldNum := int32(wire >> 3)
422 wireType := int(wire & 0x7)
423 if wireType == 4 {
424 return fmt.Errorf("proto: ClusterTrustBundle: wiretype end group for non-group")
425 }
426 if fieldNum <= 0 {
427 return fmt.Errorf("proto: ClusterTrustBundle: illegal tag %d (wire type %d)", fieldNum, wire)
428 }
429 switch fieldNum {
430 case 1:
431 if wireType != 2 {
432 return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
433 }
434 var msglen int
435 for shift := uint(0); ; shift += 7 {
436 if shift >= 64 {
437 return ErrIntOverflowGenerated
438 }
439 if iNdEx >= l {
440 return io.ErrUnexpectedEOF
441 }
442 b := dAtA[iNdEx]
443 iNdEx++
444 msglen |= int(b&0x7F) << shift
445 if b < 0x80 {
446 break
447 }
448 }
449 if msglen < 0 {
450 return ErrInvalidLengthGenerated
451 }
452 postIndex := iNdEx + msglen
453 if postIndex < 0 {
454 return ErrInvalidLengthGenerated
455 }
456 if postIndex > l {
457 return io.ErrUnexpectedEOF
458 }
459 if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
460 return err
461 }
462 iNdEx = postIndex
463 case 2:
464 if wireType != 2 {
465 return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
466 }
467 var msglen int
468 for shift := uint(0); ; shift += 7 {
469 if shift >= 64 {
470 return ErrIntOverflowGenerated
471 }
472 if iNdEx >= l {
473 return io.ErrUnexpectedEOF
474 }
475 b := dAtA[iNdEx]
476 iNdEx++
477 msglen |= int(b&0x7F) << shift
478 if b < 0x80 {
479 break
480 }
481 }
482 if msglen < 0 {
483 return ErrInvalidLengthGenerated
484 }
485 postIndex := iNdEx + msglen
486 if postIndex < 0 {
487 return ErrInvalidLengthGenerated
488 }
489 if postIndex > l {
490 return io.ErrUnexpectedEOF
491 }
492 if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
493 return err
494 }
495 iNdEx = postIndex
496 default:
497 iNdEx = preIndex
498 skippy, err := skipGenerated(dAtA[iNdEx:])
499 if err != nil {
500 return err
501 }
502 if (skippy < 0) || (iNdEx+skippy) < 0 {
503 return ErrInvalidLengthGenerated
504 }
505 if (iNdEx + skippy) > l {
506 return io.ErrUnexpectedEOF
507 }
508 iNdEx += skippy
509 }
510 }
511
512 if iNdEx > l {
513 return io.ErrUnexpectedEOF
514 }
515 return nil
516 }
517 func (m *ClusterTrustBundleList) Unmarshal(dAtA []byte) error {
518 l := len(dAtA)
519 iNdEx := 0
520 for iNdEx < l {
521 preIndex := iNdEx
522 var wire uint64
523 for shift := uint(0); ; shift += 7 {
524 if shift >= 64 {
525 return ErrIntOverflowGenerated
526 }
527 if iNdEx >= l {
528 return io.ErrUnexpectedEOF
529 }
530 b := dAtA[iNdEx]
531 iNdEx++
532 wire |= uint64(b&0x7F) << shift
533 if b < 0x80 {
534 break
535 }
536 }
537 fieldNum := int32(wire >> 3)
538 wireType := int(wire & 0x7)
539 if wireType == 4 {
540 return fmt.Errorf("proto: ClusterTrustBundleList: wiretype end group for non-group")
541 }
542 if fieldNum <= 0 {
543 return fmt.Errorf("proto: ClusterTrustBundleList: illegal tag %d (wire type %d)", fieldNum, wire)
544 }
545 switch fieldNum {
546 case 1:
547 if wireType != 2 {
548 return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
549 }
550 var msglen int
551 for shift := uint(0); ; shift += 7 {
552 if shift >= 64 {
553 return ErrIntOverflowGenerated
554 }
555 if iNdEx >= l {
556 return io.ErrUnexpectedEOF
557 }
558 b := dAtA[iNdEx]
559 iNdEx++
560 msglen |= int(b&0x7F) << shift
561 if b < 0x80 {
562 break
563 }
564 }
565 if msglen < 0 {
566 return ErrInvalidLengthGenerated
567 }
568 postIndex := iNdEx + msglen
569 if postIndex < 0 {
570 return ErrInvalidLengthGenerated
571 }
572 if postIndex > l {
573 return io.ErrUnexpectedEOF
574 }
575 if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
576 return err
577 }
578 iNdEx = postIndex
579 case 2:
580 if wireType != 2 {
581 return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
582 }
583 var msglen int
584 for shift := uint(0); ; shift += 7 {
585 if shift >= 64 {
586 return ErrIntOverflowGenerated
587 }
588 if iNdEx >= l {
589 return io.ErrUnexpectedEOF
590 }
591 b := dAtA[iNdEx]
592 iNdEx++
593 msglen |= int(b&0x7F) << shift
594 if b < 0x80 {
595 break
596 }
597 }
598 if msglen < 0 {
599 return ErrInvalidLengthGenerated
600 }
601 postIndex := iNdEx + msglen
602 if postIndex < 0 {
603 return ErrInvalidLengthGenerated
604 }
605 if postIndex > l {
606 return io.ErrUnexpectedEOF
607 }
608 m.Items = append(m.Items, ClusterTrustBundle{})
609 if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
610 return err
611 }
612 iNdEx = postIndex
613 default:
614 iNdEx = preIndex
615 skippy, err := skipGenerated(dAtA[iNdEx:])
616 if err != nil {
617 return err
618 }
619 if (skippy < 0) || (iNdEx+skippy) < 0 {
620 return ErrInvalidLengthGenerated
621 }
622 if (iNdEx + skippy) > l {
623 return io.ErrUnexpectedEOF
624 }
625 iNdEx += skippy
626 }
627 }
628
629 if iNdEx > l {
630 return io.ErrUnexpectedEOF
631 }
632 return nil
633 }
634 func (m *ClusterTrustBundleSpec) Unmarshal(dAtA []byte) error {
635 l := len(dAtA)
636 iNdEx := 0
637 for iNdEx < l {
638 preIndex := iNdEx
639 var wire uint64
640 for shift := uint(0); ; shift += 7 {
641 if shift >= 64 {
642 return ErrIntOverflowGenerated
643 }
644 if iNdEx >= l {
645 return io.ErrUnexpectedEOF
646 }
647 b := dAtA[iNdEx]
648 iNdEx++
649 wire |= uint64(b&0x7F) << shift
650 if b < 0x80 {
651 break
652 }
653 }
654 fieldNum := int32(wire >> 3)
655 wireType := int(wire & 0x7)
656 if wireType == 4 {
657 return fmt.Errorf("proto: ClusterTrustBundleSpec: wiretype end group for non-group")
658 }
659 if fieldNum <= 0 {
660 return fmt.Errorf("proto: ClusterTrustBundleSpec: illegal tag %d (wire type %d)", fieldNum, wire)
661 }
662 switch fieldNum {
663 case 1:
664 if wireType != 2 {
665 return fmt.Errorf("proto: wrong wireType = %d for field SignerName", wireType)
666 }
667 var stringLen uint64
668 for shift := uint(0); ; shift += 7 {
669 if shift >= 64 {
670 return ErrIntOverflowGenerated
671 }
672 if iNdEx >= l {
673 return io.ErrUnexpectedEOF
674 }
675 b := dAtA[iNdEx]
676 iNdEx++
677 stringLen |= uint64(b&0x7F) << shift
678 if b < 0x80 {
679 break
680 }
681 }
682 intStringLen := int(stringLen)
683 if intStringLen < 0 {
684 return ErrInvalidLengthGenerated
685 }
686 postIndex := iNdEx + intStringLen
687 if postIndex < 0 {
688 return ErrInvalidLengthGenerated
689 }
690 if postIndex > l {
691 return io.ErrUnexpectedEOF
692 }
693 m.SignerName = string(dAtA[iNdEx:postIndex])
694 iNdEx = postIndex
695 case 2:
696 if wireType != 2 {
697 return fmt.Errorf("proto: wrong wireType = %d for field TrustBundle", wireType)
698 }
699 var stringLen uint64
700 for shift := uint(0); ; shift += 7 {
701 if shift >= 64 {
702 return ErrIntOverflowGenerated
703 }
704 if iNdEx >= l {
705 return io.ErrUnexpectedEOF
706 }
707 b := dAtA[iNdEx]
708 iNdEx++
709 stringLen |= uint64(b&0x7F) << shift
710 if b < 0x80 {
711 break
712 }
713 }
714 intStringLen := int(stringLen)
715 if intStringLen < 0 {
716 return ErrInvalidLengthGenerated
717 }
718 postIndex := iNdEx + intStringLen
719 if postIndex < 0 {
720 return ErrInvalidLengthGenerated
721 }
722 if postIndex > l {
723 return io.ErrUnexpectedEOF
724 }
725 m.TrustBundle = string(dAtA[iNdEx:postIndex])
726 iNdEx = postIndex
727 default:
728 iNdEx = preIndex
729 skippy, err := skipGenerated(dAtA[iNdEx:])
730 if err != nil {
731 return err
732 }
733 if (skippy < 0) || (iNdEx+skippy) < 0 {
734 return ErrInvalidLengthGenerated
735 }
736 if (iNdEx + skippy) > l {
737 return io.ErrUnexpectedEOF
738 }
739 iNdEx += skippy
740 }
741 }
742
743 if iNdEx > l {
744 return io.ErrUnexpectedEOF
745 }
746 return nil
747 }
748 func skipGenerated(dAtA []byte) (n int, err error) {
749 l := len(dAtA)
750 iNdEx := 0
751 depth := 0
752 for iNdEx < l {
753 var wire uint64
754 for shift := uint(0); ; shift += 7 {
755 if shift >= 64 {
756 return 0, ErrIntOverflowGenerated
757 }
758 if iNdEx >= l {
759 return 0, io.ErrUnexpectedEOF
760 }
761 b := dAtA[iNdEx]
762 iNdEx++
763 wire |= (uint64(b) & 0x7F) << shift
764 if b < 0x80 {
765 break
766 }
767 }
768 wireType := int(wire & 0x7)
769 switch wireType {
770 case 0:
771 for shift := uint(0); ; shift += 7 {
772 if shift >= 64 {
773 return 0, ErrIntOverflowGenerated
774 }
775 if iNdEx >= l {
776 return 0, io.ErrUnexpectedEOF
777 }
778 iNdEx++
779 if dAtA[iNdEx-1] < 0x80 {
780 break
781 }
782 }
783 case 1:
784 iNdEx += 8
785 case 2:
786 var length int
787 for shift := uint(0); ; shift += 7 {
788 if shift >= 64 {
789 return 0, ErrIntOverflowGenerated
790 }
791 if iNdEx >= l {
792 return 0, io.ErrUnexpectedEOF
793 }
794 b := dAtA[iNdEx]
795 iNdEx++
796 length |= (int(b) & 0x7F) << shift
797 if b < 0x80 {
798 break
799 }
800 }
801 if length < 0 {
802 return 0, ErrInvalidLengthGenerated
803 }
804 iNdEx += length
805 case 3:
806 depth++
807 case 4:
808 if depth == 0 {
809 return 0, ErrUnexpectedEndOfGroupGenerated
810 }
811 depth--
812 case 5:
813 iNdEx += 4
814 default:
815 return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
816 }
817 if iNdEx < 0 {
818 return 0, ErrInvalidLengthGenerated
819 }
820 if depth == 0 {
821 return iNdEx, nil
822 }
823 }
824 return 0, io.ErrUnexpectedEOF
825 }
826
827 var (
828 ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
829 ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
830 ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
831 )
832
View as plain text