config.pb.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: lib/config/config.proto
  3. package config
  4. import (
  5. fmt "fmt"
  6. proto "github.com/gogo/protobuf/proto"
  7. _ "github.com/syncthing/syncthing/proto/ext"
  8. io "io"
  9. math "math"
  10. math_bits "math/bits"
  11. )
  12. // Reference imports to suppress errors if they are not otherwise used.
  13. var _ = proto.Marshal
  14. var _ = fmt.Errorf
  15. var _ = math.Inf
  16. // This is a compile-time assertion to ensure that this generated file
  17. // is compatible with the proto package it is being compiled against.
  18. // A compilation error at this line likely means your copy of the
  19. // proto package needs to be updated.
  20. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  21. type Configuration struct {
  22. Version int `protobuf:"varint,1,opt,name=version,proto3,casttype=int" json:"version" xml:"version,attr"`
  23. Folders []FolderConfiguration `protobuf:"bytes,2,rep,name=folders,proto3" json:"folders" xml:"folder"`
  24. Devices []DeviceConfiguration `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices" xml:"device"`
  25. GUI GUIConfiguration `protobuf:"bytes,4,opt,name=gui,proto3" json:"gui" xml:"gui"`
  26. LDAP LDAPConfiguration `protobuf:"bytes,5,opt,name=ldap,proto3" json:"ldap" xml:"ldap"`
  27. Options OptionsConfiguration `protobuf:"bytes,6,opt,name=options,proto3" json:"options" xml:"options"`
  28. IgnoredDevices []ObservedDevice `protobuf:"bytes,7,rep,name=ignored_devices,json=ignoredDevices,proto3" json:"remoteIgnoredDevices" xml:"remoteIgnoredDevice"`
  29. PendingDevices []ObservedDevice `protobuf:"bytes,8,rep,name=pending_devices,json=pendingDevices,proto3" json:"pendingDevices" xml:"pendingDevice"`
  30. }
  31. func (m *Configuration) Reset() { *m = Configuration{} }
  32. func (m *Configuration) String() string { return proto.CompactTextString(m) }
  33. func (*Configuration) ProtoMessage() {}
  34. func (*Configuration) Descriptor() ([]byte, []int) {
  35. return fileDescriptor_baadf209193dc627, []int{0}
  36. }
  37. func (m *Configuration) XXX_Unmarshal(b []byte) error {
  38. return m.Unmarshal(b)
  39. }
  40. func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  41. if deterministic {
  42. return xxx_messageInfo_Configuration.Marshal(b, m, deterministic)
  43. } else {
  44. b = b[:cap(b)]
  45. n, err := m.MarshalToSizedBuffer(b)
  46. if err != nil {
  47. return nil, err
  48. }
  49. return b[:n], nil
  50. }
  51. }
  52. func (m *Configuration) XXX_Merge(src proto.Message) {
  53. xxx_messageInfo_Configuration.Merge(m, src)
  54. }
  55. func (m *Configuration) XXX_Size() int {
  56. return m.ProtoSize()
  57. }
  58. func (m *Configuration) XXX_DiscardUnknown() {
  59. xxx_messageInfo_Configuration.DiscardUnknown(m)
  60. }
  61. var xxx_messageInfo_Configuration proto.InternalMessageInfo
  62. func init() {
  63. proto.RegisterType((*Configuration)(nil), "config.Configuration")
  64. }
  65. func init() { proto.RegisterFile("lib/config/config.proto", fileDescriptor_baadf209193dc627) }
  66. var fileDescriptor_baadf209193dc627 = []byte{
  67. // 547 bytes of a gzipped FileDescriptorProto
  68. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x4f, 0x8b, 0xd3, 0x40,
  69. 0x18, 0xc6, 0x13, 0xbb, 0xdb, 0xba, 0xd9, 0x7f, 0x90, 0x15, 0x4d, 0x55, 0x32, 0x75, 0xa8, 0x52,
  70. 0x45, 0xbb, 0xb0, 0x5e, 0xc4, 0x9b, 0xb5, 0xb8, 0x14, 0x05, 0x65, 0x60, 0x45, 0xbd, 0x48, 0xdb,
  71. 0xcc, 0xa6, 0x03, 0xed, 0x4c, 0x49, 0xd2, 0xb2, 0x7e, 0x0b, 0xf1, 0x13, 0x78, 0xf5, 0x1b, 0xf8,
  72. 0x11, 0x7a, 0x6b, 0x8f, 0x9e, 0x06, 0xb6, 0xbd, 0xf5, 0x98, 0xa3, 0x27, 0x99, 0x7f, 0xdd, 0x44,
  73. 0xa2, 0xa7, 0xe6, 0x7d, 0x9f, 0xe7, 0xf9, 0xbd, 0x2f, 0x6f, 0x13, 0xe7, 0xd6, 0x90, 0xf4, 0x8e,
  74. 0xfb, 0x8c, 0x9e, 0x93, 0x50, 0xff, 0x34, 0xc7, 0x11, 0x4b, 0x98, 0x5b, 0x56, 0xd5, 0xed, 0x7a,
  75. 0xc6, 0x70, 0xce, 0x86, 0x01, 0x8e, 0x54, 0x31, 0x89, 0xba, 0x09, 0x61, 0x54, 0xb9, 0x73, 0xae,
  76. 0x00, 0x4f, 0x49, 0x1f, 0x17, 0xb9, 0xee, 0x65, 0x5c, 0xe1, 0x84, 0x14, 0x59, 0x60, 0xc6, 0x32,
  77. 0x0c, 0xba, 0xe3, 0x22, 0xcf, 0xfd, 0x8c, 0x87, 0x8d, 0x85, 0x10, 0x17, 0xd9, 0xaa, 0x59, 0x5b,
  78. 0x2f, 0xc6, 0xd1, 0x14, 0x07, 0x5a, 0xda, 0xc1, 0x17, 0x89, 0x7a, 0x84, 0x3f, 0xcb, 0xce, 0xfe,
  79. 0xcb, 0x6c, 0xda, 0x45, 0x4e, 0x65, 0x8a, 0xa3, 0x98, 0x30, 0xea, 0xd9, 0x35, 0xbb, 0xb1, 0xdd,
  80. 0x7a, 0xb6, 0xe6, 0xc0, 0xb4, 0x52, 0x0e, 0xdc, 0x8b, 0xd1, 0xf0, 0x39, 0xd4, 0xf5, 0xe3, 0x6e,
  81. 0x92, 0x44, 0xf0, 0x37, 0x07, 0x25, 0x42, 0x93, 0xf5, 0xbc, 0xbe, 0x97, 0xed, 0x23, 0x93, 0x72,
  82. 0xdf, 0x3b, 0x15, 0x75, 0xbc, 0xd8, 0xbb, 0x56, 0x2b, 0x35, 0x76, 0x4f, 0xee, 0x34, 0xf5, 0xb5,
  83. 0x5f, 0xc9, 0x76, 0x6e, 0x83, 0x16, 0x98, 0x71, 0x60, 0x89, 0xa1, 0x3a, 0x93, 0x72, 0xb0, 0x27,
  84. 0x87, 0xaa, 0x1a, 0x22, 0x23, 0x08, 0xae, 0x3a, 0x77, 0xec, 0x95, 0xf2, 0xdc, 0xb6, 0x6c, 0xff,
  85. 0x83, 0xab, 0x33, 0x1b, 0xae, 0xaa, 0x21, 0x32, 0x82, 0x8b, 0x9c, 0x52, 0x38, 0x21, 0xde, 0x56,
  86. 0xcd, 0x6e, 0xec, 0x9e, 0x78, 0x86, 0x79, 0x7a, 0xd6, 0xc9, 0x03, 0x1f, 0x08, 0xe0, 0x92, 0x83,
  87. 0xd2, 0xe9, 0x59, 0x67, 0xcd, 0x81, 0xc8, 0xa4, 0x1c, 0xec, 0x48, 0x66, 0x38, 0x21, 0xf0, 0xdb,
  88. 0xa2, 0x2e, 0x24, 0x24, 0x04, 0xf7, 0xa3, 0xb3, 0x25, 0xfe, 0x51, 0x6f, 0x5b, 0x42, 0xab, 0x06,
  89. 0xfa, 0xa6, 0xfd, 0xe2, 0x5d, 0x9e, 0xfa, 0x48, 0x53, 0xb7, 0x84, 0xb4, 0xe6, 0x40, 0xc6, 0x52,
  90. 0x0e, 0x1c, 0xc9, 0x15, 0x85, 0x00, 0x4b, 0x15, 0x49, 0xcd, 0xfd, 0xe0, 0x54, 0xf4, 0x8b, 0xe0,
  91. 0x95, 0x25, 0xfd, 0xae, 0xa1, 0xbf, 0x55, 0xed, 0xfc, 0x80, 0x9a, 0xb9, 0x83, 0x0e, 0xa5, 0x1c,
  92. 0xec, 0x4b, 0xb6, 0xae, 0x21, 0x32, 0x8a, 0xfb, 0xc3, 0x76, 0x0e, 0x49, 0x48, 0x59, 0x84, 0x83,
  93. 0xcf, 0xe6, 0xd2, 0x15, 0x79, 0xe9, 0x9b, 0x9b, 0x11, 0xfa, 0xdd, 0x52, 0x17, 0x6f, 0x0d, 0x34,
  94. 0xfc, 0x46, 0x84, 0x47, 0x2c, 0xc1, 0x1d, 0x15, 0x6e, 0x6f, 0x2e, 0x5e, 0x95, 0x93, 0x0a, 0x44,
  95. 0xb8, 0x9e, 0xd7, 0x8f, 0x0a, 0xfa, 0xe9, 0xbc, 0x5e, 0xc8, 0x42, 0x07, 0x24, 0x57, 0xbb, 0xd4,
  96. 0x39, 0x1c, 0x63, 0x1a, 0x10, 0x1a, 0x6e, 0x56, 0xbd, 0xfe, 0xdf, 0x55, 0x9f, 0xe8, 0x55, 0x0f,
  97. 0x74, 0xec, 0x6a, 0xc9, 0x23, 0xb9, 0x64, 0xae, 0x0d, 0xd1, 0x5f, 0xb6, 0xd6, 0xeb, 0xd9, 0xa5,
  98. 0x6f, 0x2d, 0x2e, 0x7d, 0x6b, 0xb6, 0xf4, 0xed, 0xc5, 0xd2, 0xb7, 0xbf, 0xae, 0x7c, 0xeb, 0xfb,
  99. 0xca, 0xb7, 0x17, 0x2b, 0xdf, 0xfa, 0xb5, 0xf2, 0xad, 0x4f, 0x0f, 0x43, 0x92, 0x0c, 0x26, 0xbd,
  100. 0x66, 0x9f, 0x8d, 0x8e, 0xe3, 0x2f, 0xb4, 0x9f, 0x0c, 0x08, 0x0d, 0x33, 0x4f, 0x57, 0x5f, 0x68,
  101. 0xaf, 0x2c, 0x3f, 0xc7, 0xa7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xcb, 0xcf, 0x98, 0x86, 0x91,
  102. 0x04, 0x00, 0x00,
  103. }
  104. func (m *Configuration) Marshal() (dAtA []byte, err error) {
  105. size := m.ProtoSize()
  106. dAtA = make([]byte, size)
  107. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  108. if err != nil {
  109. return nil, err
  110. }
  111. return dAtA[:n], nil
  112. }
  113. func (m *Configuration) MarshalTo(dAtA []byte) (int, error) {
  114. size := m.ProtoSize()
  115. return m.MarshalToSizedBuffer(dAtA[:size])
  116. }
  117. func (m *Configuration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  118. i := len(dAtA)
  119. _ = i
  120. var l int
  121. _ = l
  122. if len(m.PendingDevices) > 0 {
  123. for iNdEx := len(m.PendingDevices) - 1; iNdEx >= 0; iNdEx-- {
  124. {
  125. size, err := m.PendingDevices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  126. if err != nil {
  127. return 0, err
  128. }
  129. i -= size
  130. i = encodeVarintConfig(dAtA, i, uint64(size))
  131. }
  132. i--
  133. dAtA[i] = 0x42
  134. }
  135. }
  136. if len(m.IgnoredDevices) > 0 {
  137. for iNdEx := len(m.IgnoredDevices) - 1; iNdEx >= 0; iNdEx-- {
  138. {
  139. size, err := m.IgnoredDevices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  140. if err != nil {
  141. return 0, err
  142. }
  143. i -= size
  144. i = encodeVarintConfig(dAtA, i, uint64(size))
  145. }
  146. i--
  147. dAtA[i] = 0x3a
  148. }
  149. }
  150. {
  151. size, err := m.Options.MarshalToSizedBuffer(dAtA[:i])
  152. if err != nil {
  153. return 0, err
  154. }
  155. i -= size
  156. i = encodeVarintConfig(dAtA, i, uint64(size))
  157. }
  158. i--
  159. dAtA[i] = 0x32
  160. {
  161. size, err := m.LDAP.MarshalToSizedBuffer(dAtA[:i])
  162. if err != nil {
  163. return 0, err
  164. }
  165. i -= size
  166. i = encodeVarintConfig(dAtA, i, uint64(size))
  167. }
  168. i--
  169. dAtA[i] = 0x2a
  170. {
  171. size, err := m.GUI.MarshalToSizedBuffer(dAtA[:i])
  172. if err != nil {
  173. return 0, err
  174. }
  175. i -= size
  176. i = encodeVarintConfig(dAtA, i, uint64(size))
  177. }
  178. i--
  179. dAtA[i] = 0x22
  180. if len(m.Devices) > 0 {
  181. for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
  182. {
  183. size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  184. if err != nil {
  185. return 0, err
  186. }
  187. i -= size
  188. i = encodeVarintConfig(dAtA, i, uint64(size))
  189. }
  190. i--
  191. dAtA[i] = 0x1a
  192. }
  193. }
  194. if len(m.Folders) > 0 {
  195. for iNdEx := len(m.Folders) - 1; iNdEx >= 0; iNdEx-- {
  196. {
  197. size, err := m.Folders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  198. if err != nil {
  199. return 0, err
  200. }
  201. i -= size
  202. i = encodeVarintConfig(dAtA, i, uint64(size))
  203. }
  204. i--
  205. dAtA[i] = 0x12
  206. }
  207. }
  208. if m.Version != 0 {
  209. i = encodeVarintConfig(dAtA, i, uint64(m.Version))
  210. i--
  211. dAtA[i] = 0x8
  212. }
  213. return len(dAtA) - i, nil
  214. }
  215. func encodeVarintConfig(dAtA []byte, offset int, v uint64) int {
  216. offset -= sovConfig(v)
  217. base := offset
  218. for v >= 1<<7 {
  219. dAtA[offset] = uint8(v&0x7f | 0x80)
  220. v >>= 7
  221. offset++
  222. }
  223. dAtA[offset] = uint8(v)
  224. return base
  225. }
  226. func (m *Configuration) ProtoSize() (n int) {
  227. if m == nil {
  228. return 0
  229. }
  230. var l int
  231. _ = l
  232. if m.Version != 0 {
  233. n += 1 + sovConfig(uint64(m.Version))
  234. }
  235. if len(m.Folders) > 0 {
  236. for _, e := range m.Folders {
  237. l = e.ProtoSize()
  238. n += 1 + l + sovConfig(uint64(l))
  239. }
  240. }
  241. if len(m.Devices) > 0 {
  242. for _, e := range m.Devices {
  243. l = e.ProtoSize()
  244. n += 1 + l + sovConfig(uint64(l))
  245. }
  246. }
  247. l = m.GUI.ProtoSize()
  248. n += 1 + l + sovConfig(uint64(l))
  249. l = m.LDAP.ProtoSize()
  250. n += 1 + l + sovConfig(uint64(l))
  251. l = m.Options.ProtoSize()
  252. n += 1 + l + sovConfig(uint64(l))
  253. if len(m.IgnoredDevices) > 0 {
  254. for _, e := range m.IgnoredDevices {
  255. l = e.ProtoSize()
  256. n += 1 + l + sovConfig(uint64(l))
  257. }
  258. }
  259. if len(m.PendingDevices) > 0 {
  260. for _, e := range m.PendingDevices {
  261. l = e.ProtoSize()
  262. n += 1 + l + sovConfig(uint64(l))
  263. }
  264. }
  265. return n
  266. }
  267. func sovConfig(x uint64) (n int) {
  268. return (math_bits.Len64(x|1) + 6) / 7
  269. }
  270. func sozConfig(x uint64) (n int) {
  271. return sovConfig(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  272. }
  273. func (m *Configuration) Unmarshal(dAtA []byte) error {
  274. l := len(dAtA)
  275. iNdEx := 0
  276. for iNdEx < l {
  277. preIndex := iNdEx
  278. var wire uint64
  279. for shift := uint(0); ; shift += 7 {
  280. if shift >= 64 {
  281. return ErrIntOverflowConfig
  282. }
  283. if iNdEx >= l {
  284. return io.ErrUnexpectedEOF
  285. }
  286. b := dAtA[iNdEx]
  287. iNdEx++
  288. wire |= uint64(b&0x7F) << shift
  289. if b < 0x80 {
  290. break
  291. }
  292. }
  293. fieldNum := int32(wire >> 3)
  294. wireType := int(wire & 0x7)
  295. if wireType == 4 {
  296. return fmt.Errorf("proto: Configuration: wiretype end group for non-group")
  297. }
  298. if fieldNum <= 0 {
  299. return fmt.Errorf("proto: Configuration: illegal tag %d (wire type %d)", fieldNum, wire)
  300. }
  301. switch fieldNum {
  302. case 1:
  303. if wireType != 0 {
  304. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  305. }
  306. m.Version = 0
  307. for shift := uint(0); ; shift += 7 {
  308. if shift >= 64 {
  309. return ErrIntOverflowConfig
  310. }
  311. if iNdEx >= l {
  312. return io.ErrUnexpectedEOF
  313. }
  314. b := dAtA[iNdEx]
  315. iNdEx++
  316. m.Version |= int(b&0x7F) << shift
  317. if b < 0x80 {
  318. break
  319. }
  320. }
  321. case 2:
  322. if wireType != 2 {
  323. return fmt.Errorf("proto: wrong wireType = %d for field Folders", wireType)
  324. }
  325. var msglen int
  326. for shift := uint(0); ; shift += 7 {
  327. if shift >= 64 {
  328. return ErrIntOverflowConfig
  329. }
  330. if iNdEx >= l {
  331. return io.ErrUnexpectedEOF
  332. }
  333. b := dAtA[iNdEx]
  334. iNdEx++
  335. msglen |= int(b&0x7F) << shift
  336. if b < 0x80 {
  337. break
  338. }
  339. }
  340. if msglen < 0 {
  341. return ErrInvalidLengthConfig
  342. }
  343. postIndex := iNdEx + msglen
  344. if postIndex < 0 {
  345. return ErrInvalidLengthConfig
  346. }
  347. if postIndex > l {
  348. return io.ErrUnexpectedEOF
  349. }
  350. m.Folders = append(m.Folders, FolderConfiguration{})
  351. if err := m.Folders[len(m.Folders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  352. return err
  353. }
  354. iNdEx = postIndex
  355. case 3:
  356. if wireType != 2 {
  357. return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
  358. }
  359. var msglen int
  360. for shift := uint(0); ; shift += 7 {
  361. if shift >= 64 {
  362. return ErrIntOverflowConfig
  363. }
  364. if iNdEx >= l {
  365. return io.ErrUnexpectedEOF
  366. }
  367. b := dAtA[iNdEx]
  368. iNdEx++
  369. msglen |= int(b&0x7F) << shift
  370. if b < 0x80 {
  371. break
  372. }
  373. }
  374. if msglen < 0 {
  375. return ErrInvalidLengthConfig
  376. }
  377. postIndex := iNdEx + msglen
  378. if postIndex < 0 {
  379. return ErrInvalidLengthConfig
  380. }
  381. if postIndex > l {
  382. return io.ErrUnexpectedEOF
  383. }
  384. m.Devices = append(m.Devices, DeviceConfiguration{})
  385. if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  386. return err
  387. }
  388. iNdEx = postIndex
  389. case 4:
  390. if wireType != 2 {
  391. return fmt.Errorf("proto: wrong wireType = %d for field GUI", wireType)
  392. }
  393. var msglen int
  394. for shift := uint(0); ; shift += 7 {
  395. if shift >= 64 {
  396. return ErrIntOverflowConfig
  397. }
  398. if iNdEx >= l {
  399. return io.ErrUnexpectedEOF
  400. }
  401. b := dAtA[iNdEx]
  402. iNdEx++
  403. msglen |= int(b&0x7F) << shift
  404. if b < 0x80 {
  405. break
  406. }
  407. }
  408. if msglen < 0 {
  409. return ErrInvalidLengthConfig
  410. }
  411. postIndex := iNdEx + msglen
  412. if postIndex < 0 {
  413. return ErrInvalidLengthConfig
  414. }
  415. if postIndex > l {
  416. return io.ErrUnexpectedEOF
  417. }
  418. if err := m.GUI.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  419. return err
  420. }
  421. iNdEx = postIndex
  422. case 5:
  423. if wireType != 2 {
  424. return fmt.Errorf("proto: wrong wireType = %d for field LDAP", wireType)
  425. }
  426. var msglen int
  427. for shift := uint(0); ; shift += 7 {
  428. if shift >= 64 {
  429. return ErrIntOverflowConfig
  430. }
  431. if iNdEx >= l {
  432. return io.ErrUnexpectedEOF
  433. }
  434. b := dAtA[iNdEx]
  435. iNdEx++
  436. msglen |= int(b&0x7F) << shift
  437. if b < 0x80 {
  438. break
  439. }
  440. }
  441. if msglen < 0 {
  442. return ErrInvalidLengthConfig
  443. }
  444. postIndex := iNdEx + msglen
  445. if postIndex < 0 {
  446. return ErrInvalidLengthConfig
  447. }
  448. if postIndex > l {
  449. return io.ErrUnexpectedEOF
  450. }
  451. if err := m.LDAP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  452. return err
  453. }
  454. iNdEx = postIndex
  455. case 6:
  456. if wireType != 2 {
  457. return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
  458. }
  459. var msglen int
  460. for shift := uint(0); ; shift += 7 {
  461. if shift >= 64 {
  462. return ErrIntOverflowConfig
  463. }
  464. if iNdEx >= l {
  465. return io.ErrUnexpectedEOF
  466. }
  467. b := dAtA[iNdEx]
  468. iNdEx++
  469. msglen |= int(b&0x7F) << shift
  470. if b < 0x80 {
  471. break
  472. }
  473. }
  474. if msglen < 0 {
  475. return ErrInvalidLengthConfig
  476. }
  477. postIndex := iNdEx + msglen
  478. if postIndex < 0 {
  479. return ErrInvalidLengthConfig
  480. }
  481. if postIndex > l {
  482. return io.ErrUnexpectedEOF
  483. }
  484. if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  485. return err
  486. }
  487. iNdEx = postIndex
  488. case 7:
  489. if wireType != 2 {
  490. return fmt.Errorf("proto: wrong wireType = %d for field IgnoredDevices", wireType)
  491. }
  492. var msglen int
  493. for shift := uint(0); ; shift += 7 {
  494. if shift >= 64 {
  495. return ErrIntOverflowConfig
  496. }
  497. if iNdEx >= l {
  498. return io.ErrUnexpectedEOF
  499. }
  500. b := dAtA[iNdEx]
  501. iNdEx++
  502. msglen |= int(b&0x7F) << shift
  503. if b < 0x80 {
  504. break
  505. }
  506. }
  507. if msglen < 0 {
  508. return ErrInvalidLengthConfig
  509. }
  510. postIndex := iNdEx + msglen
  511. if postIndex < 0 {
  512. return ErrInvalidLengthConfig
  513. }
  514. if postIndex > l {
  515. return io.ErrUnexpectedEOF
  516. }
  517. m.IgnoredDevices = append(m.IgnoredDevices, ObservedDevice{})
  518. if err := m.IgnoredDevices[len(m.IgnoredDevices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  519. return err
  520. }
  521. iNdEx = postIndex
  522. case 8:
  523. if wireType != 2 {
  524. return fmt.Errorf("proto: wrong wireType = %d for field PendingDevices", wireType)
  525. }
  526. var msglen int
  527. for shift := uint(0); ; shift += 7 {
  528. if shift >= 64 {
  529. return ErrIntOverflowConfig
  530. }
  531. if iNdEx >= l {
  532. return io.ErrUnexpectedEOF
  533. }
  534. b := dAtA[iNdEx]
  535. iNdEx++
  536. msglen |= int(b&0x7F) << shift
  537. if b < 0x80 {
  538. break
  539. }
  540. }
  541. if msglen < 0 {
  542. return ErrInvalidLengthConfig
  543. }
  544. postIndex := iNdEx + msglen
  545. if postIndex < 0 {
  546. return ErrInvalidLengthConfig
  547. }
  548. if postIndex > l {
  549. return io.ErrUnexpectedEOF
  550. }
  551. m.PendingDevices = append(m.PendingDevices, ObservedDevice{})
  552. if err := m.PendingDevices[len(m.PendingDevices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  553. return err
  554. }
  555. iNdEx = postIndex
  556. default:
  557. iNdEx = preIndex
  558. skippy, err := skipConfig(dAtA[iNdEx:])
  559. if err != nil {
  560. return err
  561. }
  562. if skippy < 0 {
  563. return ErrInvalidLengthConfig
  564. }
  565. if (iNdEx + skippy) < 0 {
  566. return ErrInvalidLengthConfig
  567. }
  568. if (iNdEx + skippy) > l {
  569. return io.ErrUnexpectedEOF
  570. }
  571. iNdEx += skippy
  572. }
  573. }
  574. if iNdEx > l {
  575. return io.ErrUnexpectedEOF
  576. }
  577. return nil
  578. }
  579. func skipConfig(dAtA []byte) (n int, err error) {
  580. l := len(dAtA)
  581. iNdEx := 0
  582. depth := 0
  583. for iNdEx < l {
  584. var wire uint64
  585. for shift := uint(0); ; shift += 7 {
  586. if shift >= 64 {
  587. return 0, ErrIntOverflowConfig
  588. }
  589. if iNdEx >= l {
  590. return 0, io.ErrUnexpectedEOF
  591. }
  592. b := dAtA[iNdEx]
  593. iNdEx++
  594. wire |= (uint64(b) & 0x7F) << shift
  595. if b < 0x80 {
  596. break
  597. }
  598. }
  599. wireType := int(wire & 0x7)
  600. switch wireType {
  601. case 0:
  602. for shift := uint(0); ; shift += 7 {
  603. if shift >= 64 {
  604. return 0, ErrIntOverflowConfig
  605. }
  606. if iNdEx >= l {
  607. return 0, io.ErrUnexpectedEOF
  608. }
  609. iNdEx++
  610. if dAtA[iNdEx-1] < 0x80 {
  611. break
  612. }
  613. }
  614. case 1:
  615. iNdEx += 8
  616. case 2:
  617. var length int
  618. for shift := uint(0); ; shift += 7 {
  619. if shift >= 64 {
  620. return 0, ErrIntOverflowConfig
  621. }
  622. if iNdEx >= l {
  623. return 0, io.ErrUnexpectedEOF
  624. }
  625. b := dAtA[iNdEx]
  626. iNdEx++
  627. length |= (int(b) & 0x7F) << shift
  628. if b < 0x80 {
  629. break
  630. }
  631. }
  632. if length < 0 {
  633. return 0, ErrInvalidLengthConfig
  634. }
  635. iNdEx += length
  636. case 3:
  637. depth++
  638. case 4:
  639. if depth == 0 {
  640. return 0, ErrUnexpectedEndOfGroupConfig
  641. }
  642. depth--
  643. case 5:
  644. iNdEx += 4
  645. default:
  646. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  647. }
  648. if iNdEx < 0 {
  649. return 0, ErrInvalidLengthConfig
  650. }
  651. if depth == 0 {
  652. return iNdEx, nil
  653. }
  654. }
  655. return 0, io.ErrUnexpectedEOF
  656. }
  657. var (
  658. ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling")
  659. ErrIntOverflowConfig = fmt.Errorf("proto: integer overflow")
  660. ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group")
  661. )