2022-07-19 01:43:21 +02:00

2187 lines
51 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: service/sync/syncpb/protos/sync.proto
package syncpb
import (
fmt "fmt"
aclpb "github.com/anytypeio/go-anytype-infrastructure-experiments/pkg/acl/aclchanges/aclpb"
treepb "github.com/anytypeio/go-anytype-infrastructure-experiments/pkg/acl/treestorage/treepb"
proto "github.com/gogo/protobuf/proto"
io "io"
math "math"
math_bits "math/bits"
)
// 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.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type Sync struct {
}
func (m *Sync) Reset() { *m = Sync{} }
func (m *Sync) String() string { return proto.CompactTextString(m) }
func (*Sync) ProtoMessage() {}
func (*Sync) Descriptor() ([]byte, []int) {
return fileDescriptor_5f66cdd599c6466f, []int{0}
}
func (m *Sync) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Sync) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Sync.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 *Sync) XXX_Merge(src proto.Message) {
xxx_messageInfo_Sync.Merge(m, src)
}
func (m *Sync) XXX_Size() int {
return m.Size()
}
func (m *Sync) XXX_DiscardUnknown() {
xxx_messageInfo_Sync.DiscardUnknown(m)
}
var xxx_messageInfo_Sync proto.InternalMessageInfo
type SyncContent struct {
Message *SyncContentValue `protobuf:"bytes,1,opt,name=message,proto3" json:"message,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) GetMessage() *SyncContentValue {
if m != nil {
return m.Message
}
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 {
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"`
TreeId string `protobuf:"bytes,3,opt,name=treeId,proto3" json:"treeId,omitempty"`
SnapshotPath []string `protobuf:"bytes,4,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"`
TreeHeader *treepb.TreeHeader `protobuf:"bytes,5,opt,name=treeHeader,proto3" json:"treeHeader,omitempty"`
}
func (m *SyncHeadUpdate) Reset() { *m = SyncHeadUpdate{} }
func (m *SyncHeadUpdate) String() string { return proto.CompactTextString(m) }
func (*SyncHeadUpdate) ProtoMessage() {}
func (*SyncHeadUpdate) Descriptor() ([]byte, []int) {
return fileDescriptor_5f66cdd599c6466f, []int{0, 2}
}
func (m *SyncHeadUpdate) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *SyncHeadUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_SyncHeadUpdate.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 *SyncHeadUpdate) XXX_Merge(src proto.Message) {
xxx_messageInfo_SyncHeadUpdate.Merge(m, src)
}
func (m *SyncHeadUpdate) XXX_Size() int {
return m.Size()
}
func (m *SyncHeadUpdate) XXX_DiscardUnknown() {
xxx_messageInfo_SyncHeadUpdate.DiscardUnknown(m)
}
var xxx_messageInfo_SyncHeadUpdate proto.InternalMessageInfo
func (m *SyncHeadUpdate) GetHeads() []string {
if m != nil {
return m.Heads
}
return nil
}
func (m *SyncHeadUpdate) GetChanges() []*aclpb.RawChange {
if m != nil {
return m.Changes
}
return nil
}
func (m *SyncHeadUpdate) GetTreeId() string {
if m != nil {
return m.TreeId
}
return ""
}
func (m *SyncHeadUpdate) GetSnapshotPath() []string {
if m != nil {
return m.SnapshotPath
}
return nil
}
func (m *SyncHeadUpdate) GetTreeHeader() *treepb.TreeHeader {
if m != nil {
return m.TreeHeader
}
return nil
}
type SyncFull struct {
}
func (m *SyncFull) Reset() { *m = SyncFull{} }
func (m *SyncFull) String() string { return proto.CompactTextString(m) }
func (*SyncFull) ProtoMessage() {}
func (*SyncFull) Descriptor() ([]byte, []int) {
return fileDescriptor_5f66cdd599c6466f, []int{0, 3}
}
func (m *SyncFull) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *SyncFull) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_SyncFull.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 *SyncFull) XXX_Merge(src proto.Message) {
xxx_messageInfo_SyncFull.Merge(m, src)
}
func (m *SyncFull) XXX_Size() int {
return m.Size()
}
func (m *SyncFull) XXX_DiscardUnknown() {
xxx_messageInfo_SyncFull.DiscardUnknown(m)
}
var xxx_messageInfo_SyncFull proto.InternalMessageInfo
// here with send the request with all changes we have (we already know sender's snapshot path)
type SyncFullRequest struct {
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"`
TreeId string `protobuf:"bytes,3,opt,name=treeId,proto3" json:"treeId,omitempty"`
SnapshotPath []string `protobuf:"bytes,4,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"`
TreeHeader *treepb.TreeHeader `protobuf:"bytes,5,opt,name=treeHeader,proto3" json:"treeHeader,omitempty"`
}
func (m *SyncFullRequest) Reset() { *m = SyncFullRequest{} }
func (m *SyncFullRequest) String() string { return proto.CompactTextString(m) }
func (*SyncFullRequest) ProtoMessage() {}
func (*SyncFullRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5f66cdd599c6466f, []int{0, 3, 0}
}
func (m *SyncFullRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *SyncFullRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_SyncFullRequest.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 *SyncFullRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SyncFullRequest.Merge(m, src)
}
func (m *SyncFullRequest) XXX_Size() int {
return m.Size()
}
func (m *SyncFullRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SyncFullRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SyncFullRequest proto.InternalMessageInfo
func (m *SyncFullRequest) GetHeads() []string {
if m != nil {
return m.Heads
}
return nil
}
func (m *SyncFullRequest) GetChanges() []*aclpb.RawChange {
if m != nil {
return m.Changes
}
return nil
}
func (m *SyncFullRequest) GetTreeId() string {
if m != nil {
return m.TreeId
}
return ""
}
func (m *SyncFullRequest) GetSnapshotPath() []string {
if m != nil {
return m.SnapshotPath
}
return nil
}
func (m *SyncFullRequest) GetTreeHeader() *treepb.TreeHeader {
if m != nil {
return m.TreeHeader
}
return nil
}
type SyncFullResponse struct {
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"`
TreeId string `protobuf:"bytes,3,opt,name=treeId,proto3" json:"treeId,omitempty"`
SnapshotPath []string `protobuf:"bytes,4,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"`
TreeHeader *treepb.TreeHeader `protobuf:"bytes,5,opt,name=treeHeader,proto3" json:"treeHeader,omitempty"`
}
func (m *SyncFullResponse) Reset() { *m = SyncFullResponse{} }
func (m *SyncFullResponse) String() string { return proto.CompactTextString(m) }
func (*SyncFullResponse) ProtoMessage() {}
func (*SyncFullResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5f66cdd599c6466f, []int{0, 3, 1}
}
func (m *SyncFullResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *SyncFullResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_SyncFullResponse.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 *SyncFullResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_SyncFullResponse.Merge(m, src)
}
func (m *SyncFullResponse) XXX_Size() int {
return m.Size()
}
func (m *SyncFullResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SyncFullResponse.DiscardUnknown(m)
}
var xxx_messageInfo_SyncFullResponse proto.InternalMessageInfo
func (m *SyncFullResponse) GetHeads() []string {
if m != nil {
return m.Heads
}
return nil
}
func (m *SyncFullResponse) GetChanges() []*aclpb.RawChange {
if m != nil {
return m.Changes
}
return nil
}
func (m *SyncFullResponse) GetTreeId() string {
if m != nil {
return m.TreeId
}
return ""
}
func (m *SyncFullResponse) GetSnapshotPath() []string {
if m != nil {
return m.SnapshotPath
}
return nil
}
func (m *SyncFullResponse) GetTreeHeader() *treepb.TreeHeader {
if m != nil {
return m.TreeHeader
}
return nil
}
func init() {
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((*SyncFull)(nil), "sync.Sync.Full")
proto.RegisterType((*SyncFullRequest)(nil), "sync.Sync.Full.Request")
proto.RegisterType((*SyncFullResponse)(nil), "sync.Sync.Full.Response")
}
func init() {
proto.RegisterFile("service/sync/syncpb/protos/sync.proto", fileDescriptor_5f66cdd599c6466f)
}
var fileDescriptor_5f66cdd599c6466f = []byte{
// 421 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x53, 0xcd, 0xce, 0x93, 0x40,
0x14, 0x65, 0x5a, 0x0a, 0x7e, 0xf7, 0x6b, 0xb4, 0x99, 0xf8, 0x33, 0x61, 0x41, 0x48, 0x13, 0x13,
0x16, 0x86, 0xd6, 0xba, 0x70, 0xe3, 0xaa, 0x4d, 0x1a, 0xdc, 0x99, 0xf1, 0x67, 0xe1, 0x6e, 0x4a,
0x47, 0x30, 0x22, 0x20, 0x33, 0xd4, 0xf8, 0x16, 0xbe, 0x8d, 0xc6, 0x27, 0x70, 0xd9, 0xa5, 0x1b,
0xa3, 0x69, 0x1f, 0xc3, 0x8d, 0x99, 0x01, 0x0a, 0xda, 0x27, 0xe8, 0x02, 0x72, 0x7f, 0xce, 0x39,
0x9c, 0xcb, 0xcd, 0x85, 0xfb, 0x82, 0x97, 0xbb, 0xb7, 0x11, 0x9f, 0x89, 0x4f, 0x59, 0xa4, 0x5f,
0xc5, 0x66, 0x56, 0x94, 0xb9, 0xcc, 0x85, 0xce, 0x02, 0x1d, 0x63, 0x53, 0xc5, 0xce, 0xbc, 0x78,
0x17, 0xcf, 0x58, 0x94, 0xaa, 0x27, 0x4a, 0x58, 0x16, 0x73, 0xa1, 0xc2, 0x8e, 0xd1, 0xd5, 0x6b,
0x9e, 0xf3, 0xa0, 0x65, 0xc8, 0x92, 0x73, 0x21, 0xf3, 0x92, 0xc5, 0x5c, 0xc7, 0x1d, 0x47, 0x65,
0x35, 0x7a, 0xfa, 0xcb, 0x02, 0xf3, 0xb9, 0xfa, 0xd0, 0x13, 0xb0, 0x57, 0x79, 0x26, 0x79, 0x26,
0xf1, 0x43, 0xb0, 0xdf, 0x73, 0x21, 0x58, 0xcc, 0x09, 0xf2, 0x90, 0x7f, 0xbd, 0xb8, 0x17, 0x68,
0x5f, 0x0a, 0x17, 0x34, 0xa0, 0x57, 0x2c, 0xad, 0x38, 0x6d, 0x71, 0xce, 0x4f, 0x04, 0xe3, 0x7e,
0x07, 0x3f, 0x06, 0x48, 0x38, 0xdb, 0xbe, 0x2c, 0xb6, 0x4c, 0xb6, 0x32, 0x77, 0x7a, 0x32, 0xe1,
0xa9, 0x19, 0x1a, 0xb4, 0x07, 0xc5, 0x2b, 0xb8, 0xf5, 0xa6, 0x4a, 0x53, 0x05, 0xa2, 0xfc, 0x43,
0xc5, 0x85, 0x24, 0x83, 0x33, 0x13, 0xeb, 0x2a, 0x4d, 0x83, 0xa6, 0x1d, 0x1a, 0xf4, 0x7f, 0x06,
0x5e, 0xc3, 0xa4, 0x2b, 0x89, 0x22, 0xcf, 0x04, 0x27, 0x43, 0xad, 0x42, 0xce, 0x55, 0xea, 0x7e,
0x68, 0xd0, 0x33, 0xce, 0xd2, 0x86, 0xd1, 0x4e, 0x8d, 0xe3, 0x7c, 0x43, 0x00, 0x9d, 0x65, 0x7c,
0x1b, 0x46, 0xca, 0xb2, 0x20, 0xc8, 0x1b, 0xfa, 0x57, 0xb4, 0x4e, 0xb0, 0x0f, 0x76, 0xb3, 0x0a,
0x32, 0xf0, 0x86, 0xfe, 0xf5, 0xe2, 0x66, 0xc0, 0xa2, 0x34, 0xa0, 0xec, 0xe3, 0x4a, 0x97, 0x69,
0xdb, 0xc6, 0x77, 0xc1, 0x52, 0x3b, 0x78, 0xba, 0xd5, 0xae, 0xae, 0x68, 0x93, 0xe1, 0x29, 0x8c,
0x45, 0xc6, 0x0a, 0x91, 0xe4, 0xf2, 0x19, 0x93, 0x09, 0x31, 0xb5, 0xfc, 0x3f, 0x35, 0x3c, 0x07,
0x50, 0x68, 0xe5, 0x86, 0x97, 0x64, 0xa4, 0xa7, 0x9a, 0x04, 0x7a, 0xa5, 0x2f, 0x4e, 0x75, 0xda,
0xc3, 0x38, 0x7f, 0x06, 0x60, 0xaa, 0x59, 0x9d, 0x2f, 0x08, 0xec, 0xf6, 0x17, 0x5d, 0xd6, 0x08,
0x5f, 0x11, 0xdc, 0x68, 0xb7, 0x72, 0x59, 0xd6, 0x97, 0xde, 0xf7, 0x83, 0x8b, 0xf6, 0x07, 0x17,
0xfd, 0x3e, 0xb8, 0xe8, 0xf3, 0xd1, 0x35, 0xf6, 0x47, 0xd7, 0xf8, 0x71, 0x74, 0x8d, 0xd7, 0x56,
0x7d, 0xfb, 0x1b, 0x4b, 0x9f, 0xe2, 0xa3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3c, 0xed, 0x7d,
0xff, 0x19, 0x04, 0x00, 0x00,
}
func (m *Sync) 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 *Sync) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Sync) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
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 m.Message != nil {
{
size, err := m.Message.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) {
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 *SyncHeadUpdate) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *SyncHeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.TreeHeader != nil {
{
size, err := m.TreeHeader.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintSync(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x2a
}
if len(m.SnapshotPath) > 0 {
for iNdEx := len(m.SnapshotPath) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.SnapshotPath[iNdEx])
copy(dAtA[i:], m.SnapshotPath[iNdEx])
i = encodeVarintSync(dAtA, i, uint64(len(m.SnapshotPath[iNdEx])))
i--
dAtA[i] = 0x22
}
}
if len(m.TreeId) > 0 {
i -= len(m.TreeId)
copy(dAtA[i:], m.TreeId)
i = encodeVarintSync(dAtA, i, uint64(len(m.TreeId)))
i--
dAtA[i] = 0x1a
}
if len(m.Changes) > 0 {
for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintSync(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
}
if len(m.Heads) > 0 {
for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Heads[iNdEx])
copy(dAtA[i:], m.Heads[iNdEx])
i = encodeVarintSync(dAtA, i, uint64(len(m.Heads[iNdEx])))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *SyncFull) 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 *SyncFull) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *SyncFull) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func (m *SyncFullRequest) 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 *SyncFullRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *SyncFullRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.TreeHeader != nil {
{
size, err := m.TreeHeader.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintSync(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x2a
}
if len(m.SnapshotPath) > 0 {
for iNdEx := len(m.SnapshotPath) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.SnapshotPath[iNdEx])
copy(dAtA[i:], m.SnapshotPath[iNdEx])
i = encodeVarintSync(dAtA, i, uint64(len(m.SnapshotPath[iNdEx])))
i--
dAtA[i] = 0x22
}
}
if len(m.TreeId) > 0 {
i -= len(m.TreeId)
copy(dAtA[i:], m.TreeId)
i = encodeVarintSync(dAtA, i, uint64(len(m.TreeId)))
i--
dAtA[i] = 0x1a
}
if len(m.Changes) > 0 {
for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintSync(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
}
if len(m.Heads) > 0 {
for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Heads[iNdEx])
copy(dAtA[i:], m.Heads[iNdEx])
i = encodeVarintSync(dAtA, i, uint64(len(m.Heads[iNdEx])))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *SyncFullResponse) 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 *SyncFullResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *SyncFullResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.TreeHeader != nil {
{
size, err := m.TreeHeader.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintSync(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x2a
}
if len(m.SnapshotPath) > 0 {
for iNdEx := len(m.SnapshotPath) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.SnapshotPath[iNdEx])
copy(dAtA[i:], m.SnapshotPath[iNdEx])
i = encodeVarintSync(dAtA, i, uint64(len(m.SnapshotPath[iNdEx])))
i--
dAtA[i] = 0x22
}
}
if len(m.TreeId) > 0 {
i -= len(m.TreeId)
copy(dAtA[i:], m.TreeId)
i = encodeVarintSync(dAtA, i, uint64(len(m.TreeId)))
i--
dAtA[i] = 0x1a
}
if len(m.Changes) > 0 {
for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintSync(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
}
if len(m.Heads) > 0 {
for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Heads[iNdEx])
copy(dAtA[i:], m.Heads[iNdEx])
i = encodeVarintSync(dAtA, i, uint64(len(m.Heads[iNdEx])))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func encodeVarintSync(dAtA []byte, offset int, v uint64) int {
offset -= sovSync(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Sync) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func (m *SyncContent) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Message != nil {
l = m.Message.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) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Heads) > 0 {
for _, s := range m.Heads {
l = len(s)
n += 1 + l + sovSync(uint64(l))
}
}
if len(m.Changes) > 0 {
for _, e := range m.Changes {
l = e.Size()
n += 1 + l + sovSync(uint64(l))
}
}
l = len(m.TreeId)
if l > 0 {
n += 1 + l + sovSync(uint64(l))
}
if len(m.SnapshotPath) > 0 {
for _, s := range m.SnapshotPath {
l = len(s)
n += 1 + l + sovSync(uint64(l))
}
}
if m.TreeHeader != nil {
l = m.TreeHeader.Size()
n += 1 + l + sovSync(uint64(l))
}
return n
}
func (m *SyncFull) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func (m *SyncFullRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Heads) > 0 {
for _, s := range m.Heads {
l = len(s)
n += 1 + l + sovSync(uint64(l))
}
}
if len(m.Changes) > 0 {
for _, e := range m.Changes {
l = e.Size()
n += 1 + l + sovSync(uint64(l))
}
}
l = len(m.TreeId)
if l > 0 {
n += 1 + l + sovSync(uint64(l))
}
if len(m.SnapshotPath) > 0 {
for _, s := range m.SnapshotPath {
l = len(s)
n += 1 + l + sovSync(uint64(l))
}
}
if m.TreeHeader != nil {
l = m.TreeHeader.Size()
n += 1 + l + sovSync(uint64(l))
}
return n
}
func (m *SyncFullResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Heads) > 0 {
for _, s := range m.Heads {
l = len(s)
n += 1 + l + sovSync(uint64(l))
}
}
if len(m.Changes) > 0 {
for _, e := range m.Changes {
l = e.Size()
n += 1 + l + sovSync(uint64(l))
}
}
l = len(m.TreeId)
if l > 0 {
n += 1 + l + sovSync(uint64(l))
}
if len(m.SnapshotPath) > 0 {
for _, s := range m.SnapshotPath {
l = len(s)
n += 1 + l + sovSync(uint64(l))
}
}
if m.TreeHeader != nil {
l = m.TreeHeader.Size()
n += 1 + l + sovSync(uint64(l))
}
return n
}
func sovSync(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozSync(x uint64) (n int) {
return sovSync(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Sync) 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: Sync: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Sync: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
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 *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 Message", 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
}
if m.Message == nil {
m.Message = &SyncContentValue{}
}
if err := m.Message.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 {
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: HeadUpdate: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HeadUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Heads", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthSync
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthSync
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Heads = append(m.Heads, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Changes", 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.Changes = append(m.Changes, &aclpb.RawChange{})
if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TreeId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthSync
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthSync
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.TreeId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SnapshotPath", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthSync
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthSync
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SnapshotPath = append(m.SnapshotPath, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TreeHeader", 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
}
if m.TreeHeader == nil {
m.TreeHeader = &treepb.TreeHeader{}
}
if err := m.TreeHeader.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 *SyncFull) 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: Full: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Full: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
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 *SyncFullRequest) 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: Request: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Heads", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthSync
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthSync
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Heads = append(m.Heads, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Changes", 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.Changes = append(m.Changes, &aclpb.RawChange{})
if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TreeId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthSync
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthSync
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.TreeId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SnapshotPath", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthSync
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthSync
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SnapshotPath = append(m.SnapshotPath, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TreeHeader", 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
}
if m.TreeHeader == nil {
m.TreeHeader = &treepb.TreeHeader{}
}
if err := m.TreeHeader.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 *SyncFullResponse) 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: Response: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Heads", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthSync
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthSync
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Heads = append(m.Heads, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Changes", 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.Changes = append(m.Changes, &aclpb.RawChange{})
if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TreeId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthSync
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthSync
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.TreeId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SnapshotPath", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthSync
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthSync
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SnapshotPath = append(m.SnapshotPath, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TreeHeader", 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
}
if m.TreeHeader == nil {
m.TreeHeader = &treepb.TreeHeader{}
}
if err := m.TreeHeader.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 skipSync(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSync
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSync
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSync
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthSync
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupSync
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthSync
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthSync = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowSync = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupSync = fmt.Errorf("proto: unexpected end of group")
)