plugin.pb.go 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: github.com/docker/swarmkit/protobuf/plugin/plugin.proto
  3. package plugin
  4. import (
  5. fmt "fmt"
  6. github_com_docker_swarmkit_api_deepcopy "github.com/docker/swarmkit/api/deepcopy"
  7. github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
  8. proto "github.com/gogo/protobuf/proto"
  9. descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
  10. io "io"
  11. math "math"
  12. reflect "reflect"
  13. strings "strings"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  24. type WatchSelectors struct {
  25. // supported by all object types
  26. ID *bool `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
  27. IDPrefix *bool `protobuf:"varint,2,opt,name=id_prefix,json=idPrefix" json:"id_prefix,omitempty"`
  28. Name *bool `protobuf:"varint,3,opt,name=name" json:"name,omitempty"`
  29. NamePrefix *bool `protobuf:"varint,4,opt,name=name_prefix,json=namePrefix" json:"name_prefix,omitempty"`
  30. Custom *bool `protobuf:"varint,5,opt,name=custom" json:"custom,omitempty"`
  31. CustomPrefix *bool `protobuf:"varint,6,opt,name=custom_prefix,json=customPrefix" json:"custom_prefix,omitempty"`
  32. // supported by tasks only
  33. ServiceID *bool `protobuf:"varint,7,opt,name=service_id,json=serviceId" json:"service_id,omitempty"`
  34. NodeID *bool `protobuf:"varint,8,opt,name=node_id,json=nodeId" json:"node_id,omitempty"`
  35. Slot *bool `protobuf:"varint,9,opt,name=slot" json:"slot,omitempty"`
  36. DesiredState *bool `protobuf:"varint,10,opt,name=desired_state,json=desiredState" json:"desired_state,omitempty"`
  37. // supported by nodes only
  38. Role *bool `protobuf:"varint,11,opt,name=role" json:"role,omitempty"`
  39. Membership *bool `protobuf:"varint,12,opt,name=membership" json:"membership,omitempty"`
  40. // supported by: resource
  41. Kind *bool `protobuf:"varint,13,opt,name=kind" json:"kind,omitempty"`
  42. }
  43. func (m *WatchSelectors) Reset() { *m = WatchSelectors{} }
  44. func (*WatchSelectors) ProtoMessage() {}
  45. func (*WatchSelectors) Descriptor() ([]byte, []int) {
  46. return fileDescriptor_3708583e03e1c1e3, []int{0}
  47. }
  48. func (m *WatchSelectors) XXX_Unmarshal(b []byte) error {
  49. return m.Unmarshal(b)
  50. }
  51. func (m *WatchSelectors) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  52. if deterministic {
  53. return xxx_messageInfo_WatchSelectors.Marshal(b, m, deterministic)
  54. } else {
  55. b = b[:cap(b)]
  56. n, err := m.MarshalTo(b)
  57. if err != nil {
  58. return nil, err
  59. }
  60. return b[:n], nil
  61. }
  62. }
  63. func (m *WatchSelectors) XXX_Merge(src proto.Message) {
  64. xxx_messageInfo_WatchSelectors.Merge(m, src)
  65. }
  66. func (m *WatchSelectors) XXX_Size() int {
  67. return m.Size()
  68. }
  69. func (m *WatchSelectors) XXX_DiscardUnknown() {
  70. xxx_messageInfo_WatchSelectors.DiscardUnknown(m)
  71. }
  72. var xxx_messageInfo_WatchSelectors proto.InternalMessageInfo
  73. type StoreObject struct {
  74. WatchSelectors *WatchSelectors `protobuf:"bytes,1,req,name=watch_selectors,json=watchSelectors" json:"watch_selectors,omitempty"`
  75. }
  76. func (m *StoreObject) Reset() { *m = StoreObject{} }
  77. func (*StoreObject) ProtoMessage() {}
  78. func (*StoreObject) Descriptor() ([]byte, []int) {
  79. return fileDescriptor_3708583e03e1c1e3, []int{1}
  80. }
  81. func (m *StoreObject) XXX_Unmarshal(b []byte) error {
  82. return m.Unmarshal(b)
  83. }
  84. func (m *StoreObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  85. if deterministic {
  86. return xxx_messageInfo_StoreObject.Marshal(b, m, deterministic)
  87. } else {
  88. b = b[:cap(b)]
  89. n, err := m.MarshalTo(b)
  90. if err != nil {
  91. return nil, err
  92. }
  93. return b[:n], nil
  94. }
  95. }
  96. func (m *StoreObject) XXX_Merge(src proto.Message) {
  97. xxx_messageInfo_StoreObject.Merge(m, src)
  98. }
  99. func (m *StoreObject) XXX_Size() int {
  100. return m.Size()
  101. }
  102. func (m *StoreObject) XXX_DiscardUnknown() {
  103. xxx_messageInfo_StoreObject.DiscardUnknown(m)
  104. }
  105. var xxx_messageInfo_StoreObject proto.InternalMessageInfo
  106. type TLSAuthorization struct {
  107. // Roles contains the acceptable TLS OU roles for the handler.
  108. Roles []string `protobuf:"bytes,1,rep,name=roles" json:"roles,omitempty"`
  109. // Insecure is set to true if this method does not require
  110. // authorization. NOTE: Specifying both "insecure" and a nonempty
  111. // list of roles is invalid. This would fail at codegen time.
  112. Insecure *bool `protobuf:"varint,2,opt,name=insecure" json:"insecure,omitempty"`
  113. }
  114. func (m *TLSAuthorization) Reset() { *m = TLSAuthorization{} }
  115. func (*TLSAuthorization) ProtoMessage() {}
  116. func (*TLSAuthorization) Descriptor() ([]byte, []int) {
  117. return fileDescriptor_3708583e03e1c1e3, []int{2}
  118. }
  119. func (m *TLSAuthorization) XXX_Unmarshal(b []byte) error {
  120. return m.Unmarshal(b)
  121. }
  122. func (m *TLSAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  123. if deterministic {
  124. return xxx_messageInfo_TLSAuthorization.Marshal(b, m, deterministic)
  125. } else {
  126. b = b[:cap(b)]
  127. n, err := m.MarshalTo(b)
  128. if err != nil {
  129. return nil, err
  130. }
  131. return b[:n], nil
  132. }
  133. }
  134. func (m *TLSAuthorization) XXX_Merge(src proto.Message) {
  135. xxx_messageInfo_TLSAuthorization.Merge(m, src)
  136. }
  137. func (m *TLSAuthorization) XXX_Size() int {
  138. return m.Size()
  139. }
  140. func (m *TLSAuthorization) XXX_DiscardUnknown() {
  141. xxx_messageInfo_TLSAuthorization.DiscardUnknown(m)
  142. }
  143. var xxx_messageInfo_TLSAuthorization proto.InternalMessageInfo
  144. var E_Deepcopy = &proto.ExtensionDesc{
  145. ExtendedType: (*descriptor.MessageOptions)(nil),
  146. ExtensionType: (*bool)(nil),
  147. Field: 70000,
  148. Name: "docker.protobuf.plugin.deepcopy",
  149. Tag: "varint,70000,opt,name=deepcopy,def=1",
  150. Filename: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto",
  151. }
  152. var E_StoreObject = &proto.ExtensionDesc{
  153. ExtendedType: (*descriptor.MessageOptions)(nil),
  154. ExtensionType: (*StoreObject)(nil),
  155. Field: 70001,
  156. Name: "docker.protobuf.plugin.store_object",
  157. Tag: "bytes,70001,opt,name=store_object",
  158. Filename: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto",
  159. }
  160. var E_TlsAuthorization = &proto.ExtensionDesc{
  161. ExtendedType: (*descriptor.MethodOptions)(nil),
  162. ExtensionType: (*TLSAuthorization)(nil),
  163. Field: 73626345,
  164. Name: "docker.protobuf.plugin.tls_authorization",
  165. Tag: "bytes,73626345,opt,name=tls_authorization",
  166. Filename: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto",
  167. }
  168. func init() {
  169. proto.RegisterType((*WatchSelectors)(nil), "docker.protobuf.plugin.WatchSelectors")
  170. proto.RegisterType((*StoreObject)(nil), "docker.protobuf.plugin.StoreObject")
  171. proto.RegisterType((*TLSAuthorization)(nil), "docker.protobuf.plugin.TLSAuthorization")
  172. proto.RegisterExtension(E_Deepcopy)
  173. proto.RegisterExtension(E_StoreObject)
  174. proto.RegisterExtension(E_TlsAuthorization)
  175. }
  176. func init() {
  177. proto.RegisterFile("github.com/docker/swarmkit/protobuf/plugin/plugin.proto", fileDescriptor_3708583e03e1c1e3)
  178. }
  179. var fileDescriptor_3708583e03e1c1e3 = []byte{
  180. // 588 bytes of a gzipped FileDescriptorProto
  181. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x41, 0x6f, 0xd3, 0x4c,
  182. 0x10, 0x8d, 0xd3, 0x36, 0x4d, 0x26, 0x69, 0xbf, 0x7e, 0x2b, 0x54, 0x59, 0x3d, 0x38, 0x55, 0x83,
  183. 0x50, 0x90, 0x90, 0x23, 0xf5, 0x82, 0x94, 0x1b, 0x25, 0x97, 0x48, 0x40, 0x91, 0x83, 0xc4, 0x8d,
  184. 0xc8, 0xf1, 0x4e, 0x93, 0xa5, 0x8e, 0xd7, 0xda, 0x5d, 0xd3, 0xc2, 0x89, 0x3f, 0x80, 0xc4, 0x95,
  185. 0x2b, 0xbf, 0xa6, 0xc7, 0x1e, 0x7b, 0x8a, 0xa8, 0x23, 0x0e, 0xdc, 0xe0, 0x1f, 0xa0, 0xdd, 0x75,
  186. 0x1a, 0x82, 0x5a, 0x71, 0xf2, 0xcc, 0x9b, 0xf7, 0x66, 0xe6, 0xed, 0x18, 0x1e, 0x8f, 0x99, 0x9a,
  187. 0x64, 0x23, 0x3f, 0xe2, 0xd3, 0x0e, 0xe5, 0xd1, 0x29, 0x8a, 0x8e, 0x3c, 0x0b, 0xc5, 0xf4, 0x94,
  188. 0xa9, 0x4e, 0x2a, 0xb8, 0xe2, 0xa3, 0xec, 0xa4, 0x93, 0xc6, 0xd9, 0x98, 0x25, 0xc5, 0xc7, 0x37,
  189. 0x30, 0xd9, 0xb5, 0x6c, 0x7f, 0x41, 0xf2, 0x6d, 0x75, 0x6f, 0x7f, 0xcc, 0xf9, 0x38, 0xc6, 0xa5,
  190. 0x98, 0xa2, 0x8c, 0x04, 0x4b, 0x15, 0x2f, 0xb8, 0x07, 0x5f, 0xd6, 0x60, 0xfb, 0x75, 0xa8, 0xa2,
  191. 0xc9, 0x00, 0x63, 0x8c, 0x14, 0x17, 0x92, 0xec, 0x42, 0x99, 0x51, 0xd7, 0xd9, 0x77, 0xda, 0xd5,
  192. 0xa3, 0x4a, 0x3e, 0x6b, 0x96, 0xfb, 0xbd, 0xa0, 0xcc, 0x28, 0x79, 0x08, 0x35, 0x46, 0x87, 0xa9,
  193. 0xc0, 0x13, 0x76, 0xee, 0x96, 0x4d, 0xb9, 0x91, 0xcf, 0x9a, 0xd5, 0x7e, 0xef, 0xa5, 0xc1, 0x82,
  194. 0x2a, 0xa3, 0x36, 0x22, 0x04, 0xd6, 0x93, 0x70, 0x8a, 0xee, 0x9a, 0x66, 0x05, 0x26, 0x26, 0x4d,
  195. 0xa8, 0xeb, 0xef, 0xa2, 0xc1, 0xba, 0x29, 0x81, 0x86, 0x0a, 0xd1, 0x2e, 0x54, 0xa2, 0x4c, 0x2a,
  196. 0x3e, 0x75, 0x37, 0x4c, 0xad, 0xc8, 0x48, 0x0b, 0xb6, 0x6c, 0xb4, 0x90, 0x56, 0x4c, 0xb9, 0x61,
  197. 0xc1, 0x42, 0xfc, 0x08, 0x40, 0xa2, 0x78, 0xc7, 0x22, 0x1c, 0x32, 0xea, 0x6e, 0x9a, 0xed, 0xb6,
  198. 0xf2, 0x59, 0xb3, 0x36, 0xb0, 0x68, 0xbf, 0x17, 0xd4, 0x0a, 0x42, 0x9f, 0x92, 0x16, 0x6c, 0x26,
  199. 0x9c, 0x1a, 0x6a, 0xd5, 0x50, 0x21, 0x9f, 0x35, 0x2b, 0x2f, 0x38, 0xd5, 0xbc, 0x8a, 0x2e, 0xf5,
  200. 0xa9, 0x36, 0x21, 0x63, 0xae, 0xdc, 0x9a, 0x35, 0xa1, 0x63, 0xbd, 0x0b, 0x45, 0xc9, 0x04, 0xd2,
  201. 0xa1, 0x54, 0xa1, 0x42, 0x17, 0xec, 0x2e, 0x05, 0x38, 0xd0, 0x98, 0x16, 0x0a, 0x1e, 0xa3, 0x5b,
  202. 0xb7, 0x42, 0x1d, 0x13, 0x0f, 0x60, 0x8a, 0xd3, 0x11, 0x0a, 0x39, 0x61, 0xa9, 0xdb, 0xb0, 0xe6,
  203. 0x97, 0x88, 0xd6, 0x9c, 0xb2, 0x84, 0xba, 0x5b, 0x56, 0xa3, 0xe3, 0x83, 0x37, 0x50, 0x1f, 0x28,
  204. 0x2e, 0xf0, 0x78, 0xf4, 0x16, 0x23, 0x45, 0x8e, 0xe1, 0xbf, 0x33, 0x7d, 0xa9, 0xa1, 0x5c, 0x9c,
  205. 0xca, 0x75, 0xf6, 0xcb, 0xed, 0xfa, 0xe1, 0x03, 0xff, 0xf6, 0xf3, 0xfb, 0xab, 0x87, 0x0d, 0xb6,
  206. 0xcf, 0x56, 0xf2, 0x83, 0x1e, 0xec, 0xbc, 0x7a, 0x36, 0x78, 0x92, 0xa9, 0x09, 0x17, 0xec, 0x43,
  207. 0xa8, 0x18, 0x4f, 0xc8, 0x3d, 0xd8, 0xd0, 0xfb, 0xea, 0xd6, 0x6b, 0xed, 0x5a, 0x60, 0x13, 0xb2,
  208. 0x07, 0x55, 0x96, 0x48, 0x8c, 0x32, 0x81, 0xf6, 0xf2, 0xc1, 0x4d, 0xde, 0x7d, 0x0a, 0x55, 0x8a,
  209. 0x98, 0x46, 0x3c, 0x7d, 0x4f, 0x9a, 0xbe, 0xfd, 0xe1, 0x96, 0x9b, 0x3c, 0x47, 0x29, 0xc3, 0x31,
  210. 0x1e, 0xa7, 0xba, 0xbb, 0x74, 0x7f, 0x7e, 0x35, 0x77, 0xef, 0xae, 0x2b, 0x91, 0x61, 0x70, 0x23,
  211. 0xec, 0x32, 0x68, 0x48, 0x6d, 0x75, 0xc8, 0xad, 0xd7, 0x7f, 0x36, 0xfa, 0x65, 0x1a, 0xd5, 0x0f,
  212. 0x5b, 0x77, 0x79, 0xff, 0xe3, 0xe5, 0x82, 0xba, 0x5c, 0x26, 0xdd, 0x73, 0xf8, 0x5f, 0xc5, 0x72,
  213. 0x18, 0xae, 0xd8, 0xf6, 0x6e, 0x99, 0xa7, 0x26, 0x9c, 0x2e, 0xc6, 0xfd, 0xf8, 0xfe, 0xa9, 0x65,
  214. 0xe6, 0xb5, 0xef, 0x9a, 0xf7, 0xf7, 0x4b, 0x06, 0x3b, 0x2a, 0x96, 0x2b, 0xc8, 0xd1, 0xfd, 0x8b,
  215. 0x6b, 0xaf, 0x74, 0x75, 0xed, 0x95, 0x3e, 0xe6, 0x9e, 0x73, 0x91, 0x7b, 0xce, 0x65, 0xee, 0x39,
  216. 0xdf, 0x72, 0xcf, 0xf9, 0x3c, 0xf7, 0x4a, 0x97, 0x73, 0xaf, 0x74, 0x35, 0xf7, 0x4a, 0xbf, 0x03,
  217. 0x00, 0x00, 0xff, 0xff, 0x0f, 0x50, 0xb9, 0xa3, 0x05, 0x04, 0x00, 0x00,
  218. }
  219. func (m *WatchSelectors) Copy() *WatchSelectors {
  220. if m == nil {
  221. return nil
  222. }
  223. o := &WatchSelectors{}
  224. o.CopyFrom(m)
  225. return o
  226. }
  227. func (m *WatchSelectors) CopyFrom(src interface{}) {
  228. o := src.(*WatchSelectors)
  229. *m = *o
  230. }
  231. func (m *StoreObject) Copy() *StoreObject {
  232. if m == nil {
  233. return nil
  234. }
  235. o := &StoreObject{}
  236. o.CopyFrom(m)
  237. return o
  238. }
  239. func (m *StoreObject) CopyFrom(src interface{}) {
  240. o := src.(*StoreObject)
  241. *m = *o
  242. if o.WatchSelectors != nil {
  243. m.WatchSelectors = &WatchSelectors{}
  244. github_com_docker_swarmkit_api_deepcopy.Copy(m.WatchSelectors, o.WatchSelectors)
  245. }
  246. }
  247. func (m *TLSAuthorization) Copy() *TLSAuthorization {
  248. if m == nil {
  249. return nil
  250. }
  251. o := &TLSAuthorization{}
  252. o.CopyFrom(m)
  253. return o
  254. }
  255. func (m *TLSAuthorization) CopyFrom(src interface{}) {
  256. o := src.(*TLSAuthorization)
  257. *m = *o
  258. if o.Roles != nil {
  259. m.Roles = make([]string, len(o.Roles))
  260. copy(m.Roles, o.Roles)
  261. }
  262. }
  263. func (m *WatchSelectors) Marshal() (dAtA []byte, err error) {
  264. size := m.Size()
  265. dAtA = make([]byte, size)
  266. n, err := m.MarshalTo(dAtA)
  267. if err != nil {
  268. return nil, err
  269. }
  270. return dAtA[:n], nil
  271. }
  272. func (m *WatchSelectors) MarshalTo(dAtA []byte) (int, error) {
  273. var i int
  274. _ = i
  275. var l int
  276. _ = l
  277. if m.ID != nil {
  278. dAtA[i] = 0x8
  279. i++
  280. if *m.ID {
  281. dAtA[i] = 1
  282. } else {
  283. dAtA[i] = 0
  284. }
  285. i++
  286. }
  287. if m.IDPrefix != nil {
  288. dAtA[i] = 0x10
  289. i++
  290. if *m.IDPrefix {
  291. dAtA[i] = 1
  292. } else {
  293. dAtA[i] = 0
  294. }
  295. i++
  296. }
  297. if m.Name != nil {
  298. dAtA[i] = 0x18
  299. i++
  300. if *m.Name {
  301. dAtA[i] = 1
  302. } else {
  303. dAtA[i] = 0
  304. }
  305. i++
  306. }
  307. if m.NamePrefix != nil {
  308. dAtA[i] = 0x20
  309. i++
  310. if *m.NamePrefix {
  311. dAtA[i] = 1
  312. } else {
  313. dAtA[i] = 0
  314. }
  315. i++
  316. }
  317. if m.Custom != nil {
  318. dAtA[i] = 0x28
  319. i++
  320. if *m.Custom {
  321. dAtA[i] = 1
  322. } else {
  323. dAtA[i] = 0
  324. }
  325. i++
  326. }
  327. if m.CustomPrefix != nil {
  328. dAtA[i] = 0x30
  329. i++
  330. if *m.CustomPrefix {
  331. dAtA[i] = 1
  332. } else {
  333. dAtA[i] = 0
  334. }
  335. i++
  336. }
  337. if m.ServiceID != nil {
  338. dAtA[i] = 0x38
  339. i++
  340. if *m.ServiceID {
  341. dAtA[i] = 1
  342. } else {
  343. dAtA[i] = 0
  344. }
  345. i++
  346. }
  347. if m.NodeID != nil {
  348. dAtA[i] = 0x40
  349. i++
  350. if *m.NodeID {
  351. dAtA[i] = 1
  352. } else {
  353. dAtA[i] = 0
  354. }
  355. i++
  356. }
  357. if m.Slot != nil {
  358. dAtA[i] = 0x48
  359. i++
  360. if *m.Slot {
  361. dAtA[i] = 1
  362. } else {
  363. dAtA[i] = 0
  364. }
  365. i++
  366. }
  367. if m.DesiredState != nil {
  368. dAtA[i] = 0x50
  369. i++
  370. if *m.DesiredState {
  371. dAtA[i] = 1
  372. } else {
  373. dAtA[i] = 0
  374. }
  375. i++
  376. }
  377. if m.Role != nil {
  378. dAtA[i] = 0x58
  379. i++
  380. if *m.Role {
  381. dAtA[i] = 1
  382. } else {
  383. dAtA[i] = 0
  384. }
  385. i++
  386. }
  387. if m.Membership != nil {
  388. dAtA[i] = 0x60
  389. i++
  390. if *m.Membership {
  391. dAtA[i] = 1
  392. } else {
  393. dAtA[i] = 0
  394. }
  395. i++
  396. }
  397. if m.Kind != nil {
  398. dAtA[i] = 0x68
  399. i++
  400. if *m.Kind {
  401. dAtA[i] = 1
  402. } else {
  403. dAtA[i] = 0
  404. }
  405. i++
  406. }
  407. return i, nil
  408. }
  409. func (m *StoreObject) Marshal() (dAtA []byte, err error) {
  410. size := m.Size()
  411. dAtA = make([]byte, size)
  412. n, err := m.MarshalTo(dAtA)
  413. if err != nil {
  414. return nil, err
  415. }
  416. return dAtA[:n], nil
  417. }
  418. func (m *StoreObject) MarshalTo(dAtA []byte) (int, error) {
  419. var i int
  420. _ = i
  421. var l int
  422. _ = l
  423. if m.WatchSelectors == nil {
  424. return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("watch_selectors")
  425. } else {
  426. dAtA[i] = 0xa
  427. i++
  428. i = encodeVarintPlugin(dAtA, i, uint64(m.WatchSelectors.Size()))
  429. n1, err := m.WatchSelectors.MarshalTo(dAtA[i:])
  430. if err != nil {
  431. return 0, err
  432. }
  433. i += n1
  434. }
  435. return i, nil
  436. }
  437. func (m *TLSAuthorization) Marshal() (dAtA []byte, err error) {
  438. size := m.Size()
  439. dAtA = make([]byte, size)
  440. n, err := m.MarshalTo(dAtA)
  441. if err != nil {
  442. return nil, err
  443. }
  444. return dAtA[:n], nil
  445. }
  446. func (m *TLSAuthorization) MarshalTo(dAtA []byte) (int, error) {
  447. var i int
  448. _ = i
  449. var l int
  450. _ = l
  451. if len(m.Roles) > 0 {
  452. for _, s := range m.Roles {
  453. dAtA[i] = 0xa
  454. i++
  455. l = len(s)
  456. for l >= 1<<7 {
  457. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  458. l >>= 7
  459. i++
  460. }
  461. dAtA[i] = uint8(l)
  462. i++
  463. i += copy(dAtA[i:], s)
  464. }
  465. }
  466. if m.Insecure != nil {
  467. dAtA[i] = 0x10
  468. i++
  469. if *m.Insecure {
  470. dAtA[i] = 1
  471. } else {
  472. dAtA[i] = 0
  473. }
  474. i++
  475. }
  476. return i, nil
  477. }
  478. func encodeVarintPlugin(dAtA []byte, offset int, v uint64) int {
  479. for v >= 1<<7 {
  480. dAtA[offset] = uint8(v&0x7f | 0x80)
  481. v >>= 7
  482. offset++
  483. }
  484. dAtA[offset] = uint8(v)
  485. return offset + 1
  486. }
  487. func (m *WatchSelectors) Size() (n int) {
  488. if m == nil {
  489. return 0
  490. }
  491. var l int
  492. _ = l
  493. if m.ID != nil {
  494. n += 2
  495. }
  496. if m.IDPrefix != nil {
  497. n += 2
  498. }
  499. if m.Name != nil {
  500. n += 2
  501. }
  502. if m.NamePrefix != nil {
  503. n += 2
  504. }
  505. if m.Custom != nil {
  506. n += 2
  507. }
  508. if m.CustomPrefix != nil {
  509. n += 2
  510. }
  511. if m.ServiceID != nil {
  512. n += 2
  513. }
  514. if m.NodeID != nil {
  515. n += 2
  516. }
  517. if m.Slot != nil {
  518. n += 2
  519. }
  520. if m.DesiredState != nil {
  521. n += 2
  522. }
  523. if m.Role != nil {
  524. n += 2
  525. }
  526. if m.Membership != nil {
  527. n += 2
  528. }
  529. if m.Kind != nil {
  530. n += 2
  531. }
  532. return n
  533. }
  534. func (m *StoreObject) Size() (n int) {
  535. if m == nil {
  536. return 0
  537. }
  538. var l int
  539. _ = l
  540. if m.WatchSelectors != nil {
  541. l = m.WatchSelectors.Size()
  542. n += 1 + l + sovPlugin(uint64(l))
  543. }
  544. return n
  545. }
  546. func (m *TLSAuthorization) Size() (n int) {
  547. if m == nil {
  548. return 0
  549. }
  550. var l int
  551. _ = l
  552. if len(m.Roles) > 0 {
  553. for _, s := range m.Roles {
  554. l = len(s)
  555. n += 1 + l + sovPlugin(uint64(l))
  556. }
  557. }
  558. if m.Insecure != nil {
  559. n += 2
  560. }
  561. return n
  562. }
  563. func sovPlugin(x uint64) (n int) {
  564. for {
  565. n++
  566. x >>= 7
  567. if x == 0 {
  568. break
  569. }
  570. }
  571. return n
  572. }
  573. func sozPlugin(x uint64) (n int) {
  574. return sovPlugin(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  575. }
  576. func (this *WatchSelectors) String() string {
  577. if this == nil {
  578. return "nil"
  579. }
  580. s := strings.Join([]string{`&WatchSelectors{`,
  581. `ID:` + valueToStringPlugin(this.ID) + `,`,
  582. `IDPrefix:` + valueToStringPlugin(this.IDPrefix) + `,`,
  583. `Name:` + valueToStringPlugin(this.Name) + `,`,
  584. `NamePrefix:` + valueToStringPlugin(this.NamePrefix) + `,`,
  585. `Custom:` + valueToStringPlugin(this.Custom) + `,`,
  586. `CustomPrefix:` + valueToStringPlugin(this.CustomPrefix) + `,`,
  587. `ServiceID:` + valueToStringPlugin(this.ServiceID) + `,`,
  588. `NodeID:` + valueToStringPlugin(this.NodeID) + `,`,
  589. `Slot:` + valueToStringPlugin(this.Slot) + `,`,
  590. `DesiredState:` + valueToStringPlugin(this.DesiredState) + `,`,
  591. `Role:` + valueToStringPlugin(this.Role) + `,`,
  592. `Membership:` + valueToStringPlugin(this.Membership) + `,`,
  593. `Kind:` + valueToStringPlugin(this.Kind) + `,`,
  594. `}`,
  595. }, "")
  596. return s
  597. }
  598. func (this *StoreObject) String() string {
  599. if this == nil {
  600. return "nil"
  601. }
  602. s := strings.Join([]string{`&StoreObject{`,
  603. `WatchSelectors:` + strings.Replace(fmt.Sprintf("%v", this.WatchSelectors), "WatchSelectors", "WatchSelectors", 1) + `,`,
  604. `}`,
  605. }, "")
  606. return s
  607. }
  608. func (this *TLSAuthorization) String() string {
  609. if this == nil {
  610. return "nil"
  611. }
  612. s := strings.Join([]string{`&TLSAuthorization{`,
  613. `Roles:` + fmt.Sprintf("%v", this.Roles) + `,`,
  614. `Insecure:` + valueToStringPlugin(this.Insecure) + `,`,
  615. `}`,
  616. }, "")
  617. return s
  618. }
  619. func valueToStringPlugin(v interface{}) string {
  620. rv := reflect.ValueOf(v)
  621. if rv.IsNil() {
  622. return "nil"
  623. }
  624. pv := reflect.Indirect(rv).Interface()
  625. return fmt.Sprintf("*%v", pv)
  626. }
  627. func (m *WatchSelectors) Unmarshal(dAtA []byte) error {
  628. l := len(dAtA)
  629. iNdEx := 0
  630. for iNdEx < l {
  631. preIndex := iNdEx
  632. var wire uint64
  633. for shift := uint(0); ; shift += 7 {
  634. if shift >= 64 {
  635. return ErrIntOverflowPlugin
  636. }
  637. if iNdEx >= l {
  638. return io.ErrUnexpectedEOF
  639. }
  640. b := dAtA[iNdEx]
  641. iNdEx++
  642. wire |= uint64(b&0x7F) << shift
  643. if b < 0x80 {
  644. break
  645. }
  646. }
  647. fieldNum := int32(wire >> 3)
  648. wireType := int(wire & 0x7)
  649. if wireType == 4 {
  650. return fmt.Errorf("proto: WatchSelectors: wiretype end group for non-group")
  651. }
  652. if fieldNum <= 0 {
  653. return fmt.Errorf("proto: WatchSelectors: illegal tag %d (wire type %d)", fieldNum, wire)
  654. }
  655. switch fieldNum {
  656. case 1:
  657. if wireType != 0 {
  658. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  659. }
  660. var v int
  661. for shift := uint(0); ; shift += 7 {
  662. if shift >= 64 {
  663. return ErrIntOverflowPlugin
  664. }
  665. if iNdEx >= l {
  666. return io.ErrUnexpectedEOF
  667. }
  668. b := dAtA[iNdEx]
  669. iNdEx++
  670. v |= int(b&0x7F) << shift
  671. if b < 0x80 {
  672. break
  673. }
  674. }
  675. b := bool(v != 0)
  676. m.ID = &b
  677. case 2:
  678. if wireType != 0 {
  679. return fmt.Errorf("proto: wrong wireType = %d for field IDPrefix", wireType)
  680. }
  681. var v int
  682. for shift := uint(0); ; shift += 7 {
  683. if shift >= 64 {
  684. return ErrIntOverflowPlugin
  685. }
  686. if iNdEx >= l {
  687. return io.ErrUnexpectedEOF
  688. }
  689. b := dAtA[iNdEx]
  690. iNdEx++
  691. v |= int(b&0x7F) << shift
  692. if b < 0x80 {
  693. break
  694. }
  695. }
  696. b := bool(v != 0)
  697. m.IDPrefix = &b
  698. case 3:
  699. if wireType != 0 {
  700. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  701. }
  702. var v int
  703. for shift := uint(0); ; shift += 7 {
  704. if shift >= 64 {
  705. return ErrIntOverflowPlugin
  706. }
  707. if iNdEx >= l {
  708. return io.ErrUnexpectedEOF
  709. }
  710. b := dAtA[iNdEx]
  711. iNdEx++
  712. v |= int(b&0x7F) << shift
  713. if b < 0x80 {
  714. break
  715. }
  716. }
  717. b := bool(v != 0)
  718. m.Name = &b
  719. case 4:
  720. if wireType != 0 {
  721. return fmt.Errorf("proto: wrong wireType = %d for field NamePrefix", wireType)
  722. }
  723. var v int
  724. for shift := uint(0); ; shift += 7 {
  725. if shift >= 64 {
  726. return ErrIntOverflowPlugin
  727. }
  728. if iNdEx >= l {
  729. return io.ErrUnexpectedEOF
  730. }
  731. b := dAtA[iNdEx]
  732. iNdEx++
  733. v |= int(b&0x7F) << shift
  734. if b < 0x80 {
  735. break
  736. }
  737. }
  738. b := bool(v != 0)
  739. m.NamePrefix = &b
  740. case 5:
  741. if wireType != 0 {
  742. return fmt.Errorf("proto: wrong wireType = %d for field Custom", wireType)
  743. }
  744. var v int
  745. for shift := uint(0); ; shift += 7 {
  746. if shift >= 64 {
  747. return ErrIntOverflowPlugin
  748. }
  749. if iNdEx >= l {
  750. return io.ErrUnexpectedEOF
  751. }
  752. b := dAtA[iNdEx]
  753. iNdEx++
  754. v |= int(b&0x7F) << shift
  755. if b < 0x80 {
  756. break
  757. }
  758. }
  759. b := bool(v != 0)
  760. m.Custom = &b
  761. case 6:
  762. if wireType != 0 {
  763. return fmt.Errorf("proto: wrong wireType = %d for field CustomPrefix", wireType)
  764. }
  765. var v int
  766. for shift := uint(0); ; shift += 7 {
  767. if shift >= 64 {
  768. return ErrIntOverflowPlugin
  769. }
  770. if iNdEx >= l {
  771. return io.ErrUnexpectedEOF
  772. }
  773. b := dAtA[iNdEx]
  774. iNdEx++
  775. v |= int(b&0x7F) << shift
  776. if b < 0x80 {
  777. break
  778. }
  779. }
  780. b := bool(v != 0)
  781. m.CustomPrefix = &b
  782. case 7:
  783. if wireType != 0 {
  784. return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType)
  785. }
  786. var v int
  787. for shift := uint(0); ; shift += 7 {
  788. if shift >= 64 {
  789. return ErrIntOverflowPlugin
  790. }
  791. if iNdEx >= l {
  792. return io.ErrUnexpectedEOF
  793. }
  794. b := dAtA[iNdEx]
  795. iNdEx++
  796. v |= int(b&0x7F) << shift
  797. if b < 0x80 {
  798. break
  799. }
  800. }
  801. b := bool(v != 0)
  802. m.ServiceID = &b
  803. case 8:
  804. if wireType != 0 {
  805. return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
  806. }
  807. var v int
  808. for shift := uint(0); ; shift += 7 {
  809. if shift >= 64 {
  810. return ErrIntOverflowPlugin
  811. }
  812. if iNdEx >= l {
  813. return io.ErrUnexpectedEOF
  814. }
  815. b := dAtA[iNdEx]
  816. iNdEx++
  817. v |= int(b&0x7F) << shift
  818. if b < 0x80 {
  819. break
  820. }
  821. }
  822. b := bool(v != 0)
  823. m.NodeID = &b
  824. case 9:
  825. if wireType != 0 {
  826. return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType)
  827. }
  828. var v int
  829. for shift := uint(0); ; shift += 7 {
  830. if shift >= 64 {
  831. return ErrIntOverflowPlugin
  832. }
  833. if iNdEx >= l {
  834. return io.ErrUnexpectedEOF
  835. }
  836. b := dAtA[iNdEx]
  837. iNdEx++
  838. v |= int(b&0x7F) << shift
  839. if b < 0x80 {
  840. break
  841. }
  842. }
  843. b := bool(v != 0)
  844. m.Slot = &b
  845. case 10:
  846. if wireType != 0 {
  847. return fmt.Errorf("proto: wrong wireType = %d for field DesiredState", wireType)
  848. }
  849. var v int
  850. for shift := uint(0); ; shift += 7 {
  851. if shift >= 64 {
  852. return ErrIntOverflowPlugin
  853. }
  854. if iNdEx >= l {
  855. return io.ErrUnexpectedEOF
  856. }
  857. b := dAtA[iNdEx]
  858. iNdEx++
  859. v |= int(b&0x7F) << shift
  860. if b < 0x80 {
  861. break
  862. }
  863. }
  864. b := bool(v != 0)
  865. m.DesiredState = &b
  866. case 11:
  867. if wireType != 0 {
  868. return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
  869. }
  870. var v int
  871. for shift := uint(0); ; shift += 7 {
  872. if shift >= 64 {
  873. return ErrIntOverflowPlugin
  874. }
  875. if iNdEx >= l {
  876. return io.ErrUnexpectedEOF
  877. }
  878. b := dAtA[iNdEx]
  879. iNdEx++
  880. v |= int(b&0x7F) << shift
  881. if b < 0x80 {
  882. break
  883. }
  884. }
  885. b := bool(v != 0)
  886. m.Role = &b
  887. case 12:
  888. if wireType != 0 {
  889. return fmt.Errorf("proto: wrong wireType = %d for field Membership", wireType)
  890. }
  891. var v int
  892. for shift := uint(0); ; shift += 7 {
  893. if shift >= 64 {
  894. return ErrIntOverflowPlugin
  895. }
  896. if iNdEx >= l {
  897. return io.ErrUnexpectedEOF
  898. }
  899. b := dAtA[iNdEx]
  900. iNdEx++
  901. v |= int(b&0x7F) << shift
  902. if b < 0x80 {
  903. break
  904. }
  905. }
  906. b := bool(v != 0)
  907. m.Membership = &b
  908. case 13:
  909. if wireType != 0 {
  910. return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
  911. }
  912. var v int
  913. for shift := uint(0); ; shift += 7 {
  914. if shift >= 64 {
  915. return ErrIntOverflowPlugin
  916. }
  917. if iNdEx >= l {
  918. return io.ErrUnexpectedEOF
  919. }
  920. b := dAtA[iNdEx]
  921. iNdEx++
  922. v |= int(b&0x7F) << shift
  923. if b < 0x80 {
  924. break
  925. }
  926. }
  927. b := bool(v != 0)
  928. m.Kind = &b
  929. default:
  930. iNdEx = preIndex
  931. skippy, err := skipPlugin(dAtA[iNdEx:])
  932. if err != nil {
  933. return err
  934. }
  935. if skippy < 0 {
  936. return ErrInvalidLengthPlugin
  937. }
  938. if (iNdEx + skippy) < 0 {
  939. return ErrInvalidLengthPlugin
  940. }
  941. if (iNdEx + skippy) > l {
  942. return io.ErrUnexpectedEOF
  943. }
  944. iNdEx += skippy
  945. }
  946. }
  947. if iNdEx > l {
  948. return io.ErrUnexpectedEOF
  949. }
  950. return nil
  951. }
  952. func (m *StoreObject) Unmarshal(dAtA []byte) error {
  953. var hasFields [1]uint64
  954. l := len(dAtA)
  955. iNdEx := 0
  956. for iNdEx < l {
  957. preIndex := iNdEx
  958. var wire uint64
  959. for shift := uint(0); ; shift += 7 {
  960. if shift >= 64 {
  961. return ErrIntOverflowPlugin
  962. }
  963. if iNdEx >= l {
  964. return io.ErrUnexpectedEOF
  965. }
  966. b := dAtA[iNdEx]
  967. iNdEx++
  968. wire |= uint64(b&0x7F) << shift
  969. if b < 0x80 {
  970. break
  971. }
  972. }
  973. fieldNum := int32(wire >> 3)
  974. wireType := int(wire & 0x7)
  975. if wireType == 4 {
  976. return fmt.Errorf("proto: StoreObject: wiretype end group for non-group")
  977. }
  978. if fieldNum <= 0 {
  979. return fmt.Errorf("proto: StoreObject: illegal tag %d (wire type %d)", fieldNum, wire)
  980. }
  981. switch fieldNum {
  982. case 1:
  983. if wireType != 2 {
  984. return fmt.Errorf("proto: wrong wireType = %d for field WatchSelectors", wireType)
  985. }
  986. var msglen int
  987. for shift := uint(0); ; shift += 7 {
  988. if shift >= 64 {
  989. return ErrIntOverflowPlugin
  990. }
  991. if iNdEx >= l {
  992. return io.ErrUnexpectedEOF
  993. }
  994. b := dAtA[iNdEx]
  995. iNdEx++
  996. msglen |= int(b&0x7F) << shift
  997. if b < 0x80 {
  998. break
  999. }
  1000. }
  1001. if msglen < 0 {
  1002. return ErrInvalidLengthPlugin
  1003. }
  1004. postIndex := iNdEx + msglen
  1005. if postIndex < 0 {
  1006. return ErrInvalidLengthPlugin
  1007. }
  1008. if postIndex > l {
  1009. return io.ErrUnexpectedEOF
  1010. }
  1011. if m.WatchSelectors == nil {
  1012. m.WatchSelectors = &WatchSelectors{}
  1013. }
  1014. if err := m.WatchSelectors.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1015. return err
  1016. }
  1017. iNdEx = postIndex
  1018. hasFields[0] |= uint64(0x00000001)
  1019. default:
  1020. iNdEx = preIndex
  1021. skippy, err := skipPlugin(dAtA[iNdEx:])
  1022. if err != nil {
  1023. return err
  1024. }
  1025. if skippy < 0 {
  1026. return ErrInvalidLengthPlugin
  1027. }
  1028. if (iNdEx + skippy) < 0 {
  1029. return ErrInvalidLengthPlugin
  1030. }
  1031. if (iNdEx + skippy) > l {
  1032. return io.ErrUnexpectedEOF
  1033. }
  1034. iNdEx += skippy
  1035. }
  1036. }
  1037. if hasFields[0]&uint64(0x00000001) == 0 {
  1038. return github_com_gogo_protobuf_proto.NewRequiredNotSetError("watch_selectors")
  1039. }
  1040. if iNdEx > l {
  1041. return io.ErrUnexpectedEOF
  1042. }
  1043. return nil
  1044. }
  1045. func (m *TLSAuthorization) Unmarshal(dAtA []byte) error {
  1046. l := len(dAtA)
  1047. iNdEx := 0
  1048. for iNdEx < l {
  1049. preIndex := iNdEx
  1050. var wire uint64
  1051. for shift := uint(0); ; shift += 7 {
  1052. if shift >= 64 {
  1053. return ErrIntOverflowPlugin
  1054. }
  1055. if iNdEx >= l {
  1056. return io.ErrUnexpectedEOF
  1057. }
  1058. b := dAtA[iNdEx]
  1059. iNdEx++
  1060. wire |= uint64(b&0x7F) << shift
  1061. if b < 0x80 {
  1062. break
  1063. }
  1064. }
  1065. fieldNum := int32(wire >> 3)
  1066. wireType := int(wire & 0x7)
  1067. if wireType == 4 {
  1068. return fmt.Errorf("proto: TLSAuthorization: wiretype end group for non-group")
  1069. }
  1070. if fieldNum <= 0 {
  1071. return fmt.Errorf("proto: TLSAuthorization: illegal tag %d (wire type %d)", fieldNum, wire)
  1072. }
  1073. switch fieldNum {
  1074. case 1:
  1075. if wireType != 2 {
  1076. return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType)
  1077. }
  1078. var stringLen uint64
  1079. for shift := uint(0); ; shift += 7 {
  1080. if shift >= 64 {
  1081. return ErrIntOverflowPlugin
  1082. }
  1083. if iNdEx >= l {
  1084. return io.ErrUnexpectedEOF
  1085. }
  1086. b := dAtA[iNdEx]
  1087. iNdEx++
  1088. stringLen |= uint64(b&0x7F) << shift
  1089. if b < 0x80 {
  1090. break
  1091. }
  1092. }
  1093. intStringLen := int(stringLen)
  1094. if intStringLen < 0 {
  1095. return ErrInvalidLengthPlugin
  1096. }
  1097. postIndex := iNdEx + intStringLen
  1098. if postIndex < 0 {
  1099. return ErrInvalidLengthPlugin
  1100. }
  1101. if postIndex > l {
  1102. return io.ErrUnexpectedEOF
  1103. }
  1104. m.Roles = append(m.Roles, string(dAtA[iNdEx:postIndex]))
  1105. iNdEx = postIndex
  1106. case 2:
  1107. if wireType != 0 {
  1108. return fmt.Errorf("proto: wrong wireType = %d for field Insecure", wireType)
  1109. }
  1110. var v int
  1111. for shift := uint(0); ; shift += 7 {
  1112. if shift >= 64 {
  1113. return ErrIntOverflowPlugin
  1114. }
  1115. if iNdEx >= l {
  1116. return io.ErrUnexpectedEOF
  1117. }
  1118. b := dAtA[iNdEx]
  1119. iNdEx++
  1120. v |= int(b&0x7F) << shift
  1121. if b < 0x80 {
  1122. break
  1123. }
  1124. }
  1125. b := bool(v != 0)
  1126. m.Insecure = &b
  1127. default:
  1128. iNdEx = preIndex
  1129. skippy, err := skipPlugin(dAtA[iNdEx:])
  1130. if err != nil {
  1131. return err
  1132. }
  1133. if skippy < 0 {
  1134. return ErrInvalidLengthPlugin
  1135. }
  1136. if (iNdEx + skippy) < 0 {
  1137. return ErrInvalidLengthPlugin
  1138. }
  1139. if (iNdEx + skippy) > l {
  1140. return io.ErrUnexpectedEOF
  1141. }
  1142. iNdEx += skippy
  1143. }
  1144. }
  1145. if iNdEx > l {
  1146. return io.ErrUnexpectedEOF
  1147. }
  1148. return nil
  1149. }
  1150. func skipPlugin(dAtA []byte) (n int, err error) {
  1151. l := len(dAtA)
  1152. iNdEx := 0
  1153. for iNdEx < l {
  1154. var wire uint64
  1155. for shift := uint(0); ; shift += 7 {
  1156. if shift >= 64 {
  1157. return 0, ErrIntOverflowPlugin
  1158. }
  1159. if iNdEx >= l {
  1160. return 0, io.ErrUnexpectedEOF
  1161. }
  1162. b := dAtA[iNdEx]
  1163. iNdEx++
  1164. wire |= (uint64(b) & 0x7F) << shift
  1165. if b < 0x80 {
  1166. break
  1167. }
  1168. }
  1169. wireType := int(wire & 0x7)
  1170. switch wireType {
  1171. case 0:
  1172. for shift := uint(0); ; shift += 7 {
  1173. if shift >= 64 {
  1174. return 0, ErrIntOverflowPlugin
  1175. }
  1176. if iNdEx >= l {
  1177. return 0, io.ErrUnexpectedEOF
  1178. }
  1179. iNdEx++
  1180. if dAtA[iNdEx-1] < 0x80 {
  1181. break
  1182. }
  1183. }
  1184. return iNdEx, nil
  1185. case 1:
  1186. iNdEx += 8
  1187. return iNdEx, nil
  1188. case 2:
  1189. var length int
  1190. for shift := uint(0); ; shift += 7 {
  1191. if shift >= 64 {
  1192. return 0, ErrIntOverflowPlugin
  1193. }
  1194. if iNdEx >= l {
  1195. return 0, io.ErrUnexpectedEOF
  1196. }
  1197. b := dAtA[iNdEx]
  1198. iNdEx++
  1199. length |= (int(b) & 0x7F) << shift
  1200. if b < 0x80 {
  1201. break
  1202. }
  1203. }
  1204. if length < 0 {
  1205. return 0, ErrInvalidLengthPlugin
  1206. }
  1207. iNdEx += length
  1208. if iNdEx < 0 {
  1209. return 0, ErrInvalidLengthPlugin
  1210. }
  1211. return iNdEx, nil
  1212. case 3:
  1213. for {
  1214. var innerWire uint64
  1215. var start int = iNdEx
  1216. for shift := uint(0); ; shift += 7 {
  1217. if shift >= 64 {
  1218. return 0, ErrIntOverflowPlugin
  1219. }
  1220. if iNdEx >= l {
  1221. return 0, io.ErrUnexpectedEOF
  1222. }
  1223. b := dAtA[iNdEx]
  1224. iNdEx++
  1225. innerWire |= (uint64(b) & 0x7F) << shift
  1226. if b < 0x80 {
  1227. break
  1228. }
  1229. }
  1230. innerWireType := int(innerWire & 0x7)
  1231. if innerWireType == 4 {
  1232. break
  1233. }
  1234. next, err := skipPlugin(dAtA[start:])
  1235. if err != nil {
  1236. return 0, err
  1237. }
  1238. iNdEx = start + next
  1239. if iNdEx < 0 {
  1240. return 0, ErrInvalidLengthPlugin
  1241. }
  1242. }
  1243. return iNdEx, nil
  1244. case 4:
  1245. return iNdEx, nil
  1246. case 5:
  1247. iNdEx += 4
  1248. return iNdEx, nil
  1249. default:
  1250. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1251. }
  1252. }
  1253. panic("unreachable")
  1254. }
  1255. var (
  1256. ErrInvalidLengthPlugin = fmt.Errorf("proto: negative length found during unmarshaling")
  1257. ErrIntOverflowPlugin = fmt.Errorf("proto: integer overflow")
  1258. )