1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00
any-sync/consensus/consensusproto/consensus.pb.go
2024-08-02 11:14:12 +02:00

4299 lines
100 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: consensus/consensusproto/protos/consensus.proto
package consensusproto
import (
fmt "fmt"
proto "github.com/anyproto/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 ErrCodes int32
const (
ErrCodes_Unexpected ErrCodes = 0
ErrCodes_LogExists ErrCodes = 1
ErrCodes_LogNotFound ErrCodes = 2
ErrCodes_RecordConflict ErrCodes = 3
ErrCodes_Forbidden ErrCodes = 4
ErrCodes_InvalidPayload ErrCodes = 5
ErrCodes_ErrorOffset ErrCodes = 500
)
var ErrCodes_name = map[int32]string{
0: "Unexpected",
1: "LogExists",
2: "LogNotFound",
3: "RecordConflict",
4: "Forbidden",
5: "InvalidPayload",
500: "ErrorOffset",
}
var ErrCodes_value = map[string]int32{
"Unexpected": 0,
"LogExists": 1,
"LogNotFound": 2,
"RecordConflict": 3,
"Forbidden": 4,
"InvalidPayload": 5,
"ErrorOffset": 500,
}
func (x ErrCodes) String() string {
return proto.EnumName(ErrCodes_name, int32(x))
}
func (ErrCodes) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{0}
}
type Log struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Records []*RawRecordWithId `protobuf:"bytes,3,rep,name=records,proto3" json:"records,omitempty"`
}
func (m *Log) Reset() { *m = Log{} }
func (m *Log) String() string { return proto.CompactTextString(m) }
func (*Log) ProtoMessage() {}
func (*Log) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{0}
}
func (m *Log) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Log.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 *Log) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *Log) XXX_Merge(src proto.Message) {
xxx_messageInfo_Log.Merge(m, src)
}
func (m *Log) XXX_Size() int {
return m.Size()
}
func (m *Log) XXX_DiscardUnknown() {
xxx_messageInfo_Log.DiscardUnknown(m)
}
var xxx_messageInfo_Log proto.InternalMessageInfo
func (m *Log) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Log) GetRecords() []*RawRecordWithId {
if m != nil {
return m.Records
}
return nil
}
// RawRecord is a proto message containing the payload in bytes, signature of the account who added it and signature of the acceptor
type RawRecord struct {
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
AcceptorIdentity []byte `protobuf:"bytes,3,opt,name=acceptorIdentity,proto3" json:"acceptorIdentity,omitempty"`
AcceptorSignature []byte `protobuf:"bytes,4,opt,name=acceptorSignature,proto3" json:"acceptorSignature,omitempty"`
AcceptorTimestamp int64 `protobuf:"varint,5,opt,name=acceptorTimestamp,proto3" json:"acceptorTimestamp,omitempty"`
}
func (m *RawRecord) Reset() { *m = RawRecord{} }
func (m *RawRecord) String() string { return proto.CompactTextString(m) }
func (*RawRecord) ProtoMessage() {}
func (*RawRecord) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{1}
}
func (m *RawRecord) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *RawRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_RawRecord.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 *RawRecord) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *RawRecord) XXX_Merge(src proto.Message) {
xxx_messageInfo_RawRecord.Merge(m, src)
}
func (m *RawRecord) XXX_Size() int {
return m.Size()
}
func (m *RawRecord) XXX_DiscardUnknown() {
xxx_messageInfo_RawRecord.DiscardUnknown(m)
}
var xxx_messageInfo_RawRecord proto.InternalMessageInfo
func (m *RawRecord) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func (m *RawRecord) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
func (m *RawRecord) GetAcceptorIdentity() []byte {
if m != nil {
return m.AcceptorIdentity
}
return nil
}
func (m *RawRecord) GetAcceptorSignature() []byte {
if m != nil {
return m.AcceptorSignature
}
return nil
}
func (m *RawRecord) GetAcceptorTimestamp() int64 {
if m != nil {
return m.AcceptorTimestamp
}
return 0
}
// RawRecordWithId is a raw record and the id for convenience
type RawRecordWithId struct {
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
}
func (m *RawRecordWithId) Reset() { *m = RawRecordWithId{} }
func (m *RawRecordWithId) String() string { return proto.CompactTextString(m) }
func (*RawRecordWithId) ProtoMessage() {}
func (*RawRecordWithId) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{2}
}
func (m *RawRecordWithId) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *RawRecordWithId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_RawRecordWithId.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 *RawRecordWithId) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *RawRecordWithId) XXX_Merge(src proto.Message) {
xxx_messageInfo_RawRecordWithId.Merge(m, src)
}
func (m *RawRecordWithId) XXX_Size() int {
return m.Size()
}
func (m *RawRecordWithId) XXX_DiscardUnknown() {
xxx_messageInfo_RawRecordWithId.DiscardUnknown(m)
}
var xxx_messageInfo_RawRecordWithId proto.InternalMessageInfo
func (m *RawRecordWithId) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func (m *RawRecordWithId) GetId() string {
if m != nil {
return m.Id
}
return ""
}
// Record is a record containing a data
type Record struct {
PrevId string `protobuf:"bytes,1,opt,name=prevId,proto3" json:"prevId,omitempty"`
Identity []byte `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}
func (m *Record) Reset() { *m = Record{} }
func (m *Record) String() string { return proto.CompactTextString(m) }
func (*Record) ProtoMessage() {}
func (*Record) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{3}
}
func (m *Record) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Record.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 *Record) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *Record) XXX_Merge(src proto.Message) {
xxx_messageInfo_Record.Merge(m, src)
}
func (m *Record) XXX_Size() int {
return m.Size()
}
func (m *Record) XXX_DiscardUnknown() {
xxx_messageInfo_Record.DiscardUnknown(m)
}
var xxx_messageInfo_Record proto.InternalMessageInfo
func (m *Record) GetPrevId() string {
if m != nil {
return m.PrevId
}
return ""
}
func (m *Record) GetIdentity() []byte {
if m != nil {
return m.Identity
}
return nil
}
func (m *Record) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func (m *Record) GetTimestamp() int64 {
if m != nil {
return m.Timestamp
}
return 0
}
type Ok struct {
}
func (m *Ok) Reset() { *m = Ok{} }
func (m *Ok) String() string { return proto.CompactTextString(m) }
func (*Ok) ProtoMessage() {}
func (*Ok) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{4}
}
func (m *Ok) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Ok) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Ok.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 *Ok) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *Ok) XXX_Merge(src proto.Message) {
xxx_messageInfo_Ok.Merge(m, src)
}
func (m *Ok) XXX_Size() int {
return m.Size()
}
func (m *Ok) XXX_DiscardUnknown() {
xxx_messageInfo_Ok.DiscardUnknown(m)
}
var xxx_messageInfo_Ok proto.InternalMessageInfo
type LogAddRequest struct {
LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"`
// first record in the log, consensus node not sign it
Record *RawRecordWithId `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
}
func (m *LogAddRequest) Reset() { *m = LogAddRequest{} }
func (m *LogAddRequest) String() string { return proto.CompactTextString(m) }
func (*LogAddRequest) ProtoMessage() {}
func (*LogAddRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{5}
}
func (m *LogAddRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *LogAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_LogAddRequest.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 *LogAddRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *LogAddRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogAddRequest.Merge(m, src)
}
func (m *LogAddRequest) XXX_Size() int {
return m.Size()
}
func (m *LogAddRequest) XXX_DiscardUnknown() {
xxx_messageInfo_LogAddRequest.DiscardUnknown(m)
}
var xxx_messageInfo_LogAddRequest proto.InternalMessageInfo
func (m *LogAddRequest) GetLogId() string {
if m != nil {
return m.LogId
}
return ""
}
func (m *LogAddRequest) GetRecord() *RawRecordWithId {
if m != nil {
return m.Record
}
return nil
}
type RecordAddRequest struct {
LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"`
Record *RawRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
}
func (m *RecordAddRequest) Reset() { *m = RecordAddRequest{} }
func (m *RecordAddRequest) String() string { return proto.CompactTextString(m) }
func (*RecordAddRequest) ProtoMessage() {}
func (*RecordAddRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{6}
}
func (m *RecordAddRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *RecordAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_RecordAddRequest.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 *RecordAddRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *RecordAddRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_RecordAddRequest.Merge(m, src)
}
func (m *RecordAddRequest) XXX_Size() int {
return m.Size()
}
func (m *RecordAddRequest) XXX_DiscardUnknown() {
xxx_messageInfo_RecordAddRequest.DiscardUnknown(m)
}
var xxx_messageInfo_RecordAddRequest proto.InternalMessageInfo
func (m *RecordAddRequest) GetLogId() string {
if m != nil {
return m.LogId
}
return ""
}
func (m *RecordAddRequest) GetRecord() *RawRecord {
if m != nil {
return m.Record
}
return nil
}
type LogWatchRequest struct {
WatchIds []string `protobuf:"bytes,1,rep,name=watchIds,proto3" json:"watchIds,omitempty"`
UnwatchIds []string `protobuf:"bytes,2,rep,name=unwatchIds,proto3" json:"unwatchIds,omitempty"`
}
func (m *LogWatchRequest) Reset() { *m = LogWatchRequest{} }
func (m *LogWatchRequest) String() string { return proto.CompactTextString(m) }
func (*LogWatchRequest) ProtoMessage() {}
func (*LogWatchRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{7}
}
func (m *LogWatchRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *LogWatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_LogWatchRequest.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 *LogWatchRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *LogWatchRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogWatchRequest.Merge(m, src)
}
func (m *LogWatchRequest) XXX_Size() int {
return m.Size()
}
func (m *LogWatchRequest) XXX_DiscardUnknown() {
xxx_messageInfo_LogWatchRequest.DiscardUnknown(m)
}
var xxx_messageInfo_LogWatchRequest proto.InternalMessageInfo
func (m *LogWatchRequest) GetWatchIds() []string {
if m != nil {
return m.WatchIds
}
return nil
}
func (m *LogWatchRequest) GetUnwatchIds() []string {
if m != nil {
return m.UnwatchIds
}
return nil
}
type LogWatchEvent struct {
LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"`
Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
Error *Err `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
}
func (m *LogWatchEvent) Reset() { *m = LogWatchEvent{} }
func (m *LogWatchEvent) String() string { return proto.CompactTextString(m) }
func (*LogWatchEvent) ProtoMessage() {}
func (*LogWatchEvent) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{8}
}
func (m *LogWatchEvent) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *LogWatchEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_LogWatchEvent.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 *LogWatchEvent) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *LogWatchEvent) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogWatchEvent.Merge(m, src)
}
func (m *LogWatchEvent) XXX_Size() int {
return m.Size()
}
func (m *LogWatchEvent) XXX_DiscardUnknown() {
xxx_messageInfo_LogWatchEvent.DiscardUnknown(m)
}
var xxx_messageInfo_LogWatchEvent proto.InternalMessageInfo
func (m *LogWatchEvent) GetLogId() string {
if m != nil {
return m.LogId
}
return ""
}
func (m *LogWatchEvent) GetRecords() []*RawRecordWithId {
if m != nil {
return m.Records
}
return nil
}
func (m *LogWatchEvent) GetError() *Err {
if m != nil {
return m.Error
}
return nil
}
type LogDeleteRequest struct {
LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"`
}
func (m *LogDeleteRequest) Reset() { *m = LogDeleteRequest{} }
func (m *LogDeleteRequest) String() string { return proto.CompactTextString(m) }
func (*LogDeleteRequest) ProtoMessage() {}
func (*LogDeleteRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{9}
}
func (m *LogDeleteRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *LogDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_LogDeleteRequest.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 *LogDeleteRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *LogDeleteRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogDeleteRequest.Merge(m, src)
}
func (m *LogDeleteRequest) XXX_Size() int {
return m.Size()
}
func (m *LogDeleteRequest) XXX_DiscardUnknown() {
xxx_messageInfo_LogDeleteRequest.DiscardUnknown(m)
}
var xxx_messageInfo_LogDeleteRequest proto.InternalMessageInfo
func (m *LogDeleteRequest) GetLogId() string {
if m != nil {
return m.LogId
}
return ""
}
type Err struct {
Error ErrCodes `protobuf:"varint,1,opt,name=error,proto3,enum=consensusProto.ErrCodes" json:"error,omitempty"`
}
func (m *Err) Reset() { *m = Err{} }
func (m *Err) String() string { return proto.CompactTextString(m) }
func (*Err) ProtoMessage() {}
func (*Err) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{10}
}
func (m *Err) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Err) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Err.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 *Err) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *Err) XXX_Merge(src proto.Message) {
xxx_messageInfo_Err.Merge(m, src)
}
func (m *Err) XXX_Size() int {
return m.Size()
}
func (m *Err) XXX_DiscardUnknown() {
xxx_messageInfo_Err.DiscardUnknown(m)
}
var xxx_messageInfo_Err proto.InternalMessageInfo
func (m *Err) GetError() ErrCodes {
if m != nil {
return m.Error
}
return ErrCodes_Unexpected
}
// LogSyncContentValue provides different types for log sync
type LogSyncContentValue struct {
// Types that are valid to be assigned to Value:
//
// *LogSyncContentValue_HeadUpdate
// *LogSyncContentValue_FullSyncRequest
// *LogSyncContentValue_FullSyncResponse
Value isLogSyncContentValueValue `protobuf_oneof:"value"`
}
func (m *LogSyncContentValue) Reset() { *m = LogSyncContentValue{} }
func (m *LogSyncContentValue) String() string { return proto.CompactTextString(m) }
func (*LogSyncContentValue) ProtoMessage() {}
func (*LogSyncContentValue) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{11}
}
func (m *LogSyncContentValue) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *LogSyncContentValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_LogSyncContentValue.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 *LogSyncContentValue) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *LogSyncContentValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogSyncContentValue.Merge(m, src)
}
func (m *LogSyncContentValue) XXX_Size() int {
return m.Size()
}
func (m *LogSyncContentValue) XXX_DiscardUnknown() {
xxx_messageInfo_LogSyncContentValue.DiscardUnknown(m)
}
var xxx_messageInfo_LogSyncContentValue proto.InternalMessageInfo
type isLogSyncContentValueValue interface {
isLogSyncContentValueValue()
MarshalTo([]byte) (int, error)
Size() int
}
type LogSyncContentValue_HeadUpdate struct {
HeadUpdate *LogHeadUpdate `protobuf:"bytes,1,opt,name=headUpdate,proto3,oneof" json:"headUpdate,omitempty"`
}
type LogSyncContentValue_FullSyncRequest struct {
FullSyncRequest *LogFullSyncRequest `protobuf:"bytes,2,opt,name=fullSyncRequest,proto3,oneof" json:"fullSyncRequest,omitempty"`
}
type LogSyncContentValue_FullSyncResponse struct {
FullSyncResponse *LogFullSyncResponse `protobuf:"bytes,3,opt,name=fullSyncResponse,proto3,oneof" json:"fullSyncResponse,omitempty"`
}
func (*LogSyncContentValue_HeadUpdate) isLogSyncContentValueValue() {}
func (*LogSyncContentValue_FullSyncRequest) isLogSyncContentValueValue() {}
func (*LogSyncContentValue_FullSyncResponse) isLogSyncContentValueValue() {}
func (m *LogSyncContentValue) GetValue() isLogSyncContentValueValue {
if m != nil {
return m.Value
}
return nil
}
func (m *LogSyncContentValue) GetHeadUpdate() *LogHeadUpdate {
if x, ok := m.GetValue().(*LogSyncContentValue_HeadUpdate); ok {
return x.HeadUpdate
}
return nil
}
func (m *LogSyncContentValue) GetFullSyncRequest() *LogFullSyncRequest {
if x, ok := m.GetValue().(*LogSyncContentValue_FullSyncRequest); ok {
return x.FullSyncRequest
}
return nil
}
func (m *LogSyncContentValue) GetFullSyncResponse() *LogFullSyncResponse {
if x, ok := m.GetValue().(*LogSyncContentValue_FullSyncResponse); ok {
return x.FullSyncResponse
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*LogSyncContentValue) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*LogSyncContentValue_HeadUpdate)(nil),
(*LogSyncContentValue_FullSyncRequest)(nil),
(*LogSyncContentValue_FullSyncResponse)(nil),
}
}
// LogSyncMessage is a message sent when we are syncing logs
type LogSyncMessage struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
Content *LogSyncContentValue `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
}
func (m *LogSyncMessage) Reset() { *m = LogSyncMessage{} }
func (m *LogSyncMessage) String() string { return proto.CompactTextString(m) }
func (*LogSyncMessage) ProtoMessage() {}
func (*LogSyncMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{12}
}
func (m *LogSyncMessage) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *LogSyncMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_LogSyncMessage.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 *LogSyncMessage) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *LogSyncMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogSyncMessage.Merge(m, src)
}
func (m *LogSyncMessage) XXX_Size() int {
return m.Size()
}
func (m *LogSyncMessage) XXX_DiscardUnknown() {
xxx_messageInfo_LogSyncMessage.DiscardUnknown(m)
}
var xxx_messageInfo_LogSyncMessage proto.InternalMessageInfo
func (m *LogSyncMessage) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *LogSyncMessage) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func (m *LogSyncMessage) GetContent() *LogSyncContentValue {
if m != nil {
return m.Content
}
return nil
}
// LogHeadUpdate is a message sent on consensus log head update
type LogHeadUpdate struct {
Head string `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"`
Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
}
func (m *LogHeadUpdate) Reset() { *m = LogHeadUpdate{} }
func (m *LogHeadUpdate) String() string { return proto.CompactTextString(m) }
func (*LogHeadUpdate) ProtoMessage() {}
func (*LogHeadUpdate) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{13}
}
func (m *LogHeadUpdate) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *LogHeadUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_LogHeadUpdate.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 *LogHeadUpdate) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *LogHeadUpdate) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogHeadUpdate.Merge(m, src)
}
func (m *LogHeadUpdate) XXX_Size() int {
return m.Size()
}
func (m *LogHeadUpdate) XXX_DiscardUnknown() {
xxx_messageInfo_LogHeadUpdate.DiscardUnknown(m)
}
var xxx_messageInfo_LogHeadUpdate proto.InternalMessageInfo
func (m *LogHeadUpdate) GetHead() string {
if m != nil {
return m.Head
}
return ""
}
func (m *LogHeadUpdate) GetRecords() []*RawRecordWithId {
if m != nil {
return m.Records
}
return nil
}
// LogFullSyncRequest is a message sent when consensus log needs full sync
type LogFullSyncRequest struct {
Head string `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"`
Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
}
func (m *LogFullSyncRequest) Reset() { *m = LogFullSyncRequest{} }
func (m *LogFullSyncRequest) String() string { return proto.CompactTextString(m) }
func (*LogFullSyncRequest) ProtoMessage() {}
func (*LogFullSyncRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{14}
}
func (m *LogFullSyncRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *LogFullSyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_LogFullSyncRequest.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 *LogFullSyncRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *LogFullSyncRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogFullSyncRequest.Merge(m, src)
}
func (m *LogFullSyncRequest) XXX_Size() int {
return m.Size()
}
func (m *LogFullSyncRequest) XXX_DiscardUnknown() {
xxx_messageInfo_LogFullSyncRequest.DiscardUnknown(m)
}
var xxx_messageInfo_LogFullSyncRequest proto.InternalMessageInfo
func (m *LogFullSyncRequest) GetHead() string {
if m != nil {
return m.Head
}
return ""
}
func (m *LogFullSyncRequest) GetRecords() []*RawRecordWithId {
if m != nil {
return m.Records
}
return nil
}
// LogFullSyncResponse is a message sent as a response for a specific full sync
type LogFullSyncResponse struct {
Head string `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"`
Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
}
func (m *LogFullSyncResponse) Reset() { *m = LogFullSyncResponse{} }
func (m *LogFullSyncResponse) String() string { return proto.CompactTextString(m) }
func (*LogFullSyncResponse) ProtoMessage() {}
func (*LogFullSyncResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b8d7f1c16b400059, []int{15}
}
func (m *LogFullSyncResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *LogFullSyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_LogFullSyncResponse.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 *LogFullSyncResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
b = b[:newLen]
_, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b, nil
}
func (m *LogFullSyncResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogFullSyncResponse.Merge(m, src)
}
func (m *LogFullSyncResponse) XXX_Size() int {
return m.Size()
}
func (m *LogFullSyncResponse) XXX_DiscardUnknown() {
xxx_messageInfo_LogFullSyncResponse.DiscardUnknown(m)
}
var xxx_messageInfo_LogFullSyncResponse proto.InternalMessageInfo
func (m *LogFullSyncResponse) GetHead() string {
if m != nil {
return m.Head
}
return ""
}
func (m *LogFullSyncResponse) GetRecords() []*RawRecordWithId {
if m != nil {
return m.Records
}
return nil
}
func init() {
proto.RegisterEnum("consensusProto.ErrCodes", ErrCodes_name, ErrCodes_value)
proto.RegisterType((*Log)(nil), "consensusProto.Log")
proto.RegisterType((*RawRecord)(nil), "consensusProto.RawRecord")
proto.RegisterType((*RawRecordWithId)(nil), "consensusProto.RawRecordWithId")
proto.RegisterType((*Record)(nil), "consensusProto.Record")
proto.RegisterType((*Ok)(nil), "consensusProto.Ok")
proto.RegisterType((*LogAddRequest)(nil), "consensusProto.LogAddRequest")
proto.RegisterType((*RecordAddRequest)(nil), "consensusProto.RecordAddRequest")
proto.RegisterType((*LogWatchRequest)(nil), "consensusProto.LogWatchRequest")
proto.RegisterType((*LogWatchEvent)(nil), "consensusProto.LogWatchEvent")
proto.RegisterType((*LogDeleteRequest)(nil), "consensusProto.LogDeleteRequest")
proto.RegisterType((*Err)(nil), "consensusProto.Err")
proto.RegisterType((*LogSyncContentValue)(nil), "consensusProto.LogSyncContentValue")
proto.RegisterType((*LogSyncMessage)(nil), "consensusProto.LogSyncMessage")
proto.RegisterType((*LogHeadUpdate)(nil), "consensusProto.LogHeadUpdate")
proto.RegisterType((*LogFullSyncRequest)(nil), "consensusProto.LogFullSyncRequest")
proto.RegisterType((*LogFullSyncResponse)(nil), "consensusProto.LogFullSyncResponse")
}
func init() {
proto.RegisterFile("consensus/consensusproto/protos/consensus.proto", fileDescriptor_b8d7f1c16b400059)
}
var fileDescriptor_b8d7f1c16b400059 = []byte{
// 830 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdd, 0x8e, 0xdb, 0x54,
0x10, 0x8e, 0xed, 0xfc, 0x4e, 0x68, 0x62, 0xa6, 0x08, 0x99, 0x88, 0xa6, 0x91, 0xb9, 0x09, 0x15,
0x4a, 0x21, 0x08, 0x21, 0x54, 0x21, 0xd4, 0x86, 0xac, 0x12, 0xc9, 0xcd, 0x2e, 0x2e, 0xa5, 0x12,
0x48, 0x48, 0xae, 0xcf, 0x89, 0xd7, 0xaa, 0xeb, 0x63, 0xec, 0x93, 0xb4, 0xb9, 0x85, 0x4b, 0x6e,
0x78, 0x0f, 0x5e, 0x04, 0x89, 0x9b, 0x5e, 0x72, 0x89, 0x76, 0x5f, 0x81, 0x07, 0x40, 0x3e, 0xfe,
0x49, 0xd6, 0x4e, 0x52, 0x50, 0xf7, 0x66, 0xd7, 0x33, 0xf3, 0xcd, 0x37, 0x73, 0xbe, 0x73, 0x66,
0x14, 0xb8, 0x6b, 0x33, 0x3f, 0xa2, 0x7e, 0xb4, 0x8a, 0xb6, 0x5f, 0x41, 0xc8, 0x38, 0xbb, 0x2b,
0xfe, 0xee, 0x78, 0x47, 0xc2, 0x81, 0x9d, 0xdc, 0x71, 0x16, 0xdb, 0xfa, 0x19, 0x28, 0x06, 0x73,
0xb0, 0x03, 0xb2, 0x4b, 0x34, 0x69, 0x20, 0x0d, 0x5b, 0xa6, 0xec, 0x12, 0xfc, 0x02, 0x1a, 0x21,
0xb5, 0x59, 0x48, 0x22, 0x4d, 0x19, 0x28, 0xc3, 0xf6, 0xf8, 0xf6, 0xe8, 0x6a, 0xe2, 0xc8, 0xb4,
0x5e, 0x98, 0x02, 0xf1, 0xc4, 0xe5, 0xe7, 0x73, 0x62, 0x66, 0x78, 0xfd, 0x4f, 0x09, 0x5a, 0x79,
0x10, 0x35, 0x68, 0x04, 0xd6, 0xc6, 0x63, 0x56, 0xc2, 0xfe, 0x96, 0x99, 0x99, 0xf8, 0x3e, 0xb4,
0x22, 0xd7, 0xf1, 0x2d, 0xbe, 0x0a, 0xa9, 0x26, 0x8b, 0xd8, 0xd6, 0x81, 0x77, 0x40, 0xb5, 0x6c,
0x9b, 0x06, 0x9c, 0x85, 0x73, 0x42, 0x7d, 0xee, 0xf2, 0x8d, 0xa6, 0x08, 0x50, 0xc9, 0x8f, 0x1f,
0xc1, 0xdb, 0x99, 0xef, 0x51, 0xce, 0x58, 0x15, 0xe0, 0x72, 0x60, 0x17, 0xfd, 0xad, 0xfb, 0x9c,
0x46, 0xdc, 0x7a, 0x1e, 0x68, 0xb5, 0x81, 0x34, 0x54, 0xcc, 0x72, 0x40, 0xbf, 0x07, 0xdd, 0xc2,
0x49, 0x8f, 0x1c, 0x29, 0x51, 0x51, 0xce, 0x54, 0xd4, 0x7d, 0xa8, 0xa7, 0x32, 0xbc, 0x0b, 0xf5,
0x20, 0xa4, 0xeb, 0x79, 0xa6, 0x71, 0x6a, 0x61, 0x0f, 0x9a, 0x6e, 0x76, 0xbc, 0x44, 0x83, 0xdc,
0x46, 0x84, 0x2a, 0xb1, 0xb8, 0x95, 0x1e, 0x5b, 0x7c, 0xc7, 0xa2, 0xf1, 0xbc, 0xe9, 0xaa, 0x68,
0x7a, 0xeb, 0xd0, 0xab, 0x20, 0x9f, 0x3e, 0xd3, 0x7f, 0x84, 0x1b, 0x06, 0x73, 0xee, 0x13, 0x62,
0xd2, 0x9f, 0x56, 0x34, 0xe2, 0xf8, 0x0e, 0xd4, 0x3c, 0xe6, 0xe4, 0xb5, 0x13, 0x03, 0x3f, 0x87,
0x7a, 0x72, 0x65, 0xa2, 0xf0, 0x7f, 0xb8, 0xe1, 0x14, 0xae, 0xff, 0x00, 0x6a, 0xe2, 0x7f, 0x6d,
0x89, 0x4f, 0x0a, 0x25, 0xde, 0x3b, 0x58, 0x22, 0x27, 0x7f, 0x08, 0x5d, 0x83, 0x39, 0x4f, 0x2c,
0x6e, 0x9f, 0x67, 0xdc, 0x3d, 0x68, 0xbe, 0x88, 0xed, 0x39, 0x89, 0x34, 0x69, 0xa0, 0x0c, 0x5b,
0x66, 0x6e, 0x63, 0x1f, 0x60, 0xe5, 0xe7, 0x51, 0x59, 0x44, 0x77, 0x3c, 0xfa, 0xaf, 0x92, 0x10,
0x43, 0xf0, 0x4d, 0xd7, 0xd4, 0x3f, 0xd4, 0xe9, 0xce, 0x7b, 0x97, 0xff, 0xdf, 0x7b, 0xc7, 0x0f,
0xa1, 0x46, 0xc3, 0x90, 0x85, 0xe2, 0x9e, 0xda, 0xe3, 0x9b, 0xc5, 0xc4, 0x69, 0x18, 0x9a, 0x09,
0x42, 0x1f, 0x82, 0x6a, 0x30, 0xe7, 0x6b, 0xea, 0x51, 0x4e, 0x8f, 0x2a, 0xa7, 0x7f, 0x06, 0xca,
0x34, 0x0c, 0x71, 0x94, 0x71, 0xc7, 0xc1, 0xce, 0x58, 0xdb, 0xc3, 0x3d, 0x61, 0x84, 0x46, 0x59,
0x81, 0x9f, 0x65, 0xb8, 0x69, 0x30, 0xe7, 0xd1, 0xc6, 0xb7, 0x27, 0xcc, 0xe7, 0xd4, 0xe7, 0xdf,
0x59, 0xde, 0x8a, 0xe2, 0x57, 0x00, 0xe7, 0xd4, 0x22, 0x8f, 0x03, 0x62, 0x71, 0x2a, 0xc8, 0xda,
0xe3, 0x5b, 0x45, 0x32, 0x83, 0x39, 0xb3, 0x1c, 0x34, 0xab, 0x98, 0x3b, 0x29, 0xb8, 0x80, 0xee,
0x72, 0xe5, 0x79, 0x31, 0x71, 0xda, 0x78, 0x7a, 0xa5, 0xfa, 0x1e, 0x96, 0x93, 0xab, 0xc8, 0x59,
0xc5, 0x2c, 0x26, 0xe3, 0x37, 0xa0, 0x6e, 0x5d, 0x51, 0x10, 0x53, 0xa4, 0xfa, 0x7d, 0x70, 0x94,
0x30, 0x81, 0xce, 0x2a, 0x66, 0x29, 0xfd, 0x41, 0x03, 0x6a, 0xeb, 0xf8, 0xb0, 0xfa, 0x06, 0x3a,
0xa9, 0x06, 0x0f, 0x69, 0x14, 0x59, 0x0e, 0x2d, 0x6d, 0xb7, 0x9d, 0x09, 0x96, 0xaf, 0x4e, 0xf0,
0x97, 0xd0, 0xb0, 0x13, 0xe1, 0x8e, 0xb4, 0x53, 0x94, 0xd7, 0xcc, 0x72, 0xd2, 0xd1, 0xdb, 0xaa,
0x18, 0xcf, 0x70, 0xac, 0x62, 0x5a, 0x5b, 0x7c, 0xbf, 0xc1, 0x5b, 0xd3, 0x6d, 0xc0, 0xb2, 0xbe,
0xd7, 0x5d, 0x84, 0x88, 0x37, 0x54, 0xd4, 0xfc, 0x9a, 0xab, 0xdc, 0xf9, 0x45, 0x82, 0x66, 0xf6,
0x7c, 0xb1, 0x03, 0xf0, 0xd8, 0xa7, 0x2f, 0x03, 0x6a, 0x73, 0x4a, 0xd4, 0x0a, 0xde, 0x80, 0x96,
0xc1, 0x9c, 0xe9, 0x4b, 0x37, 0xe2, 0x91, 0x2a, 0x61, 0x17, 0xda, 0x06, 0x73, 0x16, 0x8c, 0x9f,
0xb0, 0x95, 0x4f, 0x54, 0x19, 0x11, 0x3a, 0x09, 0xeb, 0x84, 0xf9, 0x4b, 0xcf, 0xb5, 0xb9, 0xaa,
0xc4, 0x39, 0x27, 0x2c, 0x7c, 0xea, 0x12, 0x42, 0x7d, 0xb5, 0x1a, 0x43, 0xe6, 0xfe, 0xda, 0xf2,
0x5c, 0x72, 0x96, 0xdc, 0xad, 0x5a, 0x43, 0x15, 0xda, 0xd3, 0x78, 0x4e, 0x4e, 0x97, 0xcb, 0x88,
0x72, 0xf5, 0x1f, 0x65, 0xfc, 0xbb, 0x0c, 0xad, 0x49, 0xd6, 0x31, 0xde, 0x83, 0x7a, 0xb2, 0x39,
0x71, 0xdf, 0x70, 0x6c, 0xd7, 0x5d, 0x0f, 0x8b, 0xe1, 0xd3, 0x67, 0xb8, 0x80, 0x56, 0xbe, 0x16,
0x71, 0x50, 0xd2, 0xa1, 0xb0, 0x31, 0x7b, 0xaf, 0x53, 0x0a, 0x17, 0xd0, 0xcc, 0x36, 0x17, 0xde,
0xde, 0xd3, 0xce, 0xee, 0x8e, 0xec, 0xdd, 0x3a, 0x04, 0x10, 0x4b, 0x6f, 0x28, 0x7d, 0x2c, 0xe1,
0x7d, 0xa1, 0x69, 0xb2, 0x7c, 0xca, 0xfd, 0x15, 0xf7, 0xd2, 0xbe, 0x23, 0x3e, 0x18, 0xff, 0x71,
0xd1, 0x97, 0x5e, 0x5d, 0xf4, 0xa5, 0xbf, 0x2f, 0xfa, 0xd2, 0x6f, 0x97, 0xfd, 0xca, 0xab, 0xcb,
0x7e, 0xe5, 0xaf, 0xcb, 0x7e, 0xe5, 0x7b, 0xed, 0xd0, 0xef, 0x90, 0xa7, 0x75, 0xf1, 0xef, 0xd3,
0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x12, 0x81, 0xbd, 0x26, 0xaa, 0x08, 0x00, 0x00,
}
func (m *Log) 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 *Log) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Records) > 0 {
for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConsensus(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
}
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.Id)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *RawRecord) 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 *RawRecord) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *RawRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.AcceptorTimestamp != 0 {
i = encodeVarintConsensus(dAtA, i, uint64(m.AcceptorTimestamp))
i--
dAtA[i] = 0x28
}
if len(m.AcceptorSignature) > 0 {
i -= len(m.AcceptorSignature)
copy(dAtA[i:], m.AcceptorSignature)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.AcceptorSignature)))
i--
dAtA[i] = 0x22
}
if len(m.AcceptorIdentity) > 0 {
i -= len(m.AcceptorIdentity)
copy(dAtA[i:], m.AcceptorIdentity)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.AcceptorIdentity)))
i--
dAtA[i] = 0x1a
}
if len(m.Signature) > 0 {
i -= len(m.Signature)
copy(dAtA[i:], m.Signature)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.Signature)))
i--
dAtA[i] = 0x12
}
if len(m.Payload) > 0 {
i -= len(m.Payload)
copy(dAtA[i:], m.Payload)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.Payload)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *RawRecordWithId) 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 *RawRecordWithId) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *RawRecordWithId) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.Id)))
i--
dAtA[i] = 0x12
}
if len(m.Payload) > 0 {
i -= len(m.Payload)
copy(dAtA[i:], m.Payload)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.Payload)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Record) 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 *Record) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Record) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Timestamp != 0 {
i = encodeVarintConsensus(dAtA, i, uint64(m.Timestamp))
i--
dAtA[i] = 0x20
}
if len(m.Data) > 0 {
i -= len(m.Data)
copy(dAtA[i:], m.Data)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.Data)))
i--
dAtA[i] = 0x1a
}
if len(m.Identity) > 0 {
i -= len(m.Identity)
copy(dAtA[i:], m.Identity)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.Identity)))
i--
dAtA[i] = 0x12
}
if len(m.PrevId) > 0 {
i -= len(m.PrevId)
copy(dAtA[i:], m.PrevId)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.PrevId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Ok) 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 *Ok) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Ok) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func (m *LogAddRequest) 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 *LogAddRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *LogAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Record != nil {
{
size, err := m.Record.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConsensus(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if len(m.LogId) > 0 {
i -= len(m.LogId)
copy(dAtA[i:], m.LogId)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.LogId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *RecordAddRequest) 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 *RecordAddRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *RecordAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Record != nil {
{
size, err := m.Record.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConsensus(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if len(m.LogId) > 0 {
i -= len(m.LogId)
copy(dAtA[i:], m.LogId)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.LogId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *LogWatchRequest) 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 *LogWatchRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *LogWatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.UnwatchIds) > 0 {
for iNdEx := len(m.UnwatchIds) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.UnwatchIds[iNdEx])
copy(dAtA[i:], m.UnwatchIds[iNdEx])
i = encodeVarintConsensus(dAtA, i, uint64(len(m.UnwatchIds[iNdEx])))
i--
dAtA[i] = 0x12
}
}
if len(m.WatchIds) > 0 {
for iNdEx := len(m.WatchIds) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.WatchIds[iNdEx])
copy(dAtA[i:], m.WatchIds[iNdEx])
i = encodeVarintConsensus(dAtA, i, uint64(len(m.WatchIds[iNdEx])))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *LogWatchEvent) 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 *LogWatchEvent) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *LogWatchEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Error != nil {
{
size, err := m.Error.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConsensus(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
if len(m.Records) > 0 {
for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConsensus(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
}
if len(m.LogId) > 0 {
i -= len(m.LogId)
copy(dAtA[i:], m.LogId)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.LogId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *LogDeleteRequest) 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 *LogDeleteRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *LogDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.LogId) > 0 {
i -= len(m.LogId)
copy(dAtA[i:], m.LogId)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.LogId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Err) 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 *Err) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Err) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Error != 0 {
i = encodeVarintConsensus(dAtA, i, uint64(m.Error))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *LogSyncContentValue) 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 *LogSyncContentValue) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *LogSyncContentValue) 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 *LogSyncContentValue_HeadUpdate) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *LogSyncContentValue_HeadUpdate) 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 = encodeVarintConsensus(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *LogSyncContentValue_FullSyncRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *LogSyncContentValue_FullSyncRequest) 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 = encodeVarintConsensus(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
return len(dAtA) - i, nil
}
func (m *LogSyncContentValue_FullSyncResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *LogSyncContentValue_FullSyncResponse) 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 = encodeVarintConsensus(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
return len(dAtA) - i, nil
}
func (m *LogSyncMessage) 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 *LogSyncMessage) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *LogSyncMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Content != nil {
{
size, err := m.Content.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConsensus(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
if len(m.Payload) > 0 {
i -= len(m.Payload)
copy(dAtA[i:], m.Payload)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.Payload)))
i--
dAtA[i] = 0x12
}
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.Id)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *LogHeadUpdate) 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 *LogHeadUpdate) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *LogHeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Records) > 0 {
for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConsensus(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
}
if len(m.Head) > 0 {
i -= len(m.Head)
copy(dAtA[i:], m.Head)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.Head)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *LogFullSyncRequest) 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 *LogFullSyncRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *LogFullSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Records) > 0 {
for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConsensus(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
}
if len(m.Head) > 0 {
i -= len(m.Head)
copy(dAtA[i:], m.Head)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.Head)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *LogFullSyncResponse) 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 *LogFullSyncResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *LogFullSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Records) > 0 {
for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConsensus(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
}
if len(m.Head) > 0 {
i -= len(m.Head)
copy(dAtA[i:], m.Head)
i = encodeVarintConsensus(dAtA, i, uint64(len(m.Head)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintConsensus(dAtA []byte, offset int, v uint64) int {
offset -= sovConsensus(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Log) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Id)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
if len(m.Records) > 0 {
for _, e := range m.Records {
l = e.Size()
n += 1 + l + sovConsensus(uint64(l))
}
}
return n
}
func (m *RawRecord) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Payload)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
l = len(m.Signature)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
l = len(m.AcceptorIdentity)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
l = len(m.AcceptorSignature)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
if m.AcceptorTimestamp != 0 {
n += 1 + sovConsensus(uint64(m.AcceptorTimestamp))
}
return n
}
func (m *RawRecordWithId) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Payload)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
l = len(m.Id)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
return n
}
func (m *Record) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.PrevId)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
l = len(m.Identity)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
l = len(m.Data)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
if m.Timestamp != 0 {
n += 1 + sovConsensus(uint64(m.Timestamp))
}
return n
}
func (m *Ok) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func (m *LogAddRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.LogId)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
if m.Record != nil {
l = m.Record.Size()
n += 1 + l + sovConsensus(uint64(l))
}
return n
}
func (m *RecordAddRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.LogId)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
if m.Record != nil {
l = m.Record.Size()
n += 1 + l + sovConsensus(uint64(l))
}
return n
}
func (m *LogWatchRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.WatchIds) > 0 {
for _, s := range m.WatchIds {
l = len(s)
n += 1 + l + sovConsensus(uint64(l))
}
}
if len(m.UnwatchIds) > 0 {
for _, s := range m.UnwatchIds {
l = len(s)
n += 1 + l + sovConsensus(uint64(l))
}
}
return n
}
func (m *LogWatchEvent) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.LogId)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
if len(m.Records) > 0 {
for _, e := range m.Records {
l = e.Size()
n += 1 + l + sovConsensus(uint64(l))
}
}
if m.Error != nil {
l = m.Error.Size()
n += 1 + l + sovConsensus(uint64(l))
}
return n
}
func (m *LogDeleteRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.LogId)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
return n
}
func (m *Err) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Error != 0 {
n += 1 + sovConsensus(uint64(m.Error))
}
return n
}
func (m *LogSyncContentValue) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Value != nil {
n += m.Value.Size()
}
return n
}
func (m *LogSyncContentValue_HeadUpdate) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.HeadUpdate != nil {
l = m.HeadUpdate.Size()
n += 1 + l + sovConsensus(uint64(l))
}
return n
}
func (m *LogSyncContentValue_FullSyncRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.FullSyncRequest != nil {
l = m.FullSyncRequest.Size()
n += 1 + l + sovConsensus(uint64(l))
}
return n
}
func (m *LogSyncContentValue_FullSyncResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.FullSyncResponse != nil {
l = m.FullSyncResponse.Size()
n += 1 + l + sovConsensus(uint64(l))
}
return n
}
func (m *LogSyncMessage) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Id)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
l = len(m.Payload)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
if m.Content != nil {
l = m.Content.Size()
n += 1 + l + sovConsensus(uint64(l))
}
return n
}
func (m *LogHeadUpdate) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Head)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
if len(m.Records) > 0 {
for _, e := range m.Records {
l = e.Size()
n += 1 + l + sovConsensus(uint64(l))
}
}
return n
}
func (m *LogFullSyncRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Head)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
if len(m.Records) > 0 {
for _, e := range m.Records {
l = e.Size()
n += 1 + l + sovConsensus(uint64(l))
}
}
return n
}
func (m *LogFullSyncResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Head)
if l > 0 {
n += 1 + l + sovConsensus(uint64(l))
}
if len(m.Records) > 0 {
for _, e := range m.Records {
l = e.Size()
n += 1 + l + sovConsensus(uint64(l))
}
}
return n
}
func sovConsensus(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozConsensus(x uint64) (n int) {
return sovConsensus(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Log) 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 ErrIntOverflowConsensus
}
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: Log: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Log: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
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 ErrInvalidLengthConsensus
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Id = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Records = append(m.Records, &RawRecordWithId{})
if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *RawRecord) 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 ErrIntOverflowConsensus
}
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: RawRecord: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RawRecord: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...)
if m.Payload == nil {
m.Payload = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
if m.Signature == nil {
m.Signature = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AcceptorIdentity", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.AcceptorIdentity = append(m.AcceptorIdentity[:0], dAtA[iNdEx:postIndex]...)
if m.AcceptorIdentity == nil {
m.AcceptorIdentity = []byte{}
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AcceptorSignature", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.AcceptorSignature = append(m.AcceptorSignature[:0], dAtA[iNdEx:postIndex]...)
if m.AcceptorSignature == nil {
m.AcceptorSignature = []byte{}
}
iNdEx = postIndex
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field AcceptorTimestamp", wireType)
}
m.AcceptorTimestamp = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.AcceptorTimestamp |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *RawRecordWithId) 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 ErrIntOverflowConsensus
}
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: RawRecordWithId: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RawRecordWithId: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...)
if m.Payload == nil {
m.Payload = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
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 ErrInvalidLengthConsensus
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Id = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Record) 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 ErrIntOverflowConsensus
}
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: Record: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Record: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PrevId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
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 ErrInvalidLengthConsensus
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PrevId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...)
if m.Identity == nil {
m.Identity = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
if m.Data == nil {
m.Data = []byte{}
}
iNdEx = postIndex
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
}
m.Timestamp = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Timestamp |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Ok) 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 ErrIntOverflowConsensus
}
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: Ok: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Ok: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *LogAddRequest) 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 ErrIntOverflowConsensus
}
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: LogAddRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: LogAddRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
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 ErrInvalidLengthConsensus
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.LogId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Record == nil {
m.Record = &RawRecordWithId{}
}
if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *RecordAddRequest) 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 ErrIntOverflowConsensus
}
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: RecordAddRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RecordAddRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
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 ErrInvalidLengthConsensus
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.LogId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Record == nil {
m.Record = &RawRecord{}
}
if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *LogWatchRequest) 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 ErrIntOverflowConsensus
}
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: LogWatchRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: LogWatchRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field WatchIds", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
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 ErrInvalidLengthConsensus
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.WatchIds = append(m.WatchIds, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field UnwatchIds", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
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 ErrInvalidLengthConsensus
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.UnwatchIds = append(m.UnwatchIds, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *LogWatchEvent) 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 ErrIntOverflowConsensus
}
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: LogWatchEvent: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: LogWatchEvent: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
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 ErrInvalidLengthConsensus
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.LogId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Records = append(m.Records, &RawRecordWithId{})
if err := m.Records[len(m.Records)-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 Error", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Error == nil {
m.Error = &Err{}
}
if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *LogDeleteRequest) 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 ErrIntOverflowConsensus
}
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: LogDeleteRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: LogDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
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 ErrInvalidLengthConsensus
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.LogId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Err) 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 ErrIntOverflowConsensus
}
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: Err: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Err: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
}
m.Error = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Error |= ErrCodes(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *LogSyncContentValue) 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 ErrIntOverflowConsensus
}
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: LogSyncContentValue: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: LogSyncContentValue: 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 ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
v := &LogHeadUpdate{}
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
m.Value = &LogSyncContentValue_HeadUpdate{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 ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
v := &LogFullSyncRequest{}
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
m.Value = &LogSyncContentValue_FullSyncRequest{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 ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
v := &LogFullSyncResponse{}
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
m.Value = &LogSyncContentValue_FullSyncResponse{v}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *LogSyncMessage) 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 ErrIntOverflowConsensus
}
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: LogSyncMessage: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: LogSyncMessage: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
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 ErrInvalidLengthConsensus
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Id = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...)
if m.Payload == nil {
m.Payload = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Content == nil {
m.Content = &LogSyncContentValue{}
}
if err := m.Content.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *LogHeadUpdate) 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 ErrIntOverflowConsensus
}
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: LogHeadUpdate: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: LogHeadUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Head", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
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 ErrInvalidLengthConsensus
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Head = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Records = append(m.Records, &RawRecordWithId{})
if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *LogFullSyncRequest) 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 ErrIntOverflowConsensus
}
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: LogFullSyncRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: LogFullSyncRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Head", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
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 ErrInvalidLengthConsensus
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Head = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Records = append(m.Records, &RawRecordWithId{})
if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *LogFullSyncResponse) 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 ErrIntOverflowConsensus
}
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: LogFullSyncResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: LogFullSyncResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Head", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
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 ErrInvalidLengthConsensus
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Head = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConsensus
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConsensus
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConsensus
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Records = append(m.Records, &RawRecordWithId{})
if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConsensus(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConsensus
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipConsensus(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, ErrIntOverflowConsensus
}
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, ErrIntOverflowConsensus
}
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, ErrIntOverflowConsensus
}
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, ErrInvalidLengthConsensus
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupConsensus
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthConsensus
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthConsensus = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowConsensus = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupConsensus = fmt.Errorf("proto: unexpected end of group")
)