lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080)
This changes the BEP protocol to use protocol buffer serialization instead of XDR, and therefore also the database format. The local discovery protocol is also updated to be protocol buffer format. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3276 LGTM: AudriusButkevicius
This commit is contained in:
committed by
Audrius Butkevicius
parent
21f5b16e47
commit
fa0101bd60
69
vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go
generated
vendored
Normal file
69
vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
// Code generated by protoc-gen-gogo.
|
||||
// source: proto.proto
|
||||
// DO NOT EDIT!
|
||||
|
||||
/*
|
||||
Package importdedup is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
proto.proto
|
||||
|
||||
It has these top-level messages:
|
||||
Object
|
||||
*/
|
||||
package importdedup
|
||||
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "github.com/gogo/protobuf/gogoproto"
|
||||
import subpkg "github.com/gogo/protobuf/test/importdedup/subpkg"
|
||||
|
||||
import github_com_gogo_protobuf_test_importdedup_subpkg "github.com/gogo/protobuf/test/importdedup/subpkg"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
const _ = proto.GoGoProtoPackageIsVersion1
|
||||
|
||||
type Object struct {
|
||||
CustomField *github_com_gogo_protobuf_test_importdedup_subpkg.CustomType `protobuf:"bytes,1,opt,name=CustomField,json=customField,customtype=github.com/gogo/protobuf/test/importdedup/subpkg.CustomType" json:"CustomField,omitempty"`
|
||||
SubObject *subpkg.SubObject `protobuf:"bytes,2,opt,name=SubObject,json=subObject" json:"SubObject,omitempty"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Object) Reset() { *m = Object{} }
|
||||
func (m *Object) String() string { return proto.CompactTextString(m) }
|
||||
func (*Object) ProtoMessage() {}
|
||||
func (*Object) Descriptor() ([]byte, []int) { return fileDescriptorProto, []int{0} }
|
||||
|
||||
func (m *Object) GetSubObject() *subpkg.SubObject {
|
||||
if m != nil {
|
||||
return m.SubObject
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Object)(nil), "importdedup.Object")
|
||||
}
|
||||
|
||||
var fileDescriptorProto = []byte{
|
||||
// 178 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f,
|
||||
0xc9, 0xd7, 0x03, 0x93, 0x42, 0xdc, 0x99, 0xb9, 0x05, 0xf9, 0x45, 0x25, 0x29, 0xa9, 0x29, 0xa5,
|
||||
0x05, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9,
|
||||
0xe9, 0xf9, 0xfa, 0x60, 0x35, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x4a,
|
||||
0xd9, 0xe3, 0x54, 0x5e, 0x92, 0x5a, 0x5c, 0xa2, 0x8f, 0x64, 0xb2, 0x7e, 0x71, 0x69, 0x52, 0x41,
|
||||
0x76, 0x3a, 0x98, 0x42, 0x58, 0xae, 0x34, 0x87, 0x91, 0x8b, 0xcd, 0x3f, 0x29, 0x2b, 0x35, 0xb9,
|
||||
0x44, 0x28, 0x91, 0x8b, 0xdb, 0xb9, 0xb4, 0xb8, 0x24, 0x3f, 0xd7, 0x2d, 0x33, 0x35, 0x27, 0x45,
|
||||
0x82, 0x51, 0x81, 0x51, 0x83, 0xc7, 0xc9, 0xfe, 0xd6, 0x3d, 0x79, 0x6b, 0x52, 0x2d, 0xd1, 0x83,
|
||||
0x98, 0x13, 0x52, 0x59, 0x90, 0x1a, 0xc4, 0x9d, 0x8c, 0x30, 0x53, 0x48, 0x9f, 0x8b, 0x33, 0xb8,
|
||||
0x34, 0x09, 0x62, 0x9f, 0x04, 0x13, 0xd0, 0x02, 0x6e, 0x23, 0x41, 0x3d, 0xa8, 0x1e, 0xb8, 0x44,
|
||||
0x10, 0x67, 0x31, 0x8c, 0x09, 0x08, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x33, 0xcb, 0x76, 0x29, 0x01,
|
||||
0x00, 0x00,
|
||||
}
|
||||
29
vendor/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go
generated
vendored
Normal file
29
vendor/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved.
|
||||
// http://github.com/gogo/protobuf/gogoproto
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package subpkg
|
||||
|
||||
type CustomType struct{}
|
||||
51
vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go
generated
vendored
Normal file
51
vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
// Code generated by protoc-gen-gogo.
|
||||
// source: subpkg/subproto.proto
|
||||
// DO NOT EDIT!
|
||||
|
||||
/*
|
||||
Package subpkg is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
subpkg/subproto.proto
|
||||
|
||||
It has these top-level messages:
|
||||
SubObject
|
||||
*/
|
||||
package subpkg
|
||||
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "github.com/gogo/protobuf/gogoproto"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
const _ = proto.GoGoProtoPackageIsVersion1
|
||||
|
||||
type SubObject struct {
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SubObject) Reset() { *m = SubObject{} }
|
||||
func (m *SubObject) String() string { return proto.CompactTextString(m) }
|
||||
func (*SubObject) ProtoMessage() {}
|
||||
func (*SubObject) Descriptor() ([]byte, []int) { return fileDescriptorSubproto, []int{0} }
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*SubObject)(nil), "subpkg.SubObject")
|
||||
}
|
||||
|
||||
var fileDescriptorSubproto = []byte{
|
||||
// 88 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x2d, 0x2e, 0x4d, 0x2a,
|
||||
0xc8, 0x4e, 0xd7, 0x07, 0x51, 0x45, 0xf9, 0x25, 0xf9, 0x7a, 0x60, 0x52, 0x88, 0x0d, 0x22, 0x2c,
|
||||
0xa5, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9e, 0x9f, 0x9e,
|
||||
0xaf, 0x0f, 0x96, 0x4e, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x4d, 0x89, 0x9b,
|
||||
0x8b, 0x33, 0xb8, 0x34, 0xc9, 0x3f, 0x29, 0x2b, 0x35, 0xb9, 0x04, 0x10, 0x00, 0x00, 0xff, 0xff,
|
||||
0x4e, 0x38, 0xf3, 0x28, 0x5b, 0x00, 0x00, 0x00,
|
||||
}
|
||||
Reference in New Issue
Block a user