config.pb.go 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  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. DeprecatedPendingDevices []ObservedDevice `protobuf:"bytes,8,rep,name=pending_devices,json=pendingDevices,proto3" json:"-" xml:"pendingDevice,omitempty"` // Deprecated: Do not use.
  30. Defaults Defaults `protobuf:"bytes,9,opt,name=defaults,proto3" json:"defaults" xml:"defaults"`
  31. }
  32. func (m *Configuration) Reset() { *m = Configuration{} }
  33. func (m *Configuration) String() string { return proto.CompactTextString(m) }
  34. func (*Configuration) ProtoMessage() {}
  35. func (*Configuration) Descriptor() ([]byte, []int) {
  36. return fileDescriptor_baadf209193dc627, []int{0}
  37. }
  38. func (m *Configuration) XXX_Unmarshal(b []byte) error {
  39. return m.Unmarshal(b)
  40. }
  41. func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  42. if deterministic {
  43. return xxx_messageInfo_Configuration.Marshal(b, m, deterministic)
  44. } else {
  45. b = b[:cap(b)]
  46. n, err := m.MarshalToSizedBuffer(b)
  47. if err != nil {
  48. return nil, err
  49. }
  50. return b[:n], nil
  51. }
  52. }
  53. func (m *Configuration) XXX_Merge(src proto.Message) {
  54. xxx_messageInfo_Configuration.Merge(m, src)
  55. }
  56. func (m *Configuration) XXX_Size() int {
  57. return m.ProtoSize()
  58. }
  59. func (m *Configuration) XXX_DiscardUnknown() {
  60. xxx_messageInfo_Configuration.DiscardUnknown(m)
  61. }
  62. var xxx_messageInfo_Configuration proto.InternalMessageInfo
  63. type Defaults struct {
  64. Folder FolderConfiguration `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder" xml:"folder"`
  65. Device DeviceConfiguration `protobuf:"bytes,2,opt,name=device,proto3" json:"device" xml:"device"`
  66. Ignores Ignores `protobuf:"bytes,3,opt,name=ignores,proto3" json:"ignores" xml:"ignores"`
  67. }
  68. func (m *Defaults) Reset() { *m = Defaults{} }
  69. func (m *Defaults) String() string { return proto.CompactTextString(m) }
  70. func (*Defaults) ProtoMessage() {}
  71. func (*Defaults) Descriptor() ([]byte, []int) {
  72. return fileDescriptor_baadf209193dc627, []int{1}
  73. }
  74. func (m *Defaults) XXX_Unmarshal(b []byte) error {
  75. return m.Unmarshal(b)
  76. }
  77. func (m *Defaults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  78. if deterministic {
  79. return xxx_messageInfo_Defaults.Marshal(b, m, deterministic)
  80. } else {
  81. b = b[:cap(b)]
  82. n, err := m.MarshalToSizedBuffer(b)
  83. if err != nil {
  84. return nil, err
  85. }
  86. return b[:n], nil
  87. }
  88. }
  89. func (m *Defaults) XXX_Merge(src proto.Message) {
  90. xxx_messageInfo_Defaults.Merge(m, src)
  91. }
  92. func (m *Defaults) XXX_Size() int {
  93. return m.ProtoSize()
  94. }
  95. func (m *Defaults) XXX_DiscardUnknown() {
  96. xxx_messageInfo_Defaults.DiscardUnknown(m)
  97. }
  98. var xxx_messageInfo_Defaults proto.InternalMessageInfo
  99. type Ignores struct {
  100. Lines []string `protobuf:"bytes,1,rep,name=lines,proto3" json:"lines" xml:"line"`
  101. }
  102. func (m *Ignores) Reset() { *m = Ignores{} }
  103. func (m *Ignores) String() string { return proto.CompactTextString(m) }
  104. func (*Ignores) ProtoMessage() {}
  105. func (*Ignores) Descriptor() ([]byte, []int) {
  106. return fileDescriptor_baadf209193dc627, []int{2}
  107. }
  108. func (m *Ignores) XXX_Unmarshal(b []byte) error {
  109. return m.Unmarshal(b)
  110. }
  111. func (m *Ignores) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  112. if deterministic {
  113. return xxx_messageInfo_Ignores.Marshal(b, m, deterministic)
  114. } else {
  115. b = b[:cap(b)]
  116. n, err := m.MarshalToSizedBuffer(b)
  117. if err != nil {
  118. return nil, err
  119. }
  120. return b[:n], nil
  121. }
  122. }
  123. func (m *Ignores) XXX_Merge(src proto.Message) {
  124. xxx_messageInfo_Ignores.Merge(m, src)
  125. }
  126. func (m *Ignores) XXX_Size() int {
  127. return m.ProtoSize()
  128. }
  129. func (m *Ignores) XXX_DiscardUnknown() {
  130. xxx_messageInfo_Ignores.DiscardUnknown(m)
  131. }
  132. var xxx_messageInfo_Ignores proto.InternalMessageInfo
  133. func init() {
  134. proto.RegisterType((*Configuration)(nil), "config.Configuration")
  135. proto.RegisterType((*Defaults)(nil), "config.Defaults")
  136. proto.RegisterType((*Ignores)(nil), "config.Ignores")
  137. }
  138. func init() { proto.RegisterFile("lib/config/config.proto", fileDescriptor_baadf209193dc627) }
  139. var fileDescriptor_baadf209193dc627 = []byte{
  140. // 709 bytes of a gzipped FileDescriptorProto
  141. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0x4b, 0x6f, 0xd3, 0x40,
  142. 0x10, 0xc7, 0xe3, 0xa6, 0x8d, 0x9b, 0xed, 0x0b, 0x19, 0x44, 0x5d, 0x1e, 0xde, 0xb0, 0x0a, 0x28,
  143. 0xa0, 0x3e, 0xa4, 0x72, 0xa9, 0xb8, 0x11, 0x22, 0x4a, 0x55, 0x24, 0x2a, 0xa3, 0x22, 0xe0, 0x82,
  144. 0x92, 0x78, 0xeb, 0xae, 0x94, 0xd8, 0x96, 0xed, 0x54, 0xed, 0x91, 0x23, 0x37, 0xc4, 0x27, 0xe0,
  145. 0x84, 0xc4, 0x37, 0xe9, 0xad, 0x39, 0x72, 0x5a, 0xa9, 0xcd, 0xcd, 0x47, 0x1f, 0x39, 0xa1, 0x7d,
  146. 0x39, 0xb6, 0x6a, 0xe0, 0x94, 0xcc, 0xfc, 0xff, 0xf3, 0xdb, 0xd5, 0xec, 0x8c, 0xc1, 0xea, 0x80,
  147. 0xf4, 0xb6, 0xfa, 0xbe, 0x77, 0x44, 0x5c, 0xf9, 0xb3, 0x19, 0x84, 0x7e, 0xec, 0x1b, 0x35, 0x11,
  148. 0xdd, 0x69, 0xe6, 0x0c, 0x47, 0xfe, 0xc0, 0xc1, 0xa1, 0x08, 0x46, 0x61, 0x37, 0x26, 0xbe, 0x27,
  149. 0xdc, 0x05, 0x97, 0x83, 0x4f, 0x48, 0x1f, 0x97, 0xb9, 0x1e, 0xe4, 0x5c, 0xee, 0x88, 0x94, 0x59,
  150. 0x50, 0xce, 0x32, 0x70, 0xba, 0x41, 0x99, 0xe7, 0x61, 0xce, 0xe3, 0x07, 0x4c, 0x88, 0xca, 0x6c,
  151. 0x6b, 0x79, 0x5b, 0x2f, 0xc2, 0xe1, 0x09, 0x76, 0xa4, 0x54, 0xc7, 0xa7, 0xb1, 0xf8, 0x8b, 0x7e,
  152. 0xe8, 0x60, 0xe9, 0x45, 0xbe, 0xda, 0xb0, 0x81, 0x7e, 0x82, 0xc3, 0x88, 0xf8, 0x9e, 0xa9, 0x35,
  153. 0xb4, 0xd6, 0x5c, 0x7b, 0x27, 0xa1, 0x50, 0xa5, 0x52, 0x0a, 0x8d, 0xd3, 0xe1, 0xe0, 0x19, 0x92,
  154. 0xf1, 0x7a, 0x37, 0x8e, 0x43, 0xf4, 0x9b, 0xc2, 0x2a, 0xf1, 0xe2, 0xe4, 0xa2, 0xb9, 0x98, 0xcf,
  155. 0xdb, 0xaa, 0xca, 0x78, 0x07, 0x74, 0xd1, 0xbc, 0xc8, 0x9c, 0x69, 0x54, 0x5b, 0x0b, 0xdb, 0x77,
  156. 0x37, 0x65, 0xb7, 0x5f, 0xf2, 0x74, 0xe1, 0x06, 0x6d, 0x78, 0x4e, 0x61, 0x85, 0x1d, 0x2a, 0x6b,
  157. 0x52, 0x0a, 0x17, 0xf9, 0xa1, 0x22, 0x46, 0xb6, 0x12, 0x18, 0x57, 0xb4, 0x3b, 0x32, 0xab, 0x45,
  158. 0x6e, 0x87, 0xa7, 0xff, 0xc2, 0x95, 0x35, 0x19, 0x57, 0xc4, 0xc8, 0x56, 0x82, 0x61, 0x83, 0xaa,
  159. 0x3b, 0x22, 0xe6, 0x6c, 0x43, 0x6b, 0x2d, 0x6c, 0x9b, 0x8a, 0xb9, 0x7b, 0xb8, 0x57, 0x04, 0x3e,
  160. 0x62, 0xc0, 0x2b, 0x0a, 0xab, 0xbb, 0x87, 0x7b, 0x09, 0x85, 0xac, 0x26, 0xa5, 0xb0, 0xce, 0x99,
  161. 0xee, 0x88, 0xa0, 0x6f, 0xe3, 0x26, 0x93, 0x6c, 0x26, 0x18, 0x1f, 0xc0, 0x2c, 0x7b, 0x51, 0x73,
  162. 0x8e, 0x43, 0xd7, 0x14, 0xf4, 0x75, 0xe7, 0xf9, 0x41, 0x91, 0xfa, 0x44, 0x52, 0x67, 0x99, 0x94,
  163. 0x50, 0xc8, 0xcb, 0x52, 0x0a, 0x01, 0xe7, 0xb2, 0x80, 0x81, 0xb9, 0x6a, 0x73, 0xcd, 0x78, 0x0f,
  164. 0x74, 0x39, 0x08, 0x66, 0x8d, 0xd3, 0xef, 0x29, 0xfa, 0x1b, 0x91, 0x2e, 0x1e, 0xd0, 0x50, 0x7d,
  165. 0x90, 0x45, 0x29, 0x85, 0x4b, 0x9c, 0x2d, 0x63, 0x64, 0x2b, 0xc5, 0xf8, 0xa9, 0x81, 0x15, 0xe2,
  166. 0x7a, 0x7e, 0x88, 0x9d, 0x4f, 0xaa, 0xd3, 0x3a, 0xef, 0xf4, 0xed, 0xec, 0x08, 0x39, 0x5b, 0xa2,
  167. 0xe3, 0xed, 0x63, 0x09, 0xbf, 0x15, 0xe2, 0xa1, 0x1f, 0xe3, 0x3d, 0x51, 0xdc, 0xc9, 0x3a, 0xbe,
  168. 0xc6, 0x4f, 0x2a, 0x11, 0x51, 0x72, 0xd1, 0xbc, 0x59, 0x92, 0x4f, 0x2f, 0x9a, 0xa5, 0x2c, 0x7b,
  169. 0x99, 0x14, 0x62, 0xe3, 0x8b, 0x06, 0x56, 0x02, 0xec, 0x39, 0xc4, 0x73, 0xb3, 0xbb, 0xce, 0xff,
  170. 0xf3, 0xae, 0xaf, 0x64, 0xa7, 0xcd, 0x0e, 0x0e, 0x42, 0xdc, 0xef, 0xc6, 0xd8, 0x39, 0x10, 0x00,
  171. 0xc9, 0x4c, 0x28, 0xd4, 0x36, 0x52, 0x0a, 0xef, 0xf3, 0x4b, 0x07, 0x79, 0x6d, 0xdd, 0x1f, 0x92,
  172. 0x18, 0x0f, 0x83, 0xf8, 0x0c, 0x99, 0x9a, 0xbd, 0x5c, 0xd0, 0x22, 0xe3, 0x00, 0xcc, 0x3b, 0xf8,
  173. 0xa8, 0x3b, 0x1a, 0xc4, 0x91, 0x59, 0xe7, 0x4f, 0x72, 0x63, 0x3a, 0x99, 0x22, 0xdf, 0x46, 0xb2,
  174. 0x53, 0x99, 0x33, 0xa5, 0x70, 0x59, 0xce, 0xa3, 0x48, 0x20, 0x3b, 0xd3, 0xd0, 0xe7, 0x19, 0x30,
  175. 0xaf, 0x4a, 0x8d, 0xb7, 0xa0, 0x26, 0x56, 0x80, 0xaf, 0xe8, 0x7f, 0xd6, 0xc9, 0x92, 0xe7, 0xc8,
  176. 0x92, 0x6b, 0xdb, 0x24, 0xf3, 0x0c, 0x2a, 0xda, 0x66, 0xce, 0x14, 0xa1, 0x65, 0xbb, 0x94, 0x41,
  177. 0x45, 0xc9, 0xb5, 0x55, 0x92, 0x79, 0x63, 0x1f, 0xe8, 0xe2, 0x99, 0xd8, 0x86, 0x32, 0xea, 0x8a,
  178. 0xa2, 0x8a, 0xd7, 0x8c, 0xa6, 0xd3, 0x28, 0x7d, 0xd9, 0x34, 0xca, 0x18, 0xd9, 0x4a, 0x41, 0x3b,
  179. 0x40, 0x97, 0x55, 0xc6, 0x06, 0x98, 0x1b, 0x10, 0x0f, 0x47, 0xa6, 0xd6, 0xa8, 0xb6, 0xea, 0xed,
  180. 0xd5, 0x84, 0x42, 0x91, 0x98, 0x2e, 0x0a, 0xf1, 0x30, 0xb2, 0x45, 0xb2, 0xbd, 0x7f, 0x7e, 0x69,
  181. 0x55, 0xc6, 0x97, 0x56, 0xe5, 0xfc, 0xca, 0xd2, 0xc6, 0x57, 0x96, 0xf6, 0x75, 0x62, 0x55, 0xbe,
  182. 0x4f, 0x2c, 0x6d, 0x3c, 0xb1, 0x2a, 0xbf, 0x26, 0x56, 0xe5, 0xe3, 0x63, 0x97, 0xc4, 0xc7, 0xa3,
  183. 0xde, 0x66, 0xdf, 0x1f, 0x6e, 0x45, 0x67, 0x5e, 0x3f, 0x3e, 0x26, 0x9e, 0x9b, 0xfb, 0x37, 0xfd,
  184. 0x9a, 0xf6, 0x6a, 0xfc, 0xd3, 0xf9, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x77, 0x7d, 0xcb,
  185. 0x2a, 0x3d, 0x06, 0x00, 0x00,
  186. }
  187. func (m *Configuration) Marshal() (dAtA []byte, err error) {
  188. size := m.ProtoSize()
  189. dAtA = make([]byte, size)
  190. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  191. if err != nil {
  192. return nil, err
  193. }
  194. return dAtA[:n], nil
  195. }
  196. func (m *Configuration) MarshalTo(dAtA []byte) (int, error) {
  197. size := m.ProtoSize()
  198. return m.MarshalToSizedBuffer(dAtA[:size])
  199. }
  200. func (m *Configuration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  201. i := len(dAtA)
  202. _ = i
  203. var l int
  204. _ = l
  205. {
  206. size, err := m.Defaults.MarshalToSizedBuffer(dAtA[:i])
  207. if err != nil {
  208. return 0, err
  209. }
  210. i -= size
  211. i = encodeVarintConfig(dAtA, i, uint64(size))
  212. }
  213. i--
  214. dAtA[i] = 0x4a
  215. if len(m.DeprecatedPendingDevices) > 0 {
  216. for iNdEx := len(m.DeprecatedPendingDevices) - 1; iNdEx >= 0; iNdEx-- {
  217. {
  218. size, err := m.DeprecatedPendingDevices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  219. if err != nil {
  220. return 0, err
  221. }
  222. i -= size
  223. i = encodeVarintConfig(dAtA, i, uint64(size))
  224. }
  225. i--
  226. dAtA[i] = 0x42
  227. }
  228. }
  229. if len(m.IgnoredDevices) > 0 {
  230. for iNdEx := len(m.IgnoredDevices) - 1; iNdEx >= 0; iNdEx-- {
  231. {
  232. size, err := m.IgnoredDevices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  233. if err != nil {
  234. return 0, err
  235. }
  236. i -= size
  237. i = encodeVarintConfig(dAtA, i, uint64(size))
  238. }
  239. i--
  240. dAtA[i] = 0x3a
  241. }
  242. }
  243. {
  244. size, err := m.Options.MarshalToSizedBuffer(dAtA[:i])
  245. if err != nil {
  246. return 0, err
  247. }
  248. i -= size
  249. i = encodeVarintConfig(dAtA, i, uint64(size))
  250. }
  251. i--
  252. dAtA[i] = 0x32
  253. {
  254. size, err := m.LDAP.MarshalToSizedBuffer(dAtA[:i])
  255. if err != nil {
  256. return 0, err
  257. }
  258. i -= size
  259. i = encodeVarintConfig(dAtA, i, uint64(size))
  260. }
  261. i--
  262. dAtA[i] = 0x2a
  263. {
  264. size, err := m.GUI.MarshalToSizedBuffer(dAtA[:i])
  265. if err != nil {
  266. return 0, err
  267. }
  268. i -= size
  269. i = encodeVarintConfig(dAtA, i, uint64(size))
  270. }
  271. i--
  272. dAtA[i] = 0x22
  273. if len(m.Devices) > 0 {
  274. for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
  275. {
  276. size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  277. if err != nil {
  278. return 0, err
  279. }
  280. i -= size
  281. i = encodeVarintConfig(dAtA, i, uint64(size))
  282. }
  283. i--
  284. dAtA[i] = 0x1a
  285. }
  286. }
  287. if len(m.Folders) > 0 {
  288. for iNdEx := len(m.Folders) - 1; iNdEx >= 0; iNdEx-- {
  289. {
  290. size, err := m.Folders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  291. if err != nil {
  292. return 0, err
  293. }
  294. i -= size
  295. i = encodeVarintConfig(dAtA, i, uint64(size))
  296. }
  297. i--
  298. dAtA[i] = 0x12
  299. }
  300. }
  301. if m.Version != 0 {
  302. i = encodeVarintConfig(dAtA, i, uint64(m.Version))
  303. i--
  304. dAtA[i] = 0x8
  305. }
  306. return len(dAtA) - i, nil
  307. }
  308. func (m *Defaults) Marshal() (dAtA []byte, err error) {
  309. size := m.ProtoSize()
  310. dAtA = make([]byte, size)
  311. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  312. if err != nil {
  313. return nil, err
  314. }
  315. return dAtA[:n], nil
  316. }
  317. func (m *Defaults) MarshalTo(dAtA []byte) (int, error) {
  318. size := m.ProtoSize()
  319. return m.MarshalToSizedBuffer(dAtA[:size])
  320. }
  321. func (m *Defaults) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  322. i := len(dAtA)
  323. _ = i
  324. var l int
  325. _ = l
  326. {
  327. size, err := m.Ignores.MarshalToSizedBuffer(dAtA[:i])
  328. if err != nil {
  329. return 0, err
  330. }
  331. i -= size
  332. i = encodeVarintConfig(dAtA, i, uint64(size))
  333. }
  334. i--
  335. dAtA[i] = 0x1a
  336. {
  337. size, err := m.Device.MarshalToSizedBuffer(dAtA[:i])
  338. if err != nil {
  339. return 0, err
  340. }
  341. i -= size
  342. i = encodeVarintConfig(dAtA, i, uint64(size))
  343. }
  344. i--
  345. dAtA[i] = 0x12
  346. {
  347. size, err := m.Folder.MarshalToSizedBuffer(dAtA[:i])
  348. if err != nil {
  349. return 0, err
  350. }
  351. i -= size
  352. i = encodeVarintConfig(dAtA, i, uint64(size))
  353. }
  354. i--
  355. dAtA[i] = 0xa
  356. return len(dAtA) - i, nil
  357. }
  358. func (m *Ignores) Marshal() (dAtA []byte, err error) {
  359. size := m.ProtoSize()
  360. dAtA = make([]byte, size)
  361. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  362. if err != nil {
  363. return nil, err
  364. }
  365. return dAtA[:n], nil
  366. }
  367. func (m *Ignores) MarshalTo(dAtA []byte) (int, error) {
  368. size := m.ProtoSize()
  369. return m.MarshalToSizedBuffer(dAtA[:size])
  370. }
  371. func (m *Ignores) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  372. i := len(dAtA)
  373. _ = i
  374. var l int
  375. _ = l
  376. if len(m.Lines) > 0 {
  377. for iNdEx := len(m.Lines) - 1; iNdEx >= 0; iNdEx-- {
  378. i -= len(m.Lines[iNdEx])
  379. copy(dAtA[i:], m.Lines[iNdEx])
  380. i = encodeVarintConfig(dAtA, i, uint64(len(m.Lines[iNdEx])))
  381. i--
  382. dAtA[i] = 0xa
  383. }
  384. }
  385. return len(dAtA) - i, nil
  386. }
  387. func encodeVarintConfig(dAtA []byte, offset int, v uint64) int {
  388. offset -= sovConfig(v)
  389. base := offset
  390. for v >= 1<<7 {
  391. dAtA[offset] = uint8(v&0x7f | 0x80)
  392. v >>= 7
  393. offset++
  394. }
  395. dAtA[offset] = uint8(v)
  396. return base
  397. }
  398. func (m *Configuration) ProtoSize() (n int) {
  399. if m == nil {
  400. return 0
  401. }
  402. var l int
  403. _ = l
  404. if m.Version != 0 {
  405. n += 1 + sovConfig(uint64(m.Version))
  406. }
  407. if len(m.Folders) > 0 {
  408. for _, e := range m.Folders {
  409. l = e.ProtoSize()
  410. n += 1 + l + sovConfig(uint64(l))
  411. }
  412. }
  413. if len(m.Devices) > 0 {
  414. for _, e := range m.Devices {
  415. l = e.ProtoSize()
  416. n += 1 + l + sovConfig(uint64(l))
  417. }
  418. }
  419. l = m.GUI.ProtoSize()
  420. n += 1 + l + sovConfig(uint64(l))
  421. l = m.LDAP.ProtoSize()
  422. n += 1 + l + sovConfig(uint64(l))
  423. l = m.Options.ProtoSize()
  424. n += 1 + l + sovConfig(uint64(l))
  425. if len(m.IgnoredDevices) > 0 {
  426. for _, e := range m.IgnoredDevices {
  427. l = e.ProtoSize()
  428. n += 1 + l + sovConfig(uint64(l))
  429. }
  430. }
  431. if len(m.DeprecatedPendingDevices) > 0 {
  432. for _, e := range m.DeprecatedPendingDevices {
  433. l = e.ProtoSize()
  434. n += 1 + l + sovConfig(uint64(l))
  435. }
  436. }
  437. l = m.Defaults.ProtoSize()
  438. n += 1 + l + sovConfig(uint64(l))
  439. return n
  440. }
  441. func (m *Defaults) ProtoSize() (n int) {
  442. if m == nil {
  443. return 0
  444. }
  445. var l int
  446. _ = l
  447. l = m.Folder.ProtoSize()
  448. n += 1 + l + sovConfig(uint64(l))
  449. l = m.Device.ProtoSize()
  450. n += 1 + l + sovConfig(uint64(l))
  451. l = m.Ignores.ProtoSize()
  452. n += 1 + l + sovConfig(uint64(l))
  453. return n
  454. }
  455. func (m *Ignores) ProtoSize() (n int) {
  456. if m == nil {
  457. return 0
  458. }
  459. var l int
  460. _ = l
  461. if len(m.Lines) > 0 {
  462. for _, s := range m.Lines {
  463. l = len(s)
  464. n += 1 + l + sovConfig(uint64(l))
  465. }
  466. }
  467. return n
  468. }
  469. func sovConfig(x uint64) (n int) {
  470. return (math_bits.Len64(x|1) + 6) / 7
  471. }
  472. func sozConfig(x uint64) (n int) {
  473. return sovConfig(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  474. }
  475. func (m *Configuration) Unmarshal(dAtA []byte) error {
  476. l := len(dAtA)
  477. iNdEx := 0
  478. for iNdEx < l {
  479. preIndex := iNdEx
  480. var wire uint64
  481. for shift := uint(0); ; shift += 7 {
  482. if shift >= 64 {
  483. return ErrIntOverflowConfig
  484. }
  485. if iNdEx >= l {
  486. return io.ErrUnexpectedEOF
  487. }
  488. b := dAtA[iNdEx]
  489. iNdEx++
  490. wire |= uint64(b&0x7F) << shift
  491. if b < 0x80 {
  492. break
  493. }
  494. }
  495. fieldNum := int32(wire >> 3)
  496. wireType := int(wire & 0x7)
  497. if wireType == 4 {
  498. return fmt.Errorf("proto: Configuration: wiretype end group for non-group")
  499. }
  500. if fieldNum <= 0 {
  501. return fmt.Errorf("proto: Configuration: illegal tag %d (wire type %d)", fieldNum, wire)
  502. }
  503. switch fieldNum {
  504. case 1:
  505. if wireType != 0 {
  506. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  507. }
  508. m.Version = 0
  509. for shift := uint(0); ; shift += 7 {
  510. if shift >= 64 {
  511. return ErrIntOverflowConfig
  512. }
  513. if iNdEx >= l {
  514. return io.ErrUnexpectedEOF
  515. }
  516. b := dAtA[iNdEx]
  517. iNdEx++
  518. m.Version |= int(b&0x7F) << shift
  519. if b < 0x80 {
  520. break
  521. }
  522. }
  523. case 2:
  524. if wireType != 2 {
  525. return fmt.Errorf("proto: wrong wireType = %d for field Folders", wireType)
  526. }
  527. var msglen int
  528. for shift := uint(0); ; shift += 7 {
  529. if shift >= 64 {
  530. return ErrIntOverflowConfig
  531. }
  532. if iNdEx >= l {
  533. return io.ErrUnexpectedEOF
  534. }
  535. b := dAtA[iNdEx]
  536. iNdEx++
  537. msglen |= int(b&0x7F) << shift
  538. if b < 0x80 {
  539. break
  540. }
  541. }
  542. if msglen < 0 {
  543. return ErrInvalidLengthConfig
  544. }
  545. postIndex := iNdEx + msglen
  546. if postIndex < 0 {
  547. return ErrInvalidLengthConfig
  548. }
  549. if postIndex > l {
  550. return io.ErrUnexpectedEOF
  551. }
  552. m.Folders = append(m.Folders, FolderConfiguration{})
  553. if err := m.Folders[len(m.Folders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  554. return err
  555. }
  556. iNdEx = postIndex
  557. case 3:
  558. if wireType != 2 {
  559. return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
  560. }
  561. var msglen int
  562. for shift := uint(0); ; shift += 7 {
  563. if shift >= 64 {
  564. return ErrIntOverflowConfig
  565. }
  566. if iNdEx >= l {
  567. return io.ErrUnexpectedEOF
  568. }
  569. b := dAtA[iNdEx]
  570. iNdEx++
  571. msglen |= int(b&0x7F) << shift
  572. if b < 0x80 {
  573. break
  574. }
  575. }
  576. if msglen < 0 {
  577. return ErrInvalidLengthConfig
  578. }
  579. postIndex := iNdEx + msglen
  580. if postIndex < 0 {
  581. return ErrInvalidLengthConfig
  582. }
  583. if postIndex > l {
  584. return io.ErrUnexpectedEOF
  585. }
  586. m.Devices = append(m.Devices, DeviceConfiguration{})
  587. if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  588. return err
  589. }
  590. iNdEx = postIndex
  591. case 4:
  592. if wireType != 2 {
  593. return fmt.Errorf("proto: wrong wireType = %d for field GUI", wireType)
  594. }
  595. var msglen int
  596. for shift := uint(0); ; shift += 7 {
  597. if shift >= 64 {
  598. return ErrIntOverflowConfig
  599. }
  600. if iNdEx >= l {
  601. return io.ErrUnexpectedEOF
  602. }
  603. b := dAtA[iNdEx]
  604. iNdEx++
  605. msglen |= int(b&0x7F) << shift
  606. if b < 0x80 {
  607. break
  608. }
  609. }
  610. if msglen < 0 {
  611. return ErrInvalidLengthConfig
  612. }
  613. postIndex := iNdEx + msglen
  614. if postIndex < 0 {
  615. return ErrInvalidLengthConfig
  616. }
  617. if postIndex > l {
  618. return io.ErrUnexpectedEOF
  619. }
  620. if err := m.GUI.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  621. return err
  622. }
  623. iNdEx = postIndex
  624. case 5:
  625. if wireType != 2 {
  626. return fmt.Errorf("proto: wrong wireType = %d for field LDAP", wireType)
  627. }
  628. var msglen int
  629. for shift := uint(0); ; shift += 7 {
  630. if shift >= 64 {
  631. return ErrIntOverflowConfig
  632. }
  633. if iNdEx >= l {
  634. return io.ErrUnexpectedEOF
  635. }
  636. b := dAtA[iNdEx]
  637. iNdEx++
  638. msglen |= int(b&0x7F) << shift
  639. if b < 0x80 {
  640. break
  641. }
  642. }
  643. if msglen < 0 {
  644. return ErrInvalidLengthConfig
  645. }
  646. postIndex := iNdEx + msglen
  647. if postIndex < 0 {
  648. return ErrInvalidLengthConfig
  649. }
  650. if postIndex > l {
  651. return io.ErrUnexpectedEOF
  652. }
  653. if err := m.LDAP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  654. return err
  655. }
  656. iNdEx = postIndex
  657. case 6:
  658. if wireType != 2 {
  659. return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
  660. }
  661. var msglen int
  662. for shift := uint(0); ; shift += 7 {
  663. if shift >= 64 {
  664. return ErrIntOverflowConfig
  665. }
  666. if iNdEx >= l {
  667. return io.ErrUnexpectedEOF
  668. }
  669. b := dAtA[iNdEx]
  670. iNdEx++
  671. msglen |= int(b&0x7F) << shift
  672. if b < 0x80 {
  673. break
  674. }
  675. }
  676. if msglen < 0 {
  677. return ErrInvalidLengthConfig
  678. }
  679. postIndex := iNdEx + msglen
  680. if postIndex < 0 {
  681. return ErrInvalidLengthConfig
  682. }
  683. if postIndex > l {
  684. return io.ErrUnexpectedEOF
  685. }
  686. if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  687. return err
  688. }
  689. iNdEx = postIndex
  690. case 7:
  691. if wireType != 2 {
  692. return fmt.Errorf("proto: wrong wireType = %d for field IgnoredDevices", wireType)
  693. }
  694. var msglen int
  695. for shift := uint(0); ; shift += 7 {
  696. if shift >= 64 {
  697. return ErrIntOverflowConfig
  698. }
  699. if iNdEx >= l {
  700. return io.ErrUnexpectedEOF
  701. }
  702. b := dAtA[iNdEx]
  703. iNdEx++
  704. msglen |= int(b&0x7F) << shift
  705. if b < 0x80 {
  706. break
  707. }
  708. }
  709. if msglen < 0 {
  710. return ErrInvalidLengthConfig
  711. }
  712. postIndex := iNdEx + msglen
  713. if postIndex < 0 {
  714. return ErrInvalidLengthConfig
  715. }
  716. if postIndex > l {
  717. return io.ErrUnexpectedEOF
  718. }
  719. m.IgnoredDevices = append(m.IgnoredDevices, ObservedDevice{})
  720. if err := m.IgnoredDevices[len(m.IgnoredDevices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  721. return err
  722. }
  723. iNdEx = postIndex
  724. case 8:
  725. if wireType != 2 {
  726. return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedPendingDevices", wireType)
  727. }
  728. var msglen int
  729. for shift := uint(0); ; shift += 7 {
  730. if shift >= 64 {
  731. return ErrIntOverflowConfig
  732. }
  733. if iNdEx >= l {
  734. return io.ErrUnexpectedEOF
  735. }
  736. b := dAtA[iNdEx]
  737. iNdEx++
  738. msglen |= int(b&0x7F) << shift
  739. if b < 0x80 {
  740. break
  741. }
  742. }
  743. if msglen < 0 {
  744. return ErrInvalidLengthConfig
  745. }
  746. postIndex := iNdEx + msglen
  747. if postIndex < 0 {
  748. return ErrInvalidLengthConfig
  749. }
  750. if postIndex > l {
  751. return io.ErrUnexpectedEOF
  752. }
  753. m.DeprecatedPendingDevices = append(m.DeprecatedPendingDevices, ObservedDevice{})
  754. if err := m.DeprecatedPendingDevices[len(m.DeprecatedPendingDevices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  755. return err
  756. }
  757. iNdEx = postIndex
  758. case 9:
  759. if wireType != 2 {
  760. return fmt.Errorf("proto: wrong wireType = %d for field Defaults", wireType)
  761. }
  762. var msglen int
  763. for shift := uint(0); ; shift += 7 {
  764. if shift >= 64 {
  765. return ErrIntOverflowConfig
  766. }
  767. if iNdEx >= l {
  768. return io.ErrUnexpectedEOF
  769. }
  770. b := dAtA[iNdEx]
  771. iNdEx++
  772. msglen |= int(b&0x7F) << shift
  773. if b < 0x80 {
  774. break
  775. }
  776. }
  777. if msglen < 0 {
  778. return ErrInvalidLengthConfig
  779. }
  780. postIndex := iNdEx + msglen
  781. if postIndex < 0 {
  782. return ErrInvalidLengthConfig
  783. }
  784. if postIndex > l {
  785. return io.ErrUnexpectedEOF
  786. }
  787. if err := m.Defaults.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  788. return err
  789. }
  790. iNdEx = postIndex
  791. default:
  792. iNdEx = preIndex
  793. skippy, err := skipConfig(dAtA[iNdEx:])
  794. if err != nil {
  795. return err
  796. }
  797. if (skippy < 0) || (iNdEx+skippy) < 0 {
  798. return ErrInvalidLengthConfig
  799. }
  800. if (iNdEx + skippy) > l {
  801. return io.ErrUnexpectedEOF
  802. }
  803. iNdEx += skippy
  804. }
  805. }
  806. if iNdEx > l {
  807. return io.ErrUnexpectedEOF
  808. }
  809. return nil
  810. }
  811. func (m *Defaults) Unmarshal(dAtA []byte) error {
  812. l := len(dAtA)
  813. iNdEx := 0
  814. for iNdEx < l {
  815. preIndex := iNdEx
  816. var wire uint64
  817. for shift := uint(0); ; shift += 7 {
  818. if shift >= 64 {
  819. return ErrIntOverflowConfig
  820. }
  821. if iNdEx >= l {
  822. return io.ErrUnexpectedEOF
  823. }
  824. b := dAtA[iNdEx]
  825. iNdEx++
  826. wire |= uint64(b&0x7F) << shift
  827. if b < 0x80 {
  828. break
  829. }
  830. }
  831. fieldNum := int32(wire >> 3)
  832. wireType := int(wire & 0x7)
  833. if wireType == 4 {
  834. return fmt.Errorf("proto: Defaults: wiretype end group for non-group")
  835. }
  836. if fieldNum <= 0 {
  837. return fmt.Errorf("proto: Defaults: illegal tag %d (wire type %d)", fieldNum, wire)
  838. }
  839. switch fieldNum {
  840. case 1:
  841. if wireType != 2 {
  842. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  843. }
  844. var msglen int
  845. for shift := uint(0); ; shift += 7 {
  846. if shift >= 64 {
  847. return ErrIntOverflowConfig
  848. }
  849. if iNdEx >= l {
  850. return io.ErrUnexpectedEOF
  851. }
  852. b := dAtA[iNdEx]
  853. iNdEx++
  854. msglen |= int(b&0x7F) << shift
  855. if b < 0x80 {
  856. break
  857. }
  858. }
  859. if msglen < 0 {
  860. return ErrInvalidLengthConfig
  861. }
  862. postIndex := iNdEx + msglen
  863. if postIndex < 0 {
  864. return ErrInvalidLengthConfig
  865. }
  866. if postIndex > l {
  867. return io.ErrUnexpectedEOF
  868. }
  869. if err := m.Folder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  870. return err
  871. }
  872. iNdEx = postIndex
  873. case 2:
  874. if wireType != 2 {
  875. return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
  876. }
  877. var msglen int
  878. for shift := uint(0); ; shift += 7 {
  879. if shift >= 64 {
  880. return ErrIntOverflowConfig
  881. }
  882. if iNdEx >= l {
  883. return io.ErrUnexpectedEOF
  884. }
  885. b := dAtA[iNdEx]
  886. iNdEx++
  887. msglen |= int(b&0x7F) << shift
  888. if b < 0x80 {
  889. break
  890. }
  891. }
  892. if msglen < 0 {
  893. return ErrInvalidLengthConfig
  894. }
  895. postIndex := iNdEx + msglen
  896. if postIndex < 0 {
  897. return ErrInvalidLengthConfig
  898. }
  899. if postIndex > l {
  900. return io.ErrUnexpectedEOF
  901. }
  902. if err := m.Device.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  903. return err
  904. }
  905. iNdEx = postIndex
  906. case 3:
  907. if wireType != 2 {
  908. return fmt.Errorf("proto: wrong wireType = %d for field Ignores", wireType)
  909. }
  910. var msglen int
  911. for shift := uint(0); ; shift += 7 {
  912. if shift >= 64 {
  913. return ErrIntOverflowConfig
  914. }
  915. if iNdEx >= l {
  916. return io.ErrUnexpectedEOF
  917. }
  918. b := dAtA[iNdEx]
  919. iNdEx++
  920. msglen |= int(b&0x7F) << shift
  921. if b < 0x80 {
  922. break
  923. }
  924. }
  925. if msglen < 0 {
  926. return ErrInvalidLengthConfig
  927. }
  928. postIndex := iNdEx + msglen
  929. if postIndex < 0 {
  930. return ErrInvalidLengthConfig
  931. }
  932. if postIndex > l {
  933. return io.ErrUnexpectedEOF
  934. }
  935. if err := m.Ignores.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  936. return err
  937. }
  938. iNdEx = postIndex
  939. default:
  940. iNdEx = preIndex
  941. skippy, err := skipConfig(dAtA[iNdEx:])
  942. if err != nil {
  943. return err
  944. }
  945. if (skippy < 0) || (iNdEx+skippy) < 0 {
  946. return ErrInvalidLengthConfig
  947. }
  948. if (iNdEx + skippy) > l {
  949. return io.ErrUnexpectedEOF
  950. }
  951. iNdEx += skippy
  952. }
  953. }
  954. if iNdEx > l {
  955. return io.ErrUnexpectedEOF
  956. }
  957. return nil
  958. }
  959. func (m *Ignores) Unmarshal(dAtA []byte) error {
  960. l := len(dAtA)
  961. iNdEx := 0
  962. for iNdEx < l {
  963. preIndex := iNdEx
  964. var wire uint64
  965. for shift := uint(0); ; shift += 7 {
  966. if shift >= 64 {
  967. return ErrIntOverflowConfig
  968. }
  969. if iNdEx >= l {
  970. return io.ErrUnexpectedEOF
  971. }
  972. b := dAtA[iNdEx]
  973. iNdEx++
  974. wire |= uint64(b&0x7F) << shift
  975. if b < 0x80 {
  976. break
  977. }
  978. }
  979. fieldNum := int32(wire >> 3)
  980. wireType := int(wire & 0x7)
  981. if wireType == 4 {
  982. return fmt.Errorf("proto: Ignores: wiretype end group for non-group")
  983. }
  984. if fieldNum <= 0 {
  985. return fmt.Errorf("proto: Ignores: illegal tag %d (wire type %d)", fieldNum, wire)
  986. }
  987. switch fieldNum {
  988. case 1:
  989. if wireType != 2 {
  990. return fmt.Errorf("proto: wrong wireType = %d for field Lines", wireType)
  991. }
  992. var stringLen uint64
  993. for shift := uint(0); ; shift += 7 {
  994. if shift >= 64 {
  995. return ErrIntOverflowConfig
  996. }
  997. if iNdEx >= l {
  998. return io.ErrUnexpectedEOF
  999. }
  1000. b := dAtA[iNdEx]
  1001. iNdEx++
  1002. stringLen |= uint64(b&0x7F) << shift
  1003. if b < 0x80 {
  1004. break
  1005. }
  1006. }
  1007. intStringLen := int(stringLen)
  1008. if intStringLen < 0 {
  1009. return ErrInvalidLengthConfig
  1010. }
  1011. postIndex := iNdEx + intStringLen
  1012. if postIndex < 0 {
  1013. return ErrInvalidLengthConfig
  1014. }
  1015. if postIndex > l {
  1016. return io.ErrUnexpectedEOF
  1017. }
  1018. m.Lines = append(m.Lines, string(dAtA[iNdEx:postIndex]))
  1019. iNdEx = postIndex
  1020. default:
  1021. iNdEx = preIndex
  1022. skippy, err := skipConfig(dAtA[iNdEx:])
  1023. if err != nil {
  1024. return err
  1025. }
  1026. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1027. return ErrInvalidLengthConfig
  1028. }
  1029. if (iNdEx + skippy) > l {
  1030. return io.ErrUnexpectedEOF
  1031. }
  1032. iNdEx += skippy
  1033. }
  1034. }
  1035. if iNdEx > l {
  1036. return io.ErrUnexpectedEOF
  1037. }
  1038. return nil
  1039. }
  1040. func skipConfig(dAtA []byte) (n int, err error) {
  1041. l := len(dAtA)
  1042. iNdEx := 0
  1043. depth := 0
  1044. for iNdEx < l {
  1045. var wire uint64
  1046. for shift := uint(0); ; shift += 7 {
  1047. if shift >= 64 {
  1048. return 0, ErrIntOverflowConfig
  1049. }
  1050. if iNdEx >= l {
  1051. return 0, io.ErrUnexpectedEOF
  1052. }
  1053. b := dAtA[iNdEx]
  1054. iNdEx++
  1055. wire |= (uint64(b) & 0x7F) << shift
  1056. if b < 0x80 {
  1057. break
  1058. }
  1059. }
  1060. wireType := int(wire & 0x7)
  1061. switch wireType {
  1062. case 0:
  1063. for shift := uint(0); ; shift += 7 {
  1064. if shift >= 64 {
  1065. return 0, ErrIntOverflowConfig
  1066. }
  1067. if iNdEx >= l {
  1068. return 0, io.ErrUnexpectedEOF
  1069. }
  1070. iNdEx++
  1071. if dAtA[iNdEx-1] < 0x80 {
  1072. break
  1073. }
  1074. }
  1075. case 1:
  1076. iNdEx += 8
  1077. case 2:
  1078. var length int
  1079. for shift := uint(0); ; shift += 7 {
  1080. if shift >= 64 {
  1081. return 0, ErrIntOverflowConfig
  1082. }
  1083. if iNdEx >= l {
  1084. return 0, io.ErrUnexpectedEOF
  1085. }
  1086. b := dAtA[iNdEx]
  1087. iNdEx++
  1088. length |= (int(b) & 0x7F) << shift
  1089. if b < 0x80 {
  1090. break
  1091. }
  1092. }
  1093. if length < 0 {
  1094. return 0, ErrInvalidLengthConfig
  1095. }
  1096. iNdEx += length
  1097. case 3:
  1098. depth++
  1099. case 4:
  1100. if depth == 0 {
  1101. return 0, ErrUnexpectedEndOfGroupConfig
  1102. }
  1103. depth--
  1104. case 5:
  1105. iNdEx += 4
  1106. default:
  1107. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1108. }
  1109. if iNdEx < 0 {
  1110. return 0, ErrInvalidLengthConfig
  1111. }
  1112. if depth == 0 {
  1113. return iNdEx, nil
  1114. }
  1115. }
  1116. return 0, io.ErrUnexpectedEOF
  1117. }
  1118. var (
  1119. ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling")
  1120. ErrIntOverflowConfig = fmt.Errorf("proto: integer overflow")
  1121. ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group")
  1122. )