versioningconfiguration.pb.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: lib/config/versioningconfiguration.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. // VersioningConfiguration is used in the code and for JSON serialization
  22. type VersioningConfiguration struct {
  23. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type" `
  24. Params map[string]string `protobuf:"bytes,2,rep,name=parameters,proto3" json:"params" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  25. CleanupIntervalS int `protobuf:"varint,3,opt,name=cleanup_interval_s,json=cleanupIntervalS,proto3,casttype=int" json:"cleanupIntervalS" default:"3600"`
  26. }
  27. func (m *VersioningConfiguration) Reset() { *m = VersioningConfiguration{} }
  28. func (m *VersioningConfiguration) String() string { return proto.CompactTextString(m) }
  29. func (*VersioningConfiguration) ProtoMessage() {}
  30. func (*VersioningConfiguration) Descriptor() ([]byte, []int) {
  31. return fileDescriptor_95ba6bdb22ffea81, []int{0}
  32. }
  33. func (m *VersioningConfiguration) XXX_Unmarshal(b []byte) error {
  34. return m.Unmarshal(b)
  35. }
  36. func (m *VersioningConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  37. if deterministic {
  38. return xxx_messageInfo_VersioningConfiguration.Marshal(b, m, deterministic)
  39. } else {
  40. b = b[:cap(b)]
  41. n, err := m.MarshalToSizedBuffer(b)
  42. if err != nil {
  43. return nil, err
  44. }
  45. return b[:n], nil
  46. }
  47. }
  48. func (m *VersioningConfiguration) XXX_Merge(src proto.Message) {
  49. xxx_messageInfo_VersioningConfiguration.Merge(m, src)
  50. }
  51. func (m *VersioningConfiguration) XXX_Size() int {
  52. return m.ProtoSize()
  53. }
  54. func (m *VersioningConfiguration) XXX_DiscardUnknown() {
  55. xxx_messageInfo_VersioningConfiguration.DiscardUnknown(m)
  56. }
  57. var xxx_messageInfo_VersioningConfiguration proto.InternalMessageInfo
  58. func init() {
  59. proto.RegisterType((*VersioningConfiguration)(nil), "config.VersioningConfiguration")
  60. proto.RegisterMapType((map[string]string)(nil), "config.VersioningConfiguration.ParametersEntry")
  61. }
  62. func init() {
  63. proto.RegisterFile("lib/config/versioningconfiguration.proto", fileDescriptor_95ba6bdb22ffea81)
  64. }
  65. var fileDescriptor_95ba6bdb22ffea81 = []byte{
  66. // 385 bytes of a gzipped FileDescriptorProto
  67. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xbf, 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0x57, 0x30, 0xd7,
  90. 0xd5, 0xbf, 0xbd, 0xf9, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x0d, 0x6f, 0xcc, 0x1a, 0x02, 0x00,
  91. 0x00,
  92. }
  93. func (m *VersioningConfiguration) Marshal() (dAtA []byte, err error) {
  94. size := m.ProtoSize()
  95. dAtA = make([]byte, size)
  96. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  97. if err != nil {
  98. return nil, err
  99. }
  100. return dAtA[:n], nil
  101. }
  102. func (m *VersioningConfiguration) MarshalTo(dAtA []byte) (int, error) {
  103. size := m.ProtoSize()
  104. return m.MarshalToSizedBuffer(dAtA[:size])
  105. }
  106. func (m *VersioningConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  107. i := len(dAtA)
  108. _ = i
  109. var l int
  110. _ = l
  111. if m.CleanupIntervalS != 0 {
  112. i = encodeVarintVersioningconfiguration(dAtA, i, uint64(m.CleanupIntervalS))
  113. i--
  114. dAtA[i] = 0x18
  115. }
  116. if len(m.Params) > 0 {
  117. for k := range m.Params {
  118. v := m.Params[k]
  119. baseI := i
  120. i -= len(v)
  121. copy(dAtA[i:], v)
  122. i = encodeVarintVersioningconfiguration(dAtA, i, uint64(len(v)))
  123. i--
  124. dAtA[i] = 0x12
  125. i -= len(k)
  126. copy(dAtA[i:], k)
  127. i = encodeVarintVersioningconfiguration(dAtA, i, uint64(len(k)))
  128. i--
  129. dAtA[i] = 0xa
  130. i = encodeVarintVersioningconfiguration(dAtA, i, uint64(baseI-i))
  131. i--
  132. dAtA[i] = 0x12
  133. }
  134. }
  135. if len(m.Type) > 0 {
  136. i -= len(m.Type)
  137. copy(dAtA[i:], m.Type)
  138. i = encodeVarintVersioningconfiguration(dAtA, i, uint64(len(m.Type)))
  139. i--
  140. dAtA[i] = 0xa
  141. }
  142. return len(dAtA) - i, nil
  143. }
  144. func encodeVarintVersioningconfiguration(dAtA []byte, offset int, v uint64) int {
  145. offset -= sovVersioningconfiguration(v)
  146. base := offset
  147. for v >= 1<<7 {
  148. dAtA[offset] = uint8(v&0x7f | 0x80)
  149. v >>= 7
  150. offset++
  151. }
  152. dAtA[offset] = uint8(v)
  153. return base
  154. }
  155. func (m *VersioningConfiguration) ProtoSize() (n int) {
  156. if m == nil {
  157. return 0
  158. }
  159. var l int
  160. _ = l
  161. l = len(m.Type)
  162. if l > 0 {
  163. n += 1 + l + sovVersioningconfiguration(uint64(l))
  164. }
  165. if len(m.Params) > 0 {
  166. for k, v := range m.Params {
  167. _ = k
  168. _ = v
  169. mapEntrySize := 1 + len(k) + sovVersioningconfiguration(uint64(len(k))) + 1 + len(v) + sovVersioningconfiguration(uint64(len(v)))
  170. n += mapEntrySize + 1 + sovVersioningconfiguration(uint64(mapEntrySize))
  171. }
  172. }
  173. if m.CleanupIntervalS != 0 {
  174. n += 1 + sovVersioningconfiguration(uint64(m.CleanupIntervalS))
  175. }
  176. return n
  177. }
  178. func sovVersioningconfiguration(x uint64) (n int) {
  179. return (math_bits.Len64(x|1) + 6) / 7
  180. }
  181. func sozVersioningconfiguration(x uint64) (n int) {
  182. return sovVersioningconfiguration(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  183. }
  184. func (m *VersioningConfiguration) Unmarshal(dAtA []byte) error {
  185. l := len(dAtA)
  186. iNdEx := 0
  187. for iNdEx < l {
  188. preIndex := iNdEx
  189. var wire uint64
  190. for shift := uint(0); ; shift += 7 {
  191. if shift >= 64 {
  192. return ErrIntOverflowVersioningconfiguration
  193. }
  194. if iNdEx >= l {
  195. return io.ErrUnexpectedEOF
  196. }
  197. b := dAtA[iNdEx]
  198. iNdEx++
  199. wire |= uint64(b&0x7F) << shift
  200. if b < 0x80 {
  201. break
  202. }
  203. }
  204. fieldNum := int32(wire >> 3)
  205. wireType := int(wire & 0x7)
  206. if wireType == 4 {
  207. return fmt.Errorf("proto: VersioningConfiguration: wiretype end group for non-group")
  208. }
  209. if fieldNum <= 0 {
  210. return fmt.Errorf("proto: VersioningConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
  211. }
  212. switch fieldNum {
  213. case 1:
  214. if wireType != 2 {
  215. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  216. }
  217. var stringLen uint64
  218. for shift := uint(0); ; shift += 7 {
  219. if shift >= 64 {
  220. return ErrIntOverflowVersioningconfiguration
  221. }
  222. if iNdEx >= l {
  223. return io.ErrUnexpectedEOF
  224. }
  225. b := dAtA[iNdEx]
  226. iNdEx++
  227. stringLen |= uint64(b&0x7F) << shift
  228. if b < 0x80 {
  229. break
  230. }
  231. }
  232. intStringLen := int(stringLen)
  233. if intStringLen < 0 {
  234. return ErrInvalidLengthVersioningconfiguration
  235. }
  236. postIndex := iNdEx + intStringLen
  237. if postIndex < 0 {
  238. return ErrInvalidLengthVersioningconfiguration
  239. }
  240. if postIndex > l {
  241. return io.ErrUnexpectedEOF
  242. }
  243. m.Type = string(dAtA[iNdEx:postIndex])
  244. iNdEx = postIndex
  245. case 2:
  246. if wireType != 2 {
  247. return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
  248. }
  249. var msglen int
  250. for shift := uint(0); ; shift += 7 {
  251. if shift >= 64 {
  252. return ErrIntOverflowVersioningconfiguration
  253. }
  254. if iNdEx >= l {
  255. return io.ErrUnexpectedEOF
  256. }
  257. b := dAtA[iNdEx]
  258. iNdEx++
  259. msglen |= int(b&0x7F) << shift
  260. if b < 0x80 {
  261. break
  262. }
  263. }
  264. if msglen < 0 {
  265. return ErrInvalidLengthVersioningconfiguration
  266. }
  267. postIndex := iNdEx + msglen
  268. if postIndex < 0 {
  269. return ErrInvalidLengthVersioningconfiguration
  270. }
  271. if postIndex > l {
  272. return io.ErrUnexpectedEOF
  273. }
  274. if m.Params == nil {
  275. m.Params = make(map[string]string)
  276. }
  277. var mapkey string
  278. var mapvalue string
  279. for iNdEx < postIndex {
  280. entryPreIndex := iNdEx
  281. var wire uint64
  282. for shift := uint(0); ; shift += 7 {
  283. if shift >= 64 {
  284. return ErrIntOverflowVersioningconfiguration
  285. }
  286. if iNdEx >= l {
  287. return io.ErrUnexpectedEOF
  288. }
  289. b := dAtA[iNdEx]
  290. iNdEx++
  291. wire |= uint64(b&0x7F) << shift
  292. if b < 0x80 {
  293. break
  294. }
  295. }
  296. fieldNum := int32(wire >> 3)
  297. if fieldNum == 1 {
  298. var stringLenmapkey uint64
  299. for shift := uint(0); ; shift += 7 {
  300. if shift >= 64 {
  301. return ErrIntOverflowVersioningconfiguration
  302. }
  303. if iNdEx >= l {
  304. return io.ErrUnexpectedEOF
  305. }
  306. b := dAtA[iNdEx]
  307. iNdEx++
  308. stringLenmapkey |= uint64(b&0x7F) << shift
  309. if b < 0x80 {
  310. break
  311. }
  312. }
  313. intStringLenmapkey := int(stringLenmapkey)
  314. if intStringLenmapkey < 0 {
  315. return ErrInvalidLengthVersioningconfiguration
  316. }
  317. postStringIndexmapkey := iNdEx + intStringLenmapkey
  318. if postStringIndexmapkey < 0 {
  319. return ErrInvalidLengthVersioningconfiguration
  320. }
  321. if postStringIndexmapkey > l {
  322. return io.ErrUnexpectedEOF
  323. }
  324. mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  325. iNdEx = postStringIndexmapkey
  326. } else if fieldNum == 2 {
  327. var stringLenmapvalue uint64
  328. for shift := uint(0); ; shift += 7 {
  329. if shift >= 64 {
  330. return ErrIntOverflowVersioningconfiguration
  331. }
  332. if iNdEx >= l {
  333. return io.ErrUnexpectedEOF
  334. }
  335. b := dAtA[iNdEx]
  336. iNdEx++
  337. stringLenmapvalue |= uint64(b&0x7F) << shift
  338. if b < 0x80 {
  339. break
  340. }
  341. }
  342. intStringLenmapvalue := int(stringLenmapvalue)
  343. if intStringLenmapvalue < 0 {
  344. return ErrInvalidLengthVersioningconfiguration
  345. }
  346. postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  347. if postStringIndexmapvalue < 0 {
  348. return ErrInvalidLengthVersioningconfiguration
  349. }
  350. if postStringIndexmapvalue > l {
  351. return io.ErrUnexpectedEOF
  352. }
  353. mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  354. iNdEx = postStringIndexmapvalue
  355. } else {
  356. iNdEx = entryPreIndex
  357. skippy, err := skipVersioningconfiguration(dAtA[iNdEx:])
  358. if err != nil {
  359. return err
  360. }
  361. if skippy < 0 {
  362. return ErrInvalidLengthVersioningconfiguration
  363. }
  364. if (iNdEx + skippy) > postIndex {
  365. return io.ErrUnexpectedEOF
  366. }
  367. iNdEx += skippy
  368. }
  369. }
  370. m.Params[mapkey] = mapvalue
  371. iNdEx = postIndex
  372. case 3:
  373. if wireType != 0 {
  374. return fmt.Errorf("proto: wrong wireType = %d for field CleanupIntervalS", wireType)
  375. }
  376. m.CleanupIntervalS = 0
  377. for shift := uint(0); ; shift += 7 {
  378. if shift >= 64 {
  379. return ErrIntOverflowVersioningconfiguration
  380. }
  381. if iNdEx >= l {
  382. return io.ErrUnexpectedEOF
  383. }
  384. b := dAtA[iNdEx]
  385. iNdEx++
  386. m.CleanupIntervalS |= int(b&0x7F) << shift
  387. if b < 0x80 {
  388. break
  389. }
  390. }
  391. default:
  392. iNdEx = preIndex
  393. skippy, err := skipVersioningconfiguration(dAtA[iNdEx:])
  394. if err != nil {
  395. return err
  396. }
  397. if skippy < 0 {
  398. return ErrInvalidLengthVersioningconfiguration
  399. }
  400. if (iNdEx + skippy) < 0 {
  401. return ErrInvalidLengthVersioningconfiguration
  402. }
  403. if (iNdEx + skippy) > l {
  404. return io.ErrUnexpectedEOF
  405. }
  406. iNdEx += skippy
  407. }
  408. }
  409. if iNdEx > l {
  410. return io.ErrUnexpectedEOF
  411. }
  412. return nil
  413. }
  414. func skipVersioningconfiguration(dAtA []byte) (n int, err error) {
  415. l := len(dAtA)
  416. iNdEx := 0
  417. depth := 0
  418. for iNdEx < l {
  419. var wire uint64
  420. for shift := uint(0); ; shift += 7 {
  421. if shift >= 64 {
  422. return 0, ErrIntOverflowVersioningconfiguration
  423. }
  424. if iNdEx >= l {
  425. return 0, io.ErrUnexpectedEOF
  426. }
  427. b := dAtA[iNdEx]
  428. iNdEx++
  429. wire |= (uint64(b) & 0x7F) << shift
  430. if b < 0x80 {
  431. break
  432. }
  433. }
  434. wireType := int(wire & 0x7)
  435. switch wireType {
  436. case 0:
  437. for shift := uint(0); ; shift += 7 {
  438. if shift >= 64 {
  439. return 0, ErrIntOverflowVersioningconfiguration
  440. }
  441. if iNdEx >= l {
  442. return 0, io.ErrUnexpectedEOF
  443. }
  444. iNdEx++
  445. if dAtA[iNdEx-1] < 0x80 {
  446. break
  447. }
  448. }
  449. case 1:
  450. iNdEx += 8
  451. case 2:
  452. var length int
  453. for shift := uint(0); ; shift += 7 {
  454. if shift >= 64 {
  455. return 0, ErrIntOverflowVersioningconfiguration
  456. }
  457. if iNdEx >= l {
  458. return 0, io.ErrUnexpectedEOF
  459. }
  460. b := dAtA[iNdEx]
  461. iNdEx++
  462. length |= (int(b) & 0x7F) << shift
  463. if b < 0x80 {
  464. break
  465. }
  466. }
  467. if length < 0 {
  468. return 0, ErrInvalidLengthVersioningconfiguration
  469. }
  470. iNdEx += length
  471. case 3:
  472. depth++
  473. case 4:
  474. if depth == 0 {
  475. return 0, ErrUnexpectedEndOfGroupVersioningconfiguration
  476. }
  477. depth--
  478. case 5:
  479. iNdEx += 4
  480. default:
  481. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  482. }
  483. if iNdEx < 0 {
  484. return 0, ErrInvalidLengthVersioningconfiguration
  485. }
  486. if depth == 0 {
  487. return iNdEx, nil
  488. }
  489. }
  490. return 0, io.ErrUnexpectedEOF
  491. }
  492. var (
  493. ErrInvalidLengthVersioningconfiguration = fmt.Errorf("proto: negative length found during unmarshaling")
  494. ErrIntOverflowVersioningconfiguration = fmt.Errorf("proto: integer overflow")
  495. ErrUnexpectedEndOfGroupVersioningconfiguration = fmt.Errorf("proto: unexpected end of group")
  496. )