Add oneof to sync proto
This commit is contained in:
parent
65114e2ea9
commit
55d07ca757
@ -6,6 +6,18 @@ import "pkg/acl/aclchanges/aclpb/protos/aclchanges.proto";
|
|||||||
import "pkg/acl/treestorage/treepb/protos/tree.proto";
|
import "pkg/acl/treestorage/treepb/protos/tree.proto";
|
||||||
|
|
||||||
message Sync {
|
message Sync {
|
||||||
|
message Content {
|
||||||
|
repeated ContentValue messages = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ContentValue {
|
||||||
|
oneof value {
|
||||||
|
HeadUpdate headUpdate = 1;
|
||||||
|
Full.Request fullSyncRequest = 2;
|
||||||
|
Full.Response fullSyncResponse = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
message HeadUpdate {
|
message HeadUpdate {
|
||||||
repeated string heads = 1;
|
repeated string heads = 1;
|
||||||
repeated acl.RawChange changes = 2;
|
repeated acl.RawChange changes = 2;
|
||||||
|
|||||||
@ -60,6 +60,148 @@ func (m *Sync) XXX_DiscardUnknown() {
|
|||||||
|
|
||||||
var xxx_messageInfo_Sync proto.InternalMessageInfo
|
var xxx_messageInfo_Sync proto.InternalMessageInfo
|
||||||
|
|
||||||
|
type SyncContent struct {
|
||||||
|
Messages []*SyncContentValue `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContent) Reset() { *m = SyncContent{} }
|
||||||
|
func (m *SyncContent) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*SyncContent) ProtoMessage() {}
|
||||||
|
func (*SyncContent) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_5f66cdd599c6466f, []int{0, 0}
|
||||||
|
}
|
||||||
|
func (m *SyncContent) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *SyncContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_SyncContent.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *SyncContent) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_SyncContent.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *SyncContent) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *SyncContent) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_SyncContent.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_SyncContent proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *SyncContent) GetMessages() []*SyncContentValue {
|
||||||
|
if m != nil {
|
||||||
|
return m.Messages
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type SyncContentValue struct {
|
||||||
|
// Types that are valid to be assigned to Value:
|
||||||
|
// *SyncContentValueValueOfHeadUpdate
|
||||||
|
// *SyncContentValueValueOfFullSyncRequest
|
||||||
|
// *SyncContentValueValueOfFullSyncResponse
|
||||||
|
Value IsSyncContentValueValue `protobuf_oneof:"value"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContentValue) Reset() { *m = SyncContentValue{} }
|
||||||
|
func (m *SyncContentValue) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*SyncContentValue) ProtoMessage() {}
|
||||||
|
func (*SyncContentValue) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_5f66cdd599c6466f, []int{0, 1}
|
||||||
|
}
|
||||||
|
func (m *SyncContentValue) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *SyncContentValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_SyncContentValue.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *SyncContentValue) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_SyncContentValue.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *SyncContentValue) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *SyncContentValue) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_SyncContentValue.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_SyncContentValue proto.InternalMessageInfo
|
||||||
|
|
||||||
|
type IsSyncContentValueValue interface {
|
||||||
|
IsSyncContentValueValue()
|
||||||
|
MarshalTo([]byte) (int, error)
|
||||||
|
Size() int
|
||||||
|
}
|
||||||
|
|
||||||
|
type SyncContentValueValueOfHeadUpdate struct {
|
||||||
|
HeadUpdate *SyncHeadUpdate `protobuf:"bytes,1,opt,name=headUpdate,proto3,oneof" json:"headUpdate,omitempty"`
|
||||||
|
}
|
||||||
|
type SyncContentValueValueOfFullSyncRequest struct {
|
||||||
|
FullSyncRequest *SyncFullRequest `protobuf:"bytes,2,opt,name=fullSyncRequest,proto3,oneof" json:"fullSyncRequest,omitempty"`
|
||||||
|
}
|
||||||
|
type SyncContentValueValueOfFullSyncResponse struct {
|
||||||
|
FullSyncResponse *SyncFullResponse `protobuf:"bytes,3,opt,name=fullSyncResponse,proto3,oneof" json:"fullSyncResponse,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*SyncContentValueValueOfHeadUpdate) IsSyncContentValueValue() {}
|
||||||
|
func (*SyncContentValueValueOfFullSyncRequest) IsSyncContentValueValue() {}
|
||||||
|
func (*SyncContentValueValueOfFullSyncResponse) IsSyncContentValueValue() {}
|
||||||
|
|
||||||
|
func (m *SyncContentValue) GetValue() IsSyncContentValueValue {
|
||||||
|
if m != nil {
|
||||||
|
return m.Value
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContentValue) GetHeadUpdate() *SyncHeadUpdate {
|
||||||
|
if x, ok := m.GetValue().(*SyncContentValueValueOfHeadUpdate); ok {
|
||||||
|
return x.HeadUpdate
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContentValue) GetFullSyncRequest() *SyncFullRequest {
|
||||||
|
if x, ok := m.GetValue().(*SyncContentValueValueOfFullSyncRequest); ok {
|
||||||
|
return x.FullSyncRequest
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContentValue) GetFullSyncResponse() *SyncFullResponse {
|
||||||
|
if x, ok := m.GetValue().(*SyncContentValueValueOfFullSyncResponse); ok {
|
||||||
|
return x.FullSyncResponse
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||||
|
func (*SyncContentValue) XXX_OneofWrappers() []interface{} {
|
||||||
|
return []interface{}{
|
||||||
|
(*SyncContentValueValueOfHeadUpdate)(nil),
|
||||||
|
(*SyncContentValueValueOfFullSyncRequest)(nil),
|
||||||
|
(*SyncContentValueValueOfFullSyncResponse)(nil),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type SyncHeadUpdate struct {
|
type SyncHeadUpdate struct {
|
||||||
Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"`
|
Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"`
|
||||||
Changes []*aclpb.RawChange `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"`
|
Changes []*aclpb.RawChange `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"`
|
||||||
@ -72,7 +214,7 @@ func (m *SyncHeadUpdate) Reset() { *m = SyncHeadUpdate{} }
|
|||||||
func (m *SyncHeadUpdate) String() string { return proto.CompactTextString(m) }
|
func (m *SyncHeadUpdate) String() string { return proto.CompactTextString(m) }
|
||||||
func (*SyncHeadUpdate) ProtoMessage() {}
|
func (*SyncHeadUpdate) ProtoMessage() {}
|
||||||
func (*SyncHeadUpdate) Descriptor() ([]byte, []int) {
|
func (*SyncHeadUpdate) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_5f66cdd599c6466f, []int{0, 0}
|
return fileDescriptor_5f66cdd599c6466f, []int{0, 2}
|
||||||
}
|
}
|
||||||
func (m *SyncHeadUpdate) XXX_Unmarshal(b []byte) error {
|
func (m *SyncHeadUpdate) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -143,7 +285,7 @@ func (m *SyncFull) Reset() { *m = SyncFull{} }
|
|||||||
func (m *SyncFull) String() string { return proto.CompactTextString(m) }
|
func (m *SyncFull) String() string { return proto.CompactTextString(m) }
|
||||||
func (*SyncFull) ProtoMessage() {}
|
func (*SyncFull) ProtoMessage() {}
|
||||||
func (*SyncFull) Descriptor() ([]byte, []int) {
|
func (*SyncFull) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_5f66cdd599c6466f, []int{0, 1}
|
return fileDescriptor_5f66cdd599c6466f, []int{0, 3}
|
||||||
}
|
}
|
||||||
func (m *SyncFull) XXX_Unmarshal(b []byte) error {
|
func (m *SyncFull) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -185,7 +327,7 @@ func (m *SyncFullRequest) Reset() { *m = SyncFullRequest{} }
|
|||||||
func (m *SyncFullRequest) String() string { return proto.CompactTextString(m) }
|
func (m *SyncFullRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*SyncFullRequest) ProtoMessage() {}
|
func (*SyncFullRequest) ProtoMessage() {}
|
||||||
func (*SyncFullRequest) Descriptor() ([]byte, []int) {
|
func (*SyncFullRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_5f66cdd599c6466f, []int{0, 1, 0}
|
return fileDescriptor_5f66cdd599c6466f, []int{0, 3, 0}
|
||||||
}
|
}
|
||||||
func (m *SyncFullRequest) XXX_Unmarshal(b []byte) error {
|
func (m *SyncFullRequest) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -261,7 +403,7 @@ func (m *SyncFullResponse) Reset() { *m = SyncFullResponse{} }
|
|||||||
func (m *SyncFullResponse) String() string { return proto.CompactTextString(m) }
|
func (m *SyncFullResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*SyncFullResponse) ProtoMessage() {}
|
func (*SyncFullResponse) ProtoMessage() {}
|
||||||
func (*SyncFullResponse) Descriptor() ([]byte, []int) {
|
func (*SyncFullResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_5f66cdd599c6466f, []int{0, 1, 1}
|
return fileDescriptor_5f66cdd599c6466f, []int{0, 3, 1}
|
||||||
}
|
}
|
||||||
func (m *SyncFullResponse) XXX_Unmarshal(b []byte) error {
|
func (m *SyncFullResponse) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -327,6 +469,8 @@ func (m *SyncFullResponse) GetTreeHeader() *treepb.TreeHeader {
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*Sync)(nil), "sync.Sync")
|
proto.RegisterType((*Sync)(nil), "sync.Sync")
|
||||||
|
proto.RegisterType((*SyncContent)(nil), "sync.Sync.Content")
|
||||||
|
proto.RegisterType((*SyncContentValue)(nil), "sync.Sync.ContentValue")
|
||||||
proto.RegisterType((*SyncHeadUpdate)(nil), "sync.Sync.HeadUpdate")
|
proto.RegisterType((*SyncHeadUpdate)(nil), "sync.Sync.HeadUpdate")
|
||||||
proto.RegisterType((*SyncFull)(nil), "sync.Sync.Full")
|
proto.RegisterType((*SyncFull)(nil), "sync.Sync.Full")
|
||||||
proto.RegisterType((*SyncFullRequest)(nil), "sync.Sync.Full.Request")
|
proto.RegisterType((*SyncFullRequest)(nil), "sync.Sync.Full.Request")
|
||||||
@ -338,27 +482,34 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var fileDescriptor_5f66cdd599c6466f = []byte{
|
var fileDescriptor_5f66cdd599c6466f = []byte{
|
||||||
// 314 bytes of a gzipped FileDescriptorProto
|
// 426 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x52, 0xc1, 0x4a, 0xc3, 0x30,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x53, 0xbd, 0x8e, 0xd3, 0x40,
|
||||||
0x18, 0x5e, 0xb6, 0x6e, 0x73, 0xff, 0x44, 0x24, 0x88, 0x94, 0x1e, 0x42, 0x19, 0x08, 0x3d, 0x48,
|
0x10, 0xf6, 0xe6, 0x1c, 0xfb, 0x6e, 0xee, 0x04, 0xa7, 0x15, 0x3f, 0x2b, 0x17, 0x56, 0x74, 0x12,
|
||||||
0x37, 0xe6, 0x1b, 0x28, 0x88, 0xde, 0x24, 0xea, 0xc5, 0x5b, 0xd6, 0xfe, 0xac, 0x62, 0x69, 0x63,
|
0x52, 0x0a, 0xe4, 0x9c, 0x2e, 0x05, 0x1d, 0x45, 0x22, 0x45, 0xa6, 0x43, 0xcb, 0x4f, 0x41, 0xb7,
|
||||||
0x93, 0x29, 0xbe, 0x85, 0x6f, 0xa3, 0x78, 0xf3, 0xe6, 0x71, 0x47, 0x8f, 0xd2, 0x3e, 0x86, 0x17,
|
0x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, 0xc8, 0x24, 0x57, 0xcf, 0x85, 0x4a, 0x98, 0x6d,
|
||||||
|
0xda, 0xff, 0x57, 0xa3, 0xd7, 0x00, 0x9a, 0xad, 0xdd, 0x60, 0xc9, 0x86, 0x66, 0xaa, 0xcb, 0xc0,
|
||||||
|
0x1c, 0xf5, 0xe5, 0xbe, 0xce, 0x7b, 0x1c, 0xef, 0xef, 0x00, 0x6c, 0x3d, 0xab, 0xf7, 0x95, 0x80,
|
||||||
|
0xdb, 0xae, 0xe8, 0xb8, 0x46, 0xf8, 0x46, 0xe0, 0xb4, 0xbd, 0xca, 0x71, 0x59, 0x9f, 0x8d, 0x7e,
|
||||||
|
0x6c, 0x7d, 0xb2, 0xd9, 0xfa, 0xe4, 0xf7, 0xd6, 0x27, 0x5f, 0x76, 0xbe, 0xb5, 0xd9, 0xf9, 0xd6,
|
||||||
|
0xcf, 0x9d, 0x6f, 0xbd, 0x71, 0xea, 0xd7, 0xbf, 0x74, 0xcc, 0x63, 0x9c, 0xfe, 0x0b, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0xbf, 0x4d, 0x45, 0xd4, 0x1b, 0x04, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Sync) Marshal() (dAtA []byte, err error) {
|
func (m *Sync) Marshal() (dAtA []byte, err error) {
|
||||||
@ -384,6 +535,138 @@ func (m *Sync) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
return len(dAtA) - i, nil
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *SyncContent) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContent) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContent) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.Messages) > 0 {
|
||||||
|
for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
|
{
|
||||||
|
size, err := m.Messages[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintSync(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContentValue) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContentValue) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContentValue) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Value != nil {
|
||||||
|
{
|
||||||
|
size := m.Value.Size()
|
||||||
|
i -= size
|
||||||
|
if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContentValueValueOfHeadUpdate) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContentValueValueOfHeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
if m.HeadUpdate != nil {
|
||||||
|
{
|
||||||
|
size, err := m.HeadUpdate.MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintSync(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
func (m *SyncContentValueValueOfFullSyncRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContentValueValueOfFullSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
if m.FullSyncRequest != nil {
|
||||||
|
{
|
||||||
|
size, err := m.FullSyncRequest.MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintSync(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
func (m *SyncContentValueValueOfFullSyncResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContentValueValueOfFullSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
if m.FullSyncResponse != nil {
|
||||||
|
{
|
||||||
|
size, err := m.FullSyncResponse.MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintSync(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
func (m *SyncHeadUpdate) Marshal() (dAtA []byte, err error) {
|
func (m *SyncHeadUpdate) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
@ -649,6 +932,69 @@ func (m *Sync) Size() (n int) {
|
|||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *SyncContent) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.Messages) > 0 {
|
||||||
|
for _, e := range m.Messages {
|
||||||
|
l = e.Size()
|
||||||
|
n += 1 + l + sovSync(uint64(l))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContentValue) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Value != nil {
|
||||||
|
n += m.Value.Size()
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SyncContentValueValueOfHeadUpdate) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.HeadUpdate != nil {
|
||||||
|
l = m.HeadUpdate.Size()
|
||||||
|
n += 1 + l + sovSync(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
func (m *SyncContentValueValueOfFullSyncRequest) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.FullSyncRequest != nil {
|
||||||
|
l = m.FullSyncRequest.Size()
|
||||||
|
n += 1 + l + sovSync(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
func (m *SyncContentValueValueOfFullSyncResponse) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.FullSyncResponse != nil {
|
||||||
|
l = m.FullSyncResponse.Size()
|
||||||
|
n += 1 + l + sovSync(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
func (m *SyncHeadUpdate) Size() (n int) {
|
func (m *SyncHeadUpdate) Size() (n int) {
|
||||||
if m == nil {
|
if m == nil {
|
||||||
return 0
|
return 0
|
||||||
@ -819,6 +1165,245 @@ func (m *Sync) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (m *SyncContent) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowSync
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: Content: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: Content: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowSync
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthSync
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthSync
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Messages = append(m.Messages, &SyncContentValue{})
|
||||||
|
if err := m.Messages[len(m.Messages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipSync(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthSync
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *SyncContentValue) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowSync
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: ContentValue: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: ContentValue: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field HeadUpdate", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowSync
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthSync
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthSync
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
v := &SyncHeadUpdate{}
|
||||||
|
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
m.Value = &SyncContentValueValueOfHeadUpdate{v}
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 2:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field FullSyncRequest", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowSync
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthSync
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthSync
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
v := &SyncFullRequest{}
|
||||||
|
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
m.Value = &SyncContentValueValueOfFullSyncRequest{v}
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 3:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field FullSyncResponse", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowSync
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthSync
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthSync
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
v := &SyncFullResponse{}
|
||||||
|
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
m.Value = &SyncContentValueValueOfFullSyncResponse{v}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipSync(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthSync
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (m *SyncHeadUpdate) Unmarshal(dAtA []byte) error {
|
func (m *SyncHeadUpdate) Unmarshal(dAtA []byte) error {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user