github.com/toplink-cn/moby@v0.0.0-20240305205811-460b4aebdf81/api/types/swarm/runtime/plugin.pb.go (about)

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