1// Code generated by protoc-gen-gogo. 2// source: plugin.proto 3// DO NOT EDIT! 4 5/* 6 Package runtime is a generated protocol buffer package. 7 8 It is generated from these files: 9 plugin.proto 10 11 It has these top-level messages: 12 PluginSpec 13 PluginPrivilege 14*/ 15package runtime 16 17import proto "github.com/gogo/protobuf/proto" 18import fmt "fmt" 19import math "math" 20 21import io "io" 22 23// Reference imports to suppress errors if they are not otherwise used. 24var _ = proto.Marshal 25var _ = fmt.Errorf 26var _ = math.Inf 27 28// This is a compile-time assertion to ensure that this generated file 29// is compatible with the proto package it is being compiled against. 30// A compilation error at this line likely means your copy of the 31// proto package needs to be updated. 32const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 33 34// PluginSpec defines the base payload which clients can specify for creating 35// a service with the plugin runtime. 36type PluginSpec struct { 37 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 38 Remote string `protobuf:"bytes,2,opt,name=remote,proto3" json:"remote,omitempty"` 39 Privileges []*PluginPrivilege `protobuf:"bytes,3,rep,name=privileges" json:"privileges,omitempty"` 40 Disabled bool `protobuf:"varint,4,opt,name=disabled,proto3" json:"disabled,omitempty"` 41} 42 43func (m *PluginSpec) Reset() { *m = PluginSpec{} } 44func (m *PluginSpec) String() string { return proto.CompactTextString(m) } 45func (*PluginSpec) ProtoMessage() {} 46func (*PluginSpec) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{0} } 47 48func (m *PluginSpec) GetName() string { 49 if m != nil { 50 return m.Name 51 } 52 return "" 53} 54 55func (m *PluginSpec) GetRemote() string { 56 if m != nil { 57 return m.Remote 58 } 59 return "" 60} 61 62func (m *PluginSpec) GetPrivileges() []*PluginPrivilege { 63 if m != nil { 64 return m.Privileges 65 } 66 return nil 67} 68 69func (m *PluginSpec) GetDisabled() bool { 70 if m != nil { 71 return m.Disabled 72 } 73 return false 74} 75 76// PluginPrivilege describes a permission the user has to accept 77// upon installing a plugin. 78type PluginPrivilege struct { 79 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 80 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 81 Value []string `protobuf:"bytes,3,rep,name=value" json:"value,omitempty"` 82} 83 84func (m *PluginPrivilege) Reset() { *m = PluginPrivilege{} } 85func (m *PluginPrivilege) String() string { return proto.CompactTextString(m) } 86func (*PluginPrivilege) ProtoMessage() {} 87func (*PluginPrivilege) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{1} } 88 89func (m *PluginPrivilege) GetName() string { 90 if m != nil { 91 return m.Name 92 } 93 return "" 94} 95 96func (m *PluginPrivilege) GetDescription() string { 97 if m != nil { 98 return m.Description 99 } 100 return "" 101} 102 103func (m *PluginPrivilege) GetValue() []string { 104 if m != nil { 105 return m.Value 106 } 107 return nil 108} 109 110func init() { 111 proto.RegisterType((*PluginSpec)(nil), "PluginSpec") 112 proto.RegisterType((*PluginPrivilege)(nil), "PluginPrivilege") 113} 114func (m *PluginSpec) Marshal() (dAtA []byte, err error) { 115 size := m.Size() 116 dAtA = make([]byte, size) 117 n, err := m.MarshalTo(dAtA) 118 if err != nil { 119 return nil, err 120 } 121 return dAtA[:n], nil 122} 123 124func (m *PluginSpec) MarshalTo(dAtA []byte) (int, error) { 125 var i int 126 _ = i 127 var l int 128 _ = l 129 if len(m.Name) > 0 { 130 dAtA[i] = 0xa 131 i++ 132 i = encodeVarintPlugin(dAtA, i, uint64(len(m.Name))) 133 i += copy(dAtA[i:], m.Name) 134 } 135 if len(m.Remote) > 0 { 136 dAtA[i] = 0x12 137 i++ 138 i = encodeVarintPlugin(dAtA, i, uint64(len(m.Remote))) 139 i += copy(dAtA[i:], m.Remote) 140 } 141 if len(m.Privileges) > 0 { 142 for _, msg := range m.Privileges { 143 dAtA[i] = 0x1a 144 i++ 145 i = encodeVarintPlugin(dAtA, i, uint64(msg.Size())) 146 n, err := msg.MarshalTo(dAtA[i:]) 147 if err != nil { 148 return 0, err 149 } 150 i += n 151 } 152 } 153 if m.Disabled { 154 dAtA[i] = 0x20 155 i++ 156 if m.Disabled { 157 dAtA[i] = 1 158 } else { 159 dAtA[i] = 0 160 } 161 i++ 162 } 163 return i, nil 164} 165 166func (m *PluginPrivilege) Marshal() (dAtA []byte, err error) { 167 size := m.Size() 168 dAtA = make([]byte, size) 169 n, err := m.MarshalTo(dAtA) 170 if err != nil { 171 return nil, err 172 } 173 return dAtA[:n], nil 174} 175 176func (m *PluginPrivilege) MarshalTo(dAtA []byte) (int, error) { 177 var i int 178 _ = i 179 var l int 180 _ = l 181 if len(m.Name) > 0 { 182 dAtA[i] = 0xa 183 i++ 184 i = encodeVarintPlugin(dAtA, i, uint64(len(m.Name))) 185 i += copy(dAtA[i:], m.Name) 186 } 187 if len(m.Description) > 0 { 188 dAtA[i] = 0x12 189 i++ 190 i = encodeVarintPlugin(dAtA, i, uint64(len(m.Description))) 191 i += copy(dAtA[i:], m.Description) 192 } 193 if len(m.Value) > 0 { 194 for _, s := range m.Value { 195 dAtA[i] = 0x1a 196 i++ 197 l = len(s) 198 for l >= 1<<7 { 199 dAtA[i] = uint8(uint64(l)&0x7f | 0x80) 200 l >>= 7 201 i++ 202 } 203 dAtA[i] = uint8(l) 204 i++ 205 i += copy(dAtA[i:], s) 206 } 207 } 208 return i, nil 209} 210 211func encodeFixed64Plugin(dAtA []byte, offset int, v uint64) int { 212 dAtA[offset] = uint8(v) 213 dAtA[offset+1] = uint8(v >> 8) 214 dAtA[offset+2] = uint8(v >> 16) 215 dAtA[offset+3] = uint8(v >> 24) 216 dAtA[offset+4] = uint8(v >> 32) 217 dAtA[offset+5] = uint8(v >> 40) 218 dAtA[offset+6] = uint8(v >> 48) 219 dAtA[offset+7] = uint8(v >> 56) 220 return offset + 8 221} 222func encodeFixed32Plugin(dAtA []byte, offset int, v uint32) int { 223 dAtA[offset] = uint8(v) 224 dAtA[offset+1] = uint8(v >> 8) 225 dAtA[offset+2] = uint8(v >> 16) 226 dAtA[offset+3] = uint8(v >> 24) 227 return offset + 4 228} 229func encodeVarintPlugin(dAtA []byte, offset int, v uint64) int { 230 for v >= 1<<7 { 231 dAtA[offset] = uint8(v&0x7f | 0x80) 232 v >>= 7 233 offset++ 234 } 235 dAtA[offset] = uint8(v) 236 return offset + 1 237} 238func (m *PluginSpec) Size() (n int) { 239 var l int 240 _ = l 241 l = len(m.Name) 242 if l > 0 { 243 n += 1 + l + sovPlugin(uint64(l)) 244 } 245 l = len(m.Remote) 246 if l > 0 { 247 n += 1 + l + sovPlugin(uint64(l)) 248 } 249 if len(m.Privileges) > 0 { 250 for _, e := range m.Privileges { 251 l = e.Size() 252 n += 1 + l + sovPlugin(uint64(l)) 253 } 254 } 255 if m.Disabled { 256 n += 2 257 } 258 return n 259} 260 261func (m *PluginPrivilege) Size() (n int) { 262 var l int 263 _ = l 264 l = len(m.Name) 265 if l > 0 { 266 n += 1 + l + sovPlugin(uint64(l)) 267 } 268 l = len(m.Description) 269 if l > 0 { 270 n += 1 + l + sovPlugin(uint64(l)) 271 } 272 if len(m.Value) > 0 { 273 for _, s := range m.Value { 274 l = len(s) 275 n += 1 + l + sovPlugin(uint64(l)) 276 } 277 } 278 return n 279} 280 281func sovPlugin(x uint64) (n int) { 282 for { 283 n++ 284 x >>= 7 285 if x == 0 { 286 break 287 } 288 } 289 return n 290} 291func sozPlugin(x uint64) (n int) { 292 return sovPlugin(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 293} 294func (m *PluginSpec) Unmarshal(dAtA []byte) error { 295 l := len(dAtA) 296 iNdEx := 0 297 for iNdEx < l { 298 preIndex := iNdEx 299 var wire uint64 300 for shift := uint(0); ; shift += 7 { 301 if shift >= 64 { 302 return ErrIntOverflowPlugin 303 } 304 if iNdEx >= l { 305 return io.ErrUnexpectedEOF 306 } 307 b := dAtA[iNdEx] 308 iNdEx++ 309 wire |= (uint64(b) & 0x7F) << shift 310 if b < 0x80 { 311 break 312 } 313 } 314 fieldNum := int32(wire >> 3) 315 wireType := int(wire & 0x7) 316 if wireType == 4 { 317 return fmt.Errorf("proto: PluginSpec: wiretype end group for non-group") 318 } 319 if fieldNum <= 0 { 320 return fmt.Errorf("proto: PluginSpec: illegal tag %d (wire type %d)", fieldNum, wire) 321 } 322 switch fieldNum { 323 case 1: 324 if wireType != 2 { 325 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 326 } 327 var stringLen uint64 328 for shift := uint(0); ; shift += 7 { 329 if shift >= 64 { 330 return ErrIntOverflowPlugin 331 } 332 if iNdEx >= l { 333 return io.ErrUnexpectedEOF 334 } 335 b := dAtA[iNdEx] 336 iNdEx++ 337 stringLen |= (uint64(b) & 0x7F) << shift 338 if b < 0x80 { 339 break 340 } 341 } 342 intStringLen := int(stringLen) 343 if intStringLen < 0 { 344 return ErrInvalidLengthPlugin 345 } 346 postIndex := iNdEx + intStringLen 347 if postIndex > l { 348 return io.ErrUnexpectedEOF 349 } 350 m.Name = string(dAtA[iNdEx:postIndex]) 351 iNdEx = postIndex 352 case 2: 353 if wireType != 2 { 354 return fmt.Errorf("proto: wrong wireType = %d for field Remote", wireType) 355 } 356 var stringLen uint64 357 for shift := uint(0); ; shift += 7 { 358 if shift >= 64 { 359 return ErrIntOverflowPlugin 360 } 361 if iNdEx >= l { 362 return io.ErrUnexpectedEOF 363 } 364 b := dAtA[iNdEx] 365 iNdEx++ 366 stringLen |= (uint64(b) & 0x7F) << shift 367 if b < 0x80 { 368 break 369 } 370 } 371 intStringLen := int(stringLen) 372 if intStringLen < 0 { 373 return ErrInvalidLengthPlugin 374 } 375 postIndex := iNdEx + intStringLen 376 if postIndex > l { 377 return io.ErrUnexpectedEOF 378 } 379 m.Remote = string(dAtA[iNdEx:postIndex]) 380 iNdEx = postIndex 381 case 3: 382 if wireType != 2 { 383 return fmt.Errorf("proto: wrong wireType = %d for field Privileges", wireType) 384 } 385 var msglen int 386 for shift := uint(0); ; shift += 7 { 387 if shift >= 64 { 388 return ErrIntOverflowPlugin 389 } 390 if iNdEx >= l { 391 return io.ErrUnexpectedEOF 392 } 393 b := dAtA[iNdEx] 394 iNdEx++ 395 msglen |= (int(b) & 0x7F) << shift 396 if b < 0x80 { 397 break 398 } 399 } 400 if msglen < 0 { 401 return ErrInvalidLengthPlugin 402 } 403 postIndex := iNdEx + msglen 404 if postIndex > l { 405 return io.ErrUnexpectedEOF 406 } 407 m.Privileges = append(m.Privileges, &PluginPrivilege{}) 408 if err := m.Privileges[len(m.Privileges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 409 return err 410 } 411 iNdEx = postIndex 412 case 4: 413 if wireType != 0 { 414 return fmt.Errorf("proto: wrong wireType = %d for field Disabled", wireType) 415 } 416 var v int 417 for shift := uint(0); ; shift += 7 { 418 if shift >= 64 { 419 return ErrIntOverflowPlugin 420 } 421 if iNdEx >= l { 422 return io.ErrUnexpectedEOF 423 } 424 b := dAtA[iNdEx] 425 iNdEx++ 426 v |= (int(b) & 0x7F) << shift 427 if b < 0x80 { 428 break 429 } 430 } 431 m.Disabled = bool(v != 0) 432 default: 433 iNdEx = preIndex 434 skippy, err := skipPlugin(dAtA[iNdEx:]) 435 if err != nil { 436 return err 437 } 438 if skippy < 0 { 439 return ErrInvalidLengthPlugin 440 } 441 if (iNdEx + skippy) > l { 442 return io.ErrUnexpectedEOF 443 } 444 iNdEx += skippy 445 } 446 } 447 448 if iNdEx > l { 449 return io.ErrUnexpectedEOF 450 } 451 return nil 452} 453func (m *PluginPrivilege) Unmarshal(dAtA []byte) error { 454 l := len(dAtA) 455 iNdEx := 0 456 for iNdEx < l { 457 preIndex := iNdEx 458 var wire uint64 459 for shift := uint(0); ; shift += 7 { 460 if shift >= 64 { 461 return ErrIntOverflowPlugin 462 } 463 if iNdEx >= l { 464 return io.ErrUnexpectedEOF 465 } 466 b := dAtA[iNdEx] 467 iNdEx++ 468 wire |= (uint64(b) & 0x7F) << shift 469 if b < 0x80 { 470 break 471 } 472 } 473 fieldNum := int32(wire >> 3) 474 wireType := int(wire & 0x7) 475 if wireType == 4 { 476 return fmt.Errorf("proto: PluginPrivilege: wiretype end group for non-group") 477 } 478 if fieldNum <= 0 { 479 return fmt.Errorf("proto: PluginPrivilege: illegal tag %d (wire type %d)", fieldNum, wire) 480 } 481 switch fieldNum { 482 case 1: 483 if wireType != 2 { 484 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 485 } 486 var stringLen uint64 487 for shift := uint(0); ; shift += 7 { 488 if shift >= 64 { 489 return ErrIntOverflowPlugin 490 } 491 if iNdEx >= l { 492 return io.ErrUnexpectedEOF 493 } 494 b := dAtA[iNdEx] 495 iNdEx++ 496 stringLen |= (uint64(b) & 0x7F) << shift 497 if b < 0x80 { 498 break 499 } 500 } 501 intStringLen := int(stringLen) 502 if intStringLen < 0 { 503 return ErrInvalidLengthPlugin 504 } 505 postIndex := iNdEx + intStringLen 506 if postIndex > l { 507 return io.ErrUnexpectedEOF 508 } 509 m.Name = string(dAtA[iNdEx:postIndex]) 510 iNdEx = postIndex 511 case 2: 512 if wireType != 2 { 513 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 514 } 515 var stringLen uint64 516 for shift := uint(0); ; shift += 7 { 517 if shift >= 64 { 518 return ErrIntOverflowPlugin 519 } 520 if iNdEx >= l { 521 return io.ErrUnexpectedEOF 522 } 523 b := dAtA[iNdEx] 524 iNdEx++ 525 stringLen |= (uint64(b) & 0x7F) << shift 526 if b < 0x80 { 527 break 528 } 529 } 530 intStringLen := int(stringLen) 531 if intStringLen < 0 { 532 return ErrInvalidLengthPlugin 533 } 534 postIndex := iNdEx + intStringLen 535 if postIndex > l { 536 return io.ErrUnexpectedEOF 537 } 538 m.Description = string(dAtA[iNdEx:postIndex]) 539 iNdEx = postIndex 540 case 3: 541 if wireType != 2 { 542 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 543 } 544 var stringLen uint64 545 for shift := uint(0); ; shift += 7 { 546 if shift >= 64 { 547 return ErrIntOverflowPlugin 548 } 549 if iNdEx >= l { 550 return io.ErrUnexpectedEOF 551 } 552 b := dAtA[iNdEx] 553 iNdEx++ 554 stringLen |= (uint64(b) & 0x7F) << shift 555 if b < 0x80 { 556 break 557 } 558 } 559 intStringLen := int(stringLen) 560 if intStringLen < 0 { 561 return ErrInvalidLengthPlugin 562 } 563 postIndex := iNdEx + intStringLen 564 if postIndex > l { 565 return io.ErrUnexpectedEOF 566 } 567 m.Value = append(m.Value, string(dAtA[iNdEx:postIndex])) 568 iNdEx = postIndex 569 default: 570 iNdEx = preIndex 571 skippy, err := skipPlugin(dAtA[iNdEx:]) 572 if err != nil { 573 return err 574 } 575 if skippy < 0 { 576 return ErrInvalidLengthPlugin 577 } 578 if (iNdEx + skippy) > l { 579 return io.ErrUnexpectedEOF 580 } 581 iNdEx += skippy 582 } 583 } 584 585 if iNdEx > l { 586 return io.ErrUnexpectedEOF 587 } 588 return nil 589} 590func skipPlugin(dAtA []byte) (n int, err error) { 591 l := len(dAtA) 592 iNdEx := 0 593 for iNdEx < l { 594 var wire uint64 595 for shift := uint(0); ; shift += 7 { 596 if shift >= 64 { 597 return 0, ErrIntOverflowPlugin 598 } 599 if iNdEx >= l { 600 return 0, io.ErrUnexpectedEOF 601 } 602 b := dAtA[iNdEx] 603 iNdEx++ 604 wire |= (uint64(b) & 0x7F) << shift 605 if b < 0x80 { 606 break 607 } 608 } 609 wireType := int(wire & 0x7) 610 switch wireType { 611 case 0: 612 for shift := uint(0); ; shift += 7 { 613 if shift >= 64 { 614 return 0, ErrIntOverflowPlugin 615 } 616 if iNdEx >= l { 617 return 0, io.ErrUnexpectedEOF 618 } 619 iNdEx++ 620 if dAtA[iNdEx-1] < 0x80 { 621 break 622 } 623 } 624 return iNdEx, nil 625 case 1: 626 iNdEx += 8 627 return iNdEx, nil 628 case 2: 629 var length int 630 for shift := uint(0); ; shift += 7 { 631 if shift >= 64 { 632 return 0, ErrIntOverflowPlugin 633 } 634 if iNdEx >= l { 635 return 0, io.ErrUnexpectedEOF 636 } 637 b := dAtA[iNdEx] 638 iNdEx++ 639 length |= (int(b) & 0x7F) << shift 640 if b < 0x80 { 641 break 642 } 643 } 644 iNdEx += length 645 if length < 0 { 646 return 0, ErrInvalidLengthPlugin 647 } 648 return iNdEx, nil 649 case 3: 650 for { 651 var innerWire uint64 652 var start int = iNdEx 653 for shift := uint(0); ; shift += 7 { 654 if shift >= 64 { 655 return 0, ErrIntOverflowPlugin 656 } 657 if iNdEx >= l { 658 return 0, io.ErrUnexpectedEOF 659 } 660 b := dAtA[iNdEx] 661 iNdEx++ 662 innerWire |= (uint64(b) & 0x7F) << shift 663 if b < 0x80 { 664 break 665 } 666 } 667 innerWireType := int(innerWire & 0x7) 668 if innerWireType == 4 { 669 break 670 } 671 next, err := skipPlugin(dAtA[start:]) 672 if err != nil { 673 return 0, err 674 } 675 iNdEx = start + next 676 } 677 return iNdEx, nil 678 case 4: 679 return iNdEx, nil 680 case 5: 681 iNdEx += 4 682 return iNdEx, nil 683 default: 684 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 685 } 686 } 687 panic("unreachable") 688} 689 690var ( 691 ErrInvalidLengthPlugin = fmt.Errorf("proto: negative length found during unmarshaling") 692 ErrIntOverflowPlugin = fmt.Errorf("proto: integer overflow") 693) 694 695func init() { proto.RegisterFile("plugin.proto", fileDescriptorPlugin) } 696 697var fileDescriptorPlugin = []byte{ 698 // 196 bytes of a gzipped FileDescriptorProto 699 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0xc8, 0x29, 0x4d, 700 0xcf, 0xcc, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x6a, 0x63, 0xe4, 0xe2, 0x0a, 0x00, 0x0b, 701 0x04, 0x17, 0xa4, 0x26, 0x0b, 0x09, 0x71, 0xb1, 0xe4, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 702 0x6a, 0x70, 0x06, 0x81, 0xd9, 0x42, 0x62, 0x5c, 0x6c, 0x45, 0xa9, 0xb9, 0xf9, 0x25, 0xa9, 0x12, 703 0x4c, 0x60, 0x51, 0x28, 0x4f, 0xc8, 0x80, 0x8b, 0xab, 0xa0, 0x28, 0xb3, 0x2c, 0x33, 0x27, 0x35, 704 0x3d, 0xb5, 0x58, 0x82, 0x59, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x40, 0x0f, 0x62, 0x58, 0x00, 0x4c, 705 0x22, 0x08, 0x49, 0x8d, 0x90, 0x14, 0x17, 0x47, 0x4a, 0x66, 0x71, 0x62, 0x52, 0x4e, 0x6a, 0x8a, 706 0x04, 0x8b, 0x02, 0xa3, 0x06, 0x47, 0x10, 0x9c, 0xaf, 0x14, 0xcb, 0xc5, 0x8f, 0xa6, 0x15, 0xab, 707 0x63, 0x14, 0xb8, 0xb8, 0x53, 0x52, 0x8b, 0x93, 0x8b, 0x32, 0x0b, 0x4a, 0x32, 0xf3, 0xf3, 0xa0, 708 0x2e, 0x42, 0x16, 0x12, 0x12, 0xe1, 0x62, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0x05, 0xbb, 0x88, 0x33, 709 0x08, 0xc2, 0x71, 0xe2, 0x39, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 710 0x18, 0x93, 0xd8, 0xc0, 0x9e, 0x37, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x84, 0xad, 0x79, 711 0x0c, 0x01, 0x00, 0x00, 712} 713