filesync.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  1. // Code generated by protoc-gen-gogo.
  2. // source: filesync.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package filesync is a generated protocol buffer package.
  6. It is generated from these files:
  7. filesync.proto
  8. It has these top-level messages:
  9. BytesMessage
  10. */
  11. package filesync
  12. import proto "github.com/gogo/protobuf/proto"
  13. import fmt "fmt"
  14. import math "math"
  15. import bytes "bytes"
  16. import strings "strings"
  17. import reflect "reflect"
  18. import (
  19. context "golang.org/x/net/context"
  20. grpc "google.golang.org/grpc"
  21. )
  22. import io "io"
  23. // Reference imports to suppress errors if they are not otherwise used.
  24. var _ = proto.Marshal
  25. var _ = fmt.Errorf
  26. var _ = math.Inf
  27. // This is a compile-time assertion to ensure that this generated file
  28. // is compatible with the proto package it is being compiled against.
  29. // A compilation error at this line likely means your copy of the
  30. // proto package needs to be updated.
  31. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  32. // BytesMessage contains a chunk of byte data
  33. type BytesMessage struct {
  34. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
  35. }
  36. func (m *BytesMessage) Reset() { *m = BytesMessage{} }
  37. func (*BytesMessage) ProtoMessage() {}
  38. func (*BytesMessage) Descriptor() ([]byte, []int) { return fileDescriptorFilesync, []int{0} }
  39. func (m *BytesMessage) GetData() []byte {
  40. if m != nil {
  41. return m.Data
  42. }
  43. return nil
  44. }
  45. func init() {
  46. proto.RegisterType((*BytesMessage)(nil), "moby.filesync.v1.BytesMessage")
  47. }
  48. func (this *BytesMessage) Equal(that interface{}) bool {
  49. if that == nil {
  50. if this == nil {
  51. return true
  52. }
  53. return false
  54. }
  55. that1, ok := that.(*BytesMessage)
  56. if !ok {
  57. that2, ok := that.(BytesMessage)
  58. if ok {
  59. that1 = &that2
  60. } else {
  61. return false
  62. }
  63. }
  64. if that1 == nil {
  65. if this == nil {
  66. return true
  67. }
  68. return false
  69. } else if this == nil {
  70. return false
  71. }
  72. if !bytes.Equal(this.Data, that1.Data) {
  73. return false
  74. }
  75. return true
  76. }
  77. func (this *BytesMessage) GoString() string {
  78. if this == nil {
  79. return "nil"
  80. }
  81. s := make([]string, 0, 5)
  82. s = append(s, "&filesync.BytesMessage{")
  83. s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n")
  84. s = append(s, "}")
  85. return strings.Join(s, "")
  86. }
  87. func valueToGoStringFilesync(v interface{}, typ string) string {
  88. rv := reflect.ValueOf(v)
  89. if rv.IsNil() {
  90. return "nil"
  91. }
  92. pv := reflect.Indirect(rv).Interface()
  93. return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
  94. }
  95. // Reference imports to suppress errors if they are not otherwise used.
  96. var _ context.Context
  97. var _ grpc.ClientConn
  98. // This is a compile-time assertion to ensure that this generated file
  99. // is compatible with the grpc package it is being compiled against.
  100. const _ = grpc.SupportPackageIsVersion4
  101. // Client API for FileSync service
  102. type FileSyncClient interface {
  103. DiffCopy(ctx context.Context, opts ...grpc.CallOption) (FileSync_DiffCopyClient, error)
  104. TarStream(ctx context.Context, opts ...grpc.CallOption) (FileSync_TarStreamClient, error)
  105. }
  106. type fileSyncClient struct {
  107. cc *grpc.ClientConn
  108. }
  109. func NewFileSyncClient(cc *grpc.ClientConn) FileSyncClient {
  110. return &fileSyncClient{cc}
  111. }
  112. func (c *fileSyncClient) DiffCopy(ctx context.Context, opts ...grpc.CallOption) (FileSync_DiffCopyClient, error) {
  113. stream, err := grpc.NewClientStream(ctx, &_FileSync_serviceDesc.Streams[0], c.cc, "/moby.filesync.v1.FileSync/DiffCopy", opts...)
  114. if err != nil {
  115. return nil, err
  116. }
  117. x := &fileSyncDiffCopyClient{stream}
  118. return x, nil
  119. }
  120. type FileSync_DiffCopyClient interface {
  121. Send(*BytesMessage) error
  122. Recv() (*BytesMessage, error)
  123. grpc.ClientStream
  124. }
  125. type fileSyncDiffCopyClient struct {
  126. grpc.ClientStream
  127. }
  128. func (x *fileSyncDiffCopyClient) Send(m *BytesMessage) error {
  129. return x.ClientStream.SendMsg(m)
  130. }
  131. func (x *fileSyncDiffCopyClient) Recv() (*BytesMessage, error) {
  132. m := new(BytesMessage)
  133. if err := x.ClientStream.RecvMsg(m); err != nil {
  134. return nil, err
  135. }
  136. return m, nil
  137. }
  138. func (c *fileSyncClient) TarStream(ctx context.Context, opts ...grpc.CallOption) (FileSync_TarStreamClient, error) {
  139. stream, err := grpc.NewClientStream(ctx, &_FileSync_serviceDesc.Streams[1], c.cc, "/moby.filesync.v1.FileSync/TarStream", opts...)
  140. if err != nil {
  141. return nil, err
  142. }
  143. x := &fileSyncTarStreamClient{stream}
  144. return x, nil
  145. }
  146. type FileSync_TarStreamClient interface {
  147. Send(*BytesMessage) error
  148. Recv() (*BytesMessage, error)
  149. grpc.ClientStream
  150. }
  151. type fileSyncTarStreamClient struct {
  152. grpc.ClientStream
  153. }
  154. func (x *fileSyncTarStreamClient) Send(m *BytesMessage) error {
  155. return x.ClientStream.SendMsg(m)
  156. }
  157. func (x *fileSyncTarStreamClient) Recv() (*BytesMessage, error) {
  158. m := new(BytesMessage)
  159. if err := x.ClientStream.RecvMsg(m); err != nil {
  160. return nil, err
  161. }
  162. return m, nil
  163. }
  164. // Server API for FileSync service
  165. type FileSyncServer interface {
  166. DiffCopy(FileSync_DiffCopyServer) error
  167. TarStream(FileSync_TarStreamServer) error
  168. }
  169. func RegisterFileSyncServer(s *grpc.Server, srv FileSyncServer) {
  170. s.RegisterService(&_FileSync_serviceDesc, srv)
  171. }
  172. func _FileSync_DiffCopy_Handler(srv interface{}, stream grpc.ServerStream) error {
  173. return srv.(FileSyncServer).DiffCopy(&fileSyncDiffCopyServer{stream})
  174. }
  175. type FileSync_DiffCopyServer interface {
  176. Send(*BytesMessage) error
  177. Recv() (*BytesMessage, error)
  178. grpc.ServerStream
  179. }
  180. type fileSyncDiffCopyServer struct {
  181. grpc.ServerStream
  182. }
  183. func (x *fileSyncDiffCopyServer) Send(m *BytesMessage) error {
  184. return x.ServerStream.SendMsg(m)
  185. }
  186. func (x *fileSyncDiffCopyServer) Recv() (*BytesMessage, error) {
  187. m := new(BytesMessage)
  188. if err := x.ServerStream.RecvMsg(m); err != nil {
  189. return nil, err
  190. }
  191. return m, nil
  192. }
  193. func _FileSync_TarStream_Handler(srv interface{}, stream grpc.ServerStream) error {
  194. return srv.(FileSyncServer).TarStream(&fileSyncTarStreamServer{stream})
  195. }
  196. type FileSync_TarStreamServer interface {
  197. Send(*BytesMessage) error
  198. Recv() (*BytesMessage, error)
  199. grpc.ServerStream
  200. }
  201. type fileSyncTarStreamServer struct {
  202. grpc.ServerStream
  203. }
  204. func (x *fileSyncTarStreamServer) Send(m *BytesMessage) error {
  205. return x.ServerStream.SendMsg(m)
  206. }
  207. func (x *fileSyncTarStreamServer) Recv() (*BytesMessage, error) {
  208. m := new(BytesMessage)
  209. if err := x.ServerStream.RecvMsg(m); err != nil {
  210. return nil, err
  211. }
  212. return m, nil
  213. }
  214. var _FileSync_serviceDesc = grpc.ServiceDesc{
  215. ServiceName: "moby.filesync.v1.FileSync",
  216. HandlerType: (*FileSyncServer)(nil),
  217. Methods: []grpc.MethodDesc{},
  218. Streams: []grpc.StreamDesc{
  219. {
  220. StreamName: "DiffCopy",
  221. Handler: _FileSync_DiffCopy_Handler,
  222. ServerStreams: true,
  223. ClientStreams: true,
  224. },
  225. {
  226. StreamName: "TarStream",
  227. Handler: _FileSync_TarStream_Handler,
  228. ServerStreams: true,
  229. ClientStreams: true,
  230. },
  231. },
  232. Metadata: "filesync.proto",
  233. }
  234. func (m *BytesMessage) Marshal() (dAtA []byte, err error) {
  235. size := m.Size()
  236. dAtA = make([]byte, size)
  237. n, err := m.MarshalTo(dAtA)
  238. if err != nil {
  239. return nil, err
  240. }
  241. return dAtA[:n], nil
  242. }
  243. func (m *BytesMessage) MarshalTo(dAtA []byte) (int, error) {
  244. var i int
  245. _ = i
  246. var l int
  247. _ = l
  248. if len(m.Data) > 0 {
  249. dAtA[i] = 0xa
  250. i++
  251. i = encodeVarintFilesync(dAtA, i, uint64(len(m.Data)))
  252. i += copy(dAtA[i:], m.Data)
  253. }
  254. return i, nil
  255. }
  256. func encodeFixed64Filesync(dAtA []byte, offset int, v uint64) int {
  257. dAtA[offset] = uint8(v)
  258. dAtA[offset+1] = uint8(v >> 8)
  259. dAtA[offset+2] = uint8(v >> 16)
  260. dAtA[offset+3] = uint8(v >> 24)
  261. dAtA[offset+4] = uint8(v >> 32)
  262. dAtA[offset+5] = uint8(v >> 40)
  263. dAtA[offset+6] = uint8(v >> 48)
  264. dAtA[offset+7] = uint8(v >> 56)
  265. return offset + 8
  266. }
  267. func encodeFixed32Filesync(dAtA []byte, offset int, v uint32) int {
  268. dAtA[offset] = uint8(v)
  269. dAtA[offset+1] = uint8(v >> 8)
  270. dAtA[offset+2] = uint8(v >> 16)
  271. dAtA[offset+3] = uint8(v >> 24)
  272. return offset + 4
  273. }
  274. func encodeVarintFilesync(dAtA []byte, offset int, v uint64) int {
  275. for v >= 1<<7 {
  276. dAtA[offset] = uint8(v&0x7f | 0x80)
  277. v >>= 7
  278. offset++
  279. }
  280. dAtA[offset] = uint8(v)
  281. return offset + 1
  282. }
  283. func (m *BytesMessage) Size() (n int) {
  284. var l int
  285. _ = l
  286. l = len(m.Data)
  287. if l > 0 {
  288. n += 1 + l + sovFilesync(uint64(l))
  289. }
  290. return n
  291. }
  292. func sovFilesync(x uint64) (n int) {
  293. for {
  294. n++
  295. x >>= 7
  296. if x == 0 {
  297. break
  298. }
  299. }
  300. return n
  301. }
  302. func sozFilesync(x uint64) (n int) {
  303. return sovFilesync(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  304. }
  305. func (this *BytesMessage) String() string {
  306. if this == nil {
  307. return "nil"
  308. }
  309. s := strings.Join([]string{`&BytesMessage{`,
  310. `Data:` + fmt.Sprintf("%v", this.Data) + `,`,
  311. `}`,
  312. }, "")
  313. return s
  314. }
  315. func valueToStringFilesync(v interface{}) string {
  316. rv := reflect.ValueOf(v)
  317. if rv.IsNil() {
  318. return "nil"
  319. }
  320. pv := reflect.Indirect(rv).Interface()
  321. return fmt.Sprintf("*%v", pv)
  322. }
  323. func (m *BytesMessage) Unmarshal(dAtA []byte) error {
  324. l := len(dAtA)
  325. iNdEx := 0
  326. for iNdEx < l {
  327. preIndex := iNdEx
  328. var wire uint64
  329. for shift := uint(0); ; shift += 7 {
  330. if shift >= 64 {
  331. return ErrIntOverflowFilesync
  332. }
  333. if iNdEx >= l {
  334. return io.ErrUnexpectedEOF
  335. }
  336. b := dAtA[iNdEx]
  337. iNdEx++
  338. wire |= (uint64(b) & 0x7F) << shift
  339. if b < 0x80 {
  340. break
  341. }
  342. }
  343. fieldNum := int32(wire >> 3)
  344. wireType := int(wire & 0x7)
  345. if wireType == 4 {
  346. return fmt.Errorf("proto: BytesMessage: wiretype end group for non-group")
  347. }
  348. if fieldNum <= 0 {
  349. return fmt.Errorf("proto: BytesMessage: illegal tag %d (wire type %d)", fieldNum, wire)
  350. }
  351. switch fieldNum {
  352. case 1:
  353. if wireType != 2 {
  354. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  355. }
  356. var byteLen int
  357. for shift := uint(0); ; shift += 7 {
  358. if shift >= 64 {
  359. return ErrIntOverflowFilesync
  360. }
  361. if iNdEx >= l {
  362. return io.ErrUnexpectedEOF
  363. }
  364. b := dAtA[iNdEx]
  365. iNdEx++
  366. byteLen |= (int(b) & 0x7F) << shift
  367. if b < 0x80 {
  368. break
  369. }
  370. }
  371. if byteLen < 0 {
  372. return ErrInvalidLengthFilesync
  373. }
  374. postIndex := iNdEx + byteLen
  375. if postIndex > l {
  376. return io.ErrUnexpectedEOF
  377. }
  378. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  379. if m.Data == nil {
  380. m.Data = []byte{}
  381. }
  382. iNdEx = postIndex
  383. default:
  384. iNdEx = preIndex
  385. skippy, err := skipFilesync(dAtA[iNdEx:])
  386. if err != nil {
  387. return err
  388. }
  389. if skippy < 0 {
  390. return ErrInvalidLengthFilesync
  391. }
  392. if (iNdEx + skippy) > l {
  393. return io.ErrUnexpectedEOF
  394. }
  395. iNdEx += skippy
  396. }
  397. }
  398. if iNdEx > l {
  399. return io.ErrUnexpectedEOF
  400. }
  401. return nil
  402. }
  403. func skipFilesync(dAtA []byte) (n int, err error) {
  404. l := len(dAtA)
  405. iNdEx := 0
  406. for iNdEx < l {
  407. var wire uint64
  408. for shift := uint(0); ; shift += 7 {
  409. if shift >= 64 {
  410. return 0, ErrIntOverflowFilesync
  411. }
  412. if iNdEx >= l {
  413. return 0, io.ErrUnexpectedEOF
  414. }
  415. b := dAtA[iNdEx]
  416. iNdEx++
  417. wire |= (uint64(b) & 0x7F) << shift
  418. if b < 0x80 {
  419. break
  420. }
  421. }
  422. wireType := int(wire & 0x7)
  423. switch wireType {
  424. case 0:
  425. for shift := uint(0); ; shift += 7 {
  426. if shift >= 64 {
  427. return 0, ErrIntOverflowFilesync
  428. }
  429. if iNdEx >= l {
  430. return 0, io.ErrUnexpectedEOF
  431. }
  432. iNdEx++
  433. if dAtA[iNdEx-1] < 0x80 {
  434. break
  435. }
  436. }
  437. return iNdEx, nil
  438. case 1:
  439. iNdEx += 8
  440. return iNdEx, nil
  441. case 2:
  442. var length int
  443. for shift := uint(0); ; shift += 7 {
  444. if shift >= 64 {
  445. return 0, ErrIntOverflowFilesync
  446. }
  447. if iNdEx >= l {
  448. return 0, io.ErrUnexpectedEOF
  449. }
  450. b := dAtA[iNdEx]
  451. iNdEx++
  452. length |= (int(b) & 0x7F) << shift
  453. if b < 0x80 {
  454. break
  455. }
  456. }
  457. iNdEx += length
  458. if length < 0 {
  459. return 0, ErrInvalidLengthFilesync
  460. }
  461. return iNdEx, nil
  462. case 3:
  463. for {
  464. var innerWire uint64
  465. var start int = iNdEx
  466. for shift := uint(0); ; shift += 7 {
  467. if shift >= 64 {
  468. return 0, ErrIntOverflowFilesync
  469. }
  470. if iNdEx >= l {
  471. return 0, io.ErrUnexpectedEOF
  472. }
  473. b := dAtA[iNdEx]
  474. iNdEx++
  475. innerWire |= (uint64(b) & 0x7F) << shift
  476. if b < 0x80 {
  477. break
  478. }
  479. }
  480. innerWireType := int(innerWire & 0x7)
  481. if innerWireType == 4 {
  482. break
  483. }
  484. next, err := skipFilesync(dAtA[start:])
  485. if err != nil {
  486. return 0, err
  487. }
  488. iNdEx = start + next
  489. }
  490. return iNdEx, nil
  491. case 4:
  492. return iNdEx, nil
  493. case 5:
  494. iNdEx += 4
  495. return iNdEx, nil
  496. default:
  497. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  498. }
  499. }
  500. panic("unreachable")
  501. }
  502. var (
  503. ErrInvalidLengthFilesync = fmt.Errorf("proto: negative length found during unmarshaling")
  504. ErrIntOverflowFilesync = fmt.Errorf("proto: integer overflow")
  505. )
  506. func init() { proto.RegisterFile("filesync.proto", fileDescriptorFilesync) }
  507. var fileDescriptorFilesync = []byte{
  508. // 198 bytes of a gzipped FileDescriptorProto
  509. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0xcb, 0xcc, 0x49,
  510. 0x2d, 0xae, 0xcc, 0x4b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xc8, 0xcd, 0x4f, 0xaa,
  511. 0xd4, 0x83, 0x0b, 0x96, 0x19, 0x2a, 0x29, 0x71, 0xf1, 0x38, 0x55, 0x96, 0xa4, 0x16, 0xfb, 0xa6,
  512. 0x16, 0x17, 0x27, 0xa6, 0xa7, 0x0a, 0x09, 0x71, 0xb1, 0xa4, 0x24, 0x96, 0x24, 0x4a, 0x30, 0x2a,
  513. 0x30, 0x6a, 0xf0, 0x04, 0x81, 0xd9, 0x46, 0xab, 0x19, 0xb9, 0x38, 0xdc, 0x32, 0x73, 0x52, 0x83,
  514. 0x2b, 0xf3, 0x92, 0x85, 0xfc, 0xb8, 0x38, 0x5c, 0x32, 0xd3, 0xd2, 0x9c, 0xf3, 0x0b, 0x2a, 0x85,
  515. 0xe4, 0xf4, 0xd0, 0xcd, 0xd3, 0x43, 0x36, 0x4c, 0x8a, 0x80, 0xbc, 0x06, 0xa3, 0x01, 0xa3, 0x90,
  516. 0x3f, 0x17, 0x67, 0x48, 0x62, 0x51, 0x70, 0x49, 0x51, 0x6a, 0x62, 0x2e, 0x35, 0x0c, 0x74, 0x32,
  517. 0xbb, 0xf0, 0x50, 0x8e, 0xe1, 0xc6, 0x43, 0x39, 0x86, 0x0f, 0x0f, 0xe5, 0x18, 0x1b, 0x1e, 0xc9,
  518. 0x31, 0xae, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e,
  519. 0xc9, 0x31, 0xbe, 0x78, 0x24, 0xc7, 0xf0, 0xe1, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x51,
  520. 0x1c, 0x30, 0xb3, 0x92, 0xd8, 0xc0, 0x41, 0x64, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x0c,
  521. 0x8d, 0xc5, 0x34, 0x01, 0x00, 0x00,
  522. }