mirror of
https://github.com/luxfi/zapdb.git
synced 2026-10-30 15:12:20 +00:00
This PR adds FullCopy option in Stream. This allows sending the table entirely to the writer. If this option is set to true we directly copy over the tables from the last 2 levels. This option increases the stream speed while also lowering the memory consumption on the DB that is streaming the KVs. For 71GB, compressed and encrypted DB we observed 3x improvement in speed. The DB contained ~65GB in the last 2 levels while remaining in the above levels. To use this option, the following options should be set in Stream. stream.KeyToList = nil stream.ChooseKey = nil stream.SinceTs = 0 db.managedTxns = true If we use stream writer for receiving the KVs, the encryption mode has to be the same in sender and receiver. This will restrict db.StreamDB() to use the same encryption mode in both input and output DB. Added TODO for allowing different encryption modes.
2233 lines
52 KiB
Go
2233 lines
52 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: badgerpb3.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
fmt "fmt"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type EncryptionAlgo int32
|
|
|
|
const (
|
|
EncryptionAlgo_aes EncryptionAlgo = 0
|
|
)
|
|
|
|
var EncryptionAlgo_name = map[int32]string{
|
|
0: "aes",
|
|
}
|
|
|
|
var EncryptionAlgo_value = map[string]int32{
|
|
"aes": 0,
|
|
}
|
|
|
|
func (x EncryptionAlgo) String() string {
|
|
return proto.EnumName(EncryptionAlgo_name, int32(x))
|
|
}
|
|
|
|
func (EncryptionAlgo) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_6d729c99bbc38987, []int{0}
|
|
}
|
|
|
|
type KV_Kind int32
|
|
|
|
const (
|
|
KV_KEY KV_Kind = 0
|
|
KV_DATA_KEY KV_Kind = 1
|
|
KV_FILE KV_Kind = 2
|
|
)
|
|
|
|
var KV_Kind_name = map[int32]string{
|
|
0: "KEY",
|
|
1: "DATA_KEY",
|
|
2: "FILE",
|
|
}
|
|
|
|
var KV_Kind_value = map[string]int32{
|
|
"KEY": 0,
|
|
"DATA_KEY": 1,
|
|
"FILE": 2,
|
|
}
|
|
|
|
func (x KV_Kind) String() string {
|
|
return proto.EnumName(KV_Kind_name, int32(x))
|
|
}
|
|
|
|
func (KV_Kind) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_6d729c99bbc38987, []int{0, 0}
|
|
}
|
|
|
|
type ManifestChange_Operation int32
|
|
|
|
const (
|
|
ManifestChange_CREATE ManifestChange_Operation = 0
|
|
ManifestChange_DELETE ManifestChange_Operation = 1
|
|
)
|
|
|
|
var ManifestChange_Operation_name = map[int32]string{
|
|
0: "CREATE",
|
|
1: "DELETE",
|
|
}
|
|
|
|
var ManifestChange_Operation_value = map[string]int32{
|
|
"CREATE": 0,
|
|
"DELETE": 1,
|
|
}
|
|
|
|
func (x ManifestChange_Operation) String() string {
|
|
return proto.EnumName(ManifestChange_Operation_name, int32(x))
|
|
}
|
|
|
|
func (ManifestChange_Operation) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_6d729c99bbc38987, []int{3, 0}
|
|
}
|
|
|
|
type Checksum_Algorithm int32
|
|
|
|
const (
|
|
Checksum_CRC32C Checksum_Algorithm = 0
|
|
Checksum_XXHash64 Checksum_Algorithm = 1
|
|
)
|
|
|
|
var Checksum_Algorithm_name = map[int32]string{
|
|
0: "CRC32C",
|
|
1: "XXHash64",
|
|
}
|
|
|
|
var Checksum_Algorithm_value = map[string]int32{
|
|
"CRC32C": 0,
|
|
"XXHash64": 1,
|
|
}
|
|
|
|
func (x Checksum_Algorithm) String() string {
|
|
return proto.EnumName(Checksum_Algorithm_name, int32(x))
|
|
}
|
|
|
|
func (Checksum_Algorithm) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_6d729c99bbc38987, []int{4, 0}
|
|
}
|
|
|
|
type KV struct {
|
|
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
|
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
|
UserMeta []byte `protobuf:"bytes,3,opt,name=user_meta,json=userMeta,proto3" json:"user_meta,omitempty"`
|
|
Version uint64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"`
|
|
ExpiresAt uint64 `protobuf:"varint,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
|
|
Meta []byte `protobuf:"bytes,6,opt,name=meta,proto3" json:"meta,omitempty"`
|
|
// Stream id is used to identify which stream the KV came from.
|
|
StreamId uint32 `protobuf:"varint,10,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
|
|
// Stream done is used to indicate end of stream.
|
|
StreamDone bool `protobuf:"varint,11,opt,name=stream_done,json=streamDone,proto3" json:"stream_done,omitempty"`
|
|
Kind KV_Kind `protobuf:"varint,12,opt,name=kind,proto3,enum=badgerpb3.KV_Kind" json:"kind,omitempty"`
|
|
}
|
|
|
|
func (m *KV) Reset() { *m = KV{} }
|
|
func (m *KV) String() string { return proto.CompactTextString(m) }
|
|
func (*KV) ProtoMessage() {}
|
|
func (*KV) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_6d729c99bbc38987, []int{0}
|
|
}
|
|
func (m *KV) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *KV) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_KV.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 *KV) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_KV.Merge(m, src)
|
|
}
|
|
func (m *KV) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *KV) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_KV.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_KV proto.InternalMessageInfo
|
|
|
|
func (m *KV) GetKey() []byte {
|
|
if m != nil {
|
|
return m.Key
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *KV) GetValue() []byte {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *KV) GetUserMeta() []byte {
|
|
if m != nil {
|
|
return m.UserMeta
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *KV) GetVersion() uint64 {
|
|
if m != nil {
|
|
return m.Version
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *KV) GetExpiresAt() uint64 {
|
|
if m != nil {
|
|
return m.ExpiresAt
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *KV) GetMeta() []byte {
|
|
if m != nil {
|
|
return m.Meta
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *KV) GetStreamId() uint32 {
|
|
if m != nil {
|
|
return m.StreamId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *KV) GetStreamDone() bool {
|
|
if m != nil {
|
|
return m.StreamDone
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *KV) GetKind() KV_Kind {
|
|
if m != nil {
|
|
return m.Kind
|
|
}
|
|
return KV_KEY
|
|
}
|
|
|
|
type KVList struct {
|
|
Kv []*KV `protobuf:"bytes,1,rep,name=kv,proto3" json:"kv,omitempty"`
|
|
// alloc_ref used internally for memory management.
|
|
AllocRef uint64 `protobuf:"varint,10,opt,name=alloc_ref,json=allocRef,proto3" json:"alloc_ref,omitempty"`
|
|
}
|
|
|
|
func (m *KVList) Reset() { *m = KVList{} }
|
|
func (m *KVList) String() string { return proto.CompactTextString(m) }
|
|
func (*KVList) ProtoMessage() {}
|
|
func (*KVList) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_6d729c99bbc38987, []int{1}
|
|
}
|
|
func (m *KVList) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *KVList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_KVList.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 *KVList) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_KVList.Merge(m, src)
|
|
}
|
|
func (m *KVList) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *KVList) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_KVList.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_KVList proto.InternalMessageInfo
|
|
|
|
func (m *KVList) GetKv() []*KV {
|
|
if m != nil {
|
|
return m.Kv
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *KVList) GetAllocRef() uint64 {
|
|
if m != nil {
|
|
return m.AllocRef
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ManifestChangeSet struct {
|
|
// A set of changes that are applied atomically.
|
|
Changes []*ManifestChange `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"`
|
|
}
|
|
|
|
func (m *ManifestChangeSet) Reset() { *m = ManifestChangeSet{} }
|
|
func (m *ManifestChangeSet) String() string { return proto.CompactTextString(m) }
|
|
func (*ManifestChangeSet) ProtoMessage() {}
|
|
func (*ManifestChangeSet) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_6d729c99bbc38987, []int{2}
|
|
}
|
|
func (m *ManifestChangeSet) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ManifestChangeSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ManifestChangeSet.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 *ManifestChangeSet) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ManifestChangeSet.Merge(m, src)
|
|
}
|
|
func (m *ManifestChangeSet) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ManifestChangeSet) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ManifestChangeSet.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ManifestChangeSet proto.InternalMessageInfo
|
|
|
|
func (m *ManifestChangeSet) GetChanges() []*ManifestChange {
|
|
if m != nil {
|
|
return m.Changes
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ManifestChange struct {
|
|
Id uint64 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
|
|
Op ManifestChange_Operation `protobuf:"varint,2,opt,name=Op,proto3,enum=badgerpb3.ManifestChange_Operation" json:"Op,omitempty"`
|
|
Level uint32 `protobuf:"varint,3,opt,name=Level,proto3" json:"Level,omitempty"`
|
|
KeyId uint64 `protobuf:"varint,4,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
|
|
EncryptionAlgo EncryptionAlgo `protobuf:"varint,5,opt,name=encryption_algo,json=encryptionAlgo,proto3,enum=badgerpb3.EncryptionAlgo" json:"encryption_algo,omitempty"`
|
|
Compression uint32 `protobuf:"varint,6,opt,name=compression,proto3" json:"compression,omitempty"`
|
|
}
|
|
|
|
func (m *ManifestChange) Reset() { *m = ManifestChange{} }
|
|
func (m *ManifestChange) String() string { return proto.CompactTextString(m) }
|
|
func (*ManifestChange) ProtoMessage() {}
|
|
func (*ManifestChange) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_6d729c99bbc38987, []int{3}
|
|
}
|
|
func (m *ManifestChange) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ManifestChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ManifestChange.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 *ManifestChange) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ManifestChange.Merge(m, src)
|
|
}
|
|
func (m *ManifestChange) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ManifestChange) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ManifestChange.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ManifestChange proto.InternalMessageInfo
|
|
|
|
func (m *ManifestChange) GetId() uint64 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ManifestChange) GetOp() ManifestChange_Operation {
|
|
if m != nil {
|
|
return m.Op
|
|
}
|
|
return ManifestChange_CREATE
|
|
}
|
|
|
|
func (m *ManifestChange) GetLevel() uint32 {
|
|
if m != nil {
|
|
return m.Level
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ManifestChange) GetKeyId() uint64 {
|
|
if m != nil {
|
|
return m.KeyId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ManifestChange) GetEncryptionAlgo() EncryptionAlgo {
|
|
if m != nil {
|
|
return m.EncryptionAlgo
|
|
}
|
|
return EncryptionAlgo_aes
|
|
}
|
|
|
|
func (m *ManifestChange) GetCompression() uint32 {
|
|
if m != nil {
|
|
return m.Compression
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Checksum struct {
|
|
Algo Checksum_Algorithm `protobuf:"varint,1,opt,name=algo,proto3,enum=badgerpb3.Checksum_Algorithm" json:"algo,omitempty"`
|
|
Sum uint64 `protobuf:"varint,2,opt,name=sum,proto3" json:"sum,omitempty"`
|
|
}
|
|
|
|
func (m *Checksum) Reset() { *m = Checksum{} }
|
|
func (m *Checksum) String() string { return proto.CompactTextString(m) }
|
|
func (*Checksum) ProtoMessage() {}
|
|
func (*Checksum) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_6d729c99bbc38987, []int{4}
|
|
}
|
|
func (m *Checksum) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Checksum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Checksum.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 *Checksum) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Checksum.Merge(m, src)
|
|
}
|
|
func (m *Checksum) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Checksum) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Checksum.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Checksum proto.InternalMessageInfo
|
|
|
|
func (m *Checksum) GetAlgo() Checksum_Algorithm {
|
|
if m != nil {
|
|
return m.Algo
|
|
}
|
|
return Checksum_CRC32C
|
|
}
|
|
|
|
func (m *Checksum) GetSum() uint64 {
|
|
if m != nil {
|
|
return m.Sum
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type DataKey struct {
|
|
KeyId uint64 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
|
|
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
|
Iv []byte `protobuf:"bytes,3,opt,name=iv,proto3" json:"iv,omitempty"`
|
|
CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
|
}
|
|
|
|
func (m *DataKey) Reset() { *m = DataKey{} }
|
|
func (m *DataKey) String() string { return proto.CompactTextString(m) }
|
|
func (*DataKey) ProtoMessage() {}
|
|
func (*DataKey) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_6d729c99bbc38987, []int{5}
|
|
}
|
|
func (m *DataKey) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *DataKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_DataKey.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 *DataKey) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DataKey.Merge(m, src)
|
|
}
|
|
func (m *DataKey) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *DataKey) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DataKey.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DataKey proto.InternalMessageInfo
|
|
|
|
func (m *DataKey) GetKeyId() uint64 {
|
|
if m != nil {
|
|
return m.KeyId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *DataKey) GetData() []byte {
|
|
if m != nil {
|
|
return m.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *DataKey) GetIv() []byte {
|
|
if m != nil {
|
|
return m.Iv
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *DataKey) GetCreatedAt() int64 {
|
|
if m != nil {
|
|
return m.CreatedAt
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Match struct {
|
|
Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
|
|
IgnoreBytes string `protobuf:"bytes,2,opt,name=ignore_bytes,json=ignoreBytes,proto3" json:"ignore_bytes,omitempty"`
|
|
}
|
|
|
|
func (m *Match) Reset() { *m = Match{} }
|
|
func (m *Match) String() string { return proto.CompactTextString(m) }
|
|
func (*Match) ProtoMessage() {}
|
|
func (*Match) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_6d729c99bbc38987, []int{6}
|
|
}
|
|
func (m *Match) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Match) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Match.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 *Match) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Match.Merge(m, src)
|
|
}
|
|
func (m *Match) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Match) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Match.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Match proto.InternalMessageInfo
|
|
|
|
func (m *Match) GetPrefix() []byte {
|
|
if m != nil {
|
|
return m.Prefix
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Match) GetIgnoreBytes() string {
|
|
if m != nil {
|
|
return m.IgnoreBytes
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterEnum("badgerpb3.EncryptionAlgo", EncryptionAlgo_name, EncryptionAlgo_value)
|
|
proto.RegisterEnum("badgerpb3.KV_Kind", KV_Kind_name, KV_Kind_value)
|
|
proto.RegisterEnum("badgerpb3.ManifestChange_Operation", ManifestChange_Operation_name, ManifestChange_Operation_value)
|
|
proto.RegisterEnum("badgerpb3.Checksum_Algorithm", Checksum_Algorithm_name, Checksum_Algorithm_value)
|
|
proto.RegisterType((*KV)(nil), "badgerpb3.KV")
|
|
proto.RegisterType((*KVList)(nil), "badgerpb3.KVList")
|
|
proto.RegisterType((*ManifestChangeSet)(nil), "badgerpb3.ManifestChangeSet")
|
|
proto.RegisterType((*ManifestChange)(nil), "badgerpb3.ManifestChange")
|
|
proto.RegisterType((*Checksum)(nil), "badgerpb3.Checksum")
|
|
proto.RegisterType((*DataKey)(nil), "badgerpb3.DataKey")
|
|
proto.RegisterType((*Match)(nil), "badgerpb3.Match")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("badgerpb3.proto", fileDescriptor_6d729c99bbc38987) }
|
|
|
|
var fileDescriptor_6d729c99bbc38987 = []byte{
|
|
// 705 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0xdd, 0x6e, 0xda, 0x58,
|
|
0x10, 0xc6, 0xc6, 0xfc, 0x0d, 0x84, 0xb0, 0x47, 0xbb, 0x2b, 0x47, 0xab, 0xb0, 0xc4, 0xd1, 0xee,
|
|
0xa2, 0x95, 0x16, 0xb4, 0x50, 0xf5, 0xa6, 0x57, 0xfc, 0xb8, 0x0a, 0x82, 0x28, 0xd2, 0x69, 0x14,
|
|
0xa5, 0xbd, 0x41, 0x07, 0x7b, 0x00, 0x0b, 0xb0, 0xad, 0xe3, 0x83, 0x15, 0x1e, 0xa2, 0x52, 0x5f,
|
|
0xa2, 0xef, 0xd2, 0xcb, 0x5c, 0xf6, 0xb2, 0x4a, 0x5e, 0xa4, 0x3a, 0xc7, 0x0e, 0x85, 0x8b, 0xde,
|
|
0xcd, 0xf7, 0xcd, 0x78, 0x66, 0x3c, 0xdf, 0xcc, 0x81, 0xd3, 0x19, 0x73, 0x17, 0xc8, 0xc3, 0x59,
|
|
0xb7, 0x15, 0xf2, 0x40, 0x04, 0xa4, 0xb4, 0x27, 0xac, 0xcf, 0x3a, 0xe8, 0xe3, 0x3b, 0x52, 0x83,
|
|
0xec, 0x0a, 0x77, 0xa6, 0xd6, 0xd0, 0x9a, 0x15, 0x2a, 0x4d, 0xf2, 0x2b, 0xe4, 0x62, 0xb6, 0xde,
|
|
0xa2, 0xa9, 0x2b, 0x2e, 0x01, 0xe4, 0x0f, 0x28, 0x6d, 0x23, 0xe4, 0xd3, 0x0d, 0x0a, 0x66, 0x66,
|
|
0x95, 0xa7, 0x28, 0x89, 0x6b, 0x14, 0x8c, 0x98, 0x50, 0x88, 0x91, 0x47, 0x5e, 0xe0, 0x9b, 0x46,
|
|
0x43, 0x6b, 0x1a, 0xf4, 0x05, 0x92, 0x73, 0x00, 0x7c, 0x08, 0x3d, 0x8e, 0xd1, 0x94, 0x09, 0x33,
|
|
0xa7, 0x9c, 0xa5, 0x94, 0xe9, 0x09, 0x42, 0xc0, 0x50, 0x09, 0xf3, 0x2a, 0xa1, 0xb2, 0x65, 0xa5,
|
|
0x48, 0x70, 0x64, 0x9b, 0xa9, 0xe7, 0x9a, 0xd0, 0xd0, 0x9a, 0x27, 0xb4, 0x98, 0x10, 0x23, 0x97,
|
|
0xfc, 0x09, 0xe5, 0xd4, 0xe9, 0x06, 0x3e, 0x9a, 0xe5, 0x86, 0xd6, 0x2c, 0x52, 0x48, 0xa8, 0x61,
|
|
0xe0, 0x23, 0xf9, 0x1b, 0x8c, 0x95, 0xe7, 0xbb, 0x66, 0xa5, 0xa1, 0x35, 0xab, 0x1d, 0xd2, 0xfa,
|
|
0x31, 0x81, 0xf1, 0x5d, 0x6b, 0xec, 0xf9, 0x2e, 0x55, 0x7e, 0xeb, 0x1f, 0x30, 0x24, 0x22, 0x05,
|
|
0xc8, 0x8e, 0xed, 0xf7, 0xb5, 0x0c, 0xa9, 0x40, 0x71, 0xd8, 0xbb, 0xed, 0x4d, 0x25, 0xd2, 0x48,
|
|
0x11, 0x8c, 0xb7, 0xa3, 0x89, 0x5d, 0xd3, 0xad, 0x21, 0xe4, 0xc7, 0x77, 0x13, 0x2f, 0x12, 0xe4,
|
|
0x1c, 0xf4, 0x55, 0x6c, 0x6a, 0x8d, 0x6c, 0xb3, 0xdc, 0x39, 0x39, 0x4a, 0x4c, 0xf5, 0x55, 0x2c,
|
|
0xfb, 0x66, 0xeb, 0x75, 0xe0, 0x4c, 0x39, 0xce, 0x55, 0xdf, 0x06, 0x2d, 0x2a, 0x82, 0xe2, 0xdc,
|
|
0xba, 0x82, 0x5f, 0xae, 0x99, 0xef, 0xcd, 0x31, 0x12, 0x83, 0x25, 0xf3, 0x17, 0xf8, 0x0e, 0x05,
|
|
0xe9, 0x42, 0xc1, 0x51, 0x20, 0x4a, 0xb3, 0x9e, 0x1d, 0x64, 0x3d, 0x0e, 0xa7, 0x2f, 0x91, 0xd6,
|
|
0x47, 0x1d, 0xaa, 0xc7, 0x3e, 0x52, 0x05, 0x7d, 0xe4, 0x2a, 0x09, 0x0d, 0xaa, 0x8f, 0x5c, 0xd2,
|
|
0x05, 0xfd, 0x26, 0x54, 0xf2, 0x55, 0x3b, 0x97, 0x3f, 0x4d, 0xd9, 0xba, 0x09, 0x91, 0x33, 0xe1,
|
|
0x05, 0x3e, 0xd5, 0x6f, 0x42, 0x29, 0xfb, 0x04, 0x63, 0x5c, 0x2b, 0x71, 0x4f, 0x68, 0x02, 0xc8,
|
|
0x6f, 0x90, 0x5f, 0xe1, 0x4e, 0x2a, 0x91, 0x08, 0x9b, 0x5b, 0xe1, 0x6e, 0xe4, 0x92, 0x3e, 0x9c,
|
|
0xa2, 0xef, 0xf0, 0x5d, 0x28, 0x3f, 0x9f, 0xb2, 0xf5, 0x22, 0x50, 0xda, 0x56, 0x8f, 0xfe, 0xc0,
|
|
0xde, 0x47, 0xf4, 0xd6, 0x8b, 0x80, 0x56, 0xf1, 0x08, 0x93, 0x06, 0x94, 0x9d, 0x60, 0x13, 0x72,
|
|
0x8c, 0xd4, 0xe2, 0xe4, 0x55, 0xd9, 0x43, 0xca, 0xba, 0x84, 0xd2, 0xbe, 0x47, 0x02, 0x90, 0x1f,
|
|
0x50, 0xbb, 0x77, 0x6b, 0xd7, 0x32, 0xd2, 0x1e, 0xda, 0x13, 0xfb, 0xd6, 0xae, 0x69, 0x56, 0x0c,
|
|
0xc5, 0xc1, 0x12, 0x9d, 0x55, 0xb4, 0xdd, 0x90, 0xff, 0xc1, 0x50, 0xbd, 0x68, 0xaa, 0x97, 0xf3,
|
|
0x83, 0x5e, 0x5e, 0x42, 0x5a, 0xb2, 0x34, 0xf7, 0xc4, 0x72, 0x43, 0x55, 0xa8, 0xdc, 0xff, 0x68,
|
|
0xbb, 0x51, 0xc3, 0x32, 0xa8, 0x34, 0xad, 0xbf, 0xa0, 0xb4, 0x0f, 0x4a, 0xaa, 0x0e, 0xba, 0x9d,
|
|
0x41, 0xb2, 0x21, 0xf7, 0xf7, 0x57, 0x2c, 0x5a, 0xbe, 0x7e, 0x55, 0xd3, 0x2c, 0x07, 0x0a, 0x43,
|
|
0x26, 0xd8, 0x18, 0x77, 0x07, 0x43, 0xd2, 0x0e, 0x87, 0x44, 0xc0, 0x70, 0x99, 0x60, 0xe9, 0x1d,
|
|
0x29, 0x5b, 0x4a, 0xe5, 0xc5, 0xe9, 0xfd, 0xe8, 0x5e, 0x2c, 0xef, 0xc3, 0xe1, 0xc8, 0x04, 0xba,
|
|
0xf2, 0x3e, 0xe4, 0x8c, 0xb3, 0xb4, 0x94, 0x32, 0x3d, 0x61, 0xf5, 0x21, 0x77, 0xcd, 0x84, 0xb3,
|
|
0x24, 0xbf, 0x43, 0x3e, 0xe4, 0x38, 0xf7, 0x1e, 0xd2, 0x4b, 0x4d, 0x11, 0xb9, 0x80, 0x8a, 0xb7,
|
|
0xf0, 0x03, 0x8e, 0xd3, 0xd9, 0x4e, 0x60, 0xa4, 0x6a, 0x95, 0x68, 0x39, 0xe1, 0xfa, 0x92, 0xfa,
|
|
0xf7, 0x0c, 0xaa, 0xc7, 0x4a, 0xc8, 0x9d, 0x67, 0x18, 0xd5, 0x32, 0xfd, 0x37, 0x5f, 0x9e, 0xea,
|
|
0xda, 0xe3, 0x53, 0x5d, 0xfb, 0xf6, 0x54, 0xd7, 0x3e, 0x3d, 0xd7, 0x33, 0x8f, 0xcf, 0xf5, 0xcc,
|
|
0xd7, 0xe7, 0x7a, 0xe6, 0xc3, 0xc5, 0xc2, 0x13, 0xcb, 0xed, 0xac, 0xe5, 0x04, 0x9b, 0xb6, 0xbb,
|
|
0xe0, 0x2c, 0x5c, 0xfe, 0xe7, 0x05, 0xed, 0x64, 0x9e, 0xed, 0xb8, 0xdb, 0x0e, 0x67, 0xb3, 0xbc,
|
|
0x7a, 0x52, 0xba, 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x43, 0xc8, 0xf6, 0xac, 0x65, 0x04, 0x00,
|
|
0x00,
|
|
}
|
|
|
|
func (m *KV) 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 *KV) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *KV) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Kind != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.Kind))
|
|
i--
|
|
dAtA[i] = 0x60
|
|
}
|
|
if m.StreamDone {
|
|
i--
|
|
if m.StreamDone {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x58
|
|
}
|
|
if m.StreamId != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.StreamId))
|
|
i--
|
|
dAtA[i] = 0x50
|
|
}
|
|
if len(m.Meta) > 0 {
|
|
i -= len(m.Meta)
|
|
copy(dAtA[i:], m.Meta)
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(len(m.Meta)))
|
|
i--
|
|
dAtA[i] = 0x32
|
|
}
|
|
if m.ExpiresAt != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.ExpiresAt))
|
|
i--
|
|
dAtA[i] = 0x28
|
|
}
|
|
if m.Version != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.Version))
|
|
i--
|
|
dAtA[i] = 0x20
|
|
}
|
|
if len(m.UserMeta) > 0 {
|
|
i -= len(m.UserMeta)
|
|
copy(dAtA[i:], m.UserMeta)
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(len(m.UserMeta)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Value) > 0 {
|
|
i -= len(m.Value)
|
|
copy(dAtA[i:], m.Value)
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(len(m.Value)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Key) > 0 {
|
|
i -= len(m.Key)
|
|
copy(dAtA[i:], m.Key)
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(len(m.Key)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *KVList) 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 *KVList) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *KVList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.AllocRef != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.AllocRef))
|
|
i--
|
|
dAtA[i] = 0x50
|
|
}
|
|
if len(m.Kv) > 0 {
|
|
for iNdEx := len(m.Kv) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Kv[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ManifestChangeSet) 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 *ManifestChangeSet) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ManifestChangeSet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Changes) > 0 {
|
|
for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ManifestChange) 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 *ManifestChange) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ManifestChange) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Compression != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.Compression))
|
|
i--
|
|
dAtA[i] = 0x30
|
|
}
|
|
if m.EncryptionAlgo != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.EncryptionAlgo))
|
|
i--
|
|
dAtA[i] = 0x28
|
|
}
|
|
if m.KeyId != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.KeyId))
|
|
i--
|
|
dAtA[i] = 0x20
|
|
}
|
|
if m.Level != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.Level))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if m.Op != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.Op))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.Id != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.Id))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Checksum) 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 *Checksum) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Checksum) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Sum != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.Sum))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.Algo != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.Algo))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *DataKey) 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 *DataKey) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *DataKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.CreatedAt != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.CreatedAt))
|
|
i--
|
|
dAtA[i] = 0x20
|
|
}
|
|
if len(m.Iv) > 0 {
|
|
i -= len(m.Iv)
|
|
copy(dAtA[i:], m.Iv)
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(len(m.Iv)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Data) > 0 {
|
|
i -= len(m.Data)
|
|
copy(dAtA[i:], m.Data)
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(len(m.Data)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.KeyId != 0 {
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(m.KeyId))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Match) 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 *Match) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Match) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.IgnoreBytes) > 0 {
|
|
i -= len(m.IgnoreBytes)
|
|
copy(dAtA[i:], m.IgnoreBytes)
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(len(m.IgnoreBytes)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Prefix) > 0 {
|
|
i -= len(m.Prefix)
|
|
copy(dAtA[i:], m.Prefix)
|
|
i = encodeVarintBadgerpb3(dAtA, i, uint64(len(m.Prefix)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintBadgerpb3(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovBadgerpb3(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *KV) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Key)
|
|
if l > 0 {
|
|
n += 1 + l + sovBadgerpb3(uint64(l))
|
|
}
|
|
l = len(m.Value)
|
|
if l > 0 {
|
|
n += 1 + l + sovBadgerpb3(uint64(l))
|
|
}
|
|
l = len(m.UserMeta)
|
|
if l > 0 {
|
|
n += 1 + l + sovBadgerpb3(uint64(l))
|
|
}
|
|
if m.Version != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.Version))
|
|
}
|
|
if m.ExpiresAt != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.ExpiresAt))
|
|
}
|
|
l = len(m.Meta)
|
|
if l > 0 {
|
|
n += 1 + l + sovBadgerpb3(uint64(l))
|
|
}
|
|
if m.StreamId != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.StreamId))
|
|
}
|
|
if m.StreamDone {
|
|
n += 2
|
|
}
|
|
if m.Kind != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.Kind))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *KVList) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Kv) > 0 {
|
|
for _, e := range m.Kv {
|
|
l = e.Size()
|
|
n += 1 + l + sovBadgerpb3(uint64(l))
|
|
}
|
|
}
|
|
if m.AllocRef != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.AllocRef))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ManifestChangeSet) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Changes) > 0 {
|
|
for _, e := range m.Changes {
|
|
l = e.Size()
|
|
n += 1 + l + sovBadgerpb3(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ManifestChange) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Id != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.Id))
|
|
}
|
|
if m.Op != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.Op))
|
|
}
|
|
if m.Level != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.Level))
|
|
}
|
|
if m.KeyId != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.KeyId))
|
|
}
|
|
if m.EncryptionAlgo != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.EncryptionAlgo))
|
|
}
|
|
if m.Compression != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.Compression))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Checksum) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Algo != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.Algo))
|
|
}
|
|
if m.Sum != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.Sum))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *DataKey) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.KeyId != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.KeyId))
|
|
}
|
|
l = len(m.Data)
|
|
if l > 0 {
|
|
n += 1 + l + sovBadgerpb3(uint64(l))
|
|
}
|
|
l = len(m.Iv)
|
|
if l > 0 {
|
|
n += 1 + l + sovBadgerpb3(uint64(l))
|
|
}
|
|
if m.CreatedAt != 0 {
|
|
n += 1 + sovBadgerpb3(uint64(m.CreatedAt))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Match) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Prefix)
|
|
if l > 0 {
|
|
n += 1 + l + sovBadgerpb3(uint64(l))
|
|
}
|
|
l = len(m.IgnoreBytes)
|
|
if l > 0 {
|
|
n += 1 + l + sovBadgerpb3(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovBadgerpb3(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozBadgerpb3(x uint64) (n int) {
|
|
return sovBadgerpb3(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *KV) 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 ErrIntOverflowBadgerpb3
|
|
}
|
|
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: KV: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: KV: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Key == nil {
|
|
m.Key = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Value == nil {
|
|
m.Value = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field UserMeta", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.UserMeta = append(m.UserMeta[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.UserMeta == nil {
|
|
m.UserMeta = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
|
|
}
|
|
m.Version = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Version |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 5:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType)
|
|
}
|
|
m.ExpiresAt = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.ExpiresAt |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 6:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Meta = append(m.Meta[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Meta == nil {
|
|
m.Meta = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 10:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field StreamId", wireType)
|
|
}
|
|
m.StreamId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.StreamId |= uint32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 11:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field StreamDone", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.StreamDone = bool(v != 0)
|
|
case 12:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
|
|
}
|
|
m.Kind = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Kind |= KV_Kind(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipBadgerpb3(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *KVList) 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 ErrIntOverflowBadgerpb3
|
|
}
|
|
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: KVList: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: KVList: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Kv", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Kv = append(m.Kv, &KV{})
|
|
if err := m.Kv[len(m.Kv)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 10:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AllocRef", wireType)
|
|
}
|
|
m.AllocRef = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.AllocRef |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipBadgerpb3(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ManifestChangeSet) 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 ErrIntOverflowBadgerpb3
|
|
}
|
|
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: ManifestChangeSet: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ManifestChangeSet: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Changes = append(m.Changes, &ManifestChange{})
|
|
if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipBadgerpb3(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ManifestChange) 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 ErrIntOverflowBadgerpb3
|
|
}
|
|
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: ManifestChange: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ManifestChange: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
m.Id = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Id |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType)
|
|
}
|
|
m.Op = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Op |= ManifestChange_Operation(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType)
|
|
}
|
|
m.Level = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Level |= uint32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType)
|
|
}
|
|
m.KeyId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.KeyId |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 5:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field EncryptionAlgo", wireType)
|
|
}
|
|
m.EncryptionAlgo = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.EncryptionAlgo |= EncryptionAlgo(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 6:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
|
|
}
|
|
m.Compression = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Compression |= uint32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipBadgerpb3(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Checksum) 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 ErrIntOverflowBadgerpb3
|
|
}
|
|
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: Checksum: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Checksum: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Algo", wireType)
|
|
}
|
|
m.Algo = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Algo |= Checksum_Algorithm(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType)
|
|
}
|
|
m.Sum = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Sum |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipBadgerpb3(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *DataKey) 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 ErrIntOverflowBadgerpb3
|
|
}
|
|
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: DataKey: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DataKey: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType)
|
|
}
|
|
m.KeyId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.KeyId |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
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 ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
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 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Iv", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Iv = append(m.Iv[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Iv == nil {
|
|
m.Iv = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
|
|
}
|
|
m.CreatedAt = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.CreatedAt |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipBadgerpb3(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Match) 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 ErrIntOverflowBadgerpb3
|
|
}
|
|
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: Match: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Match: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Prefix = append(m.Prefix[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Prefix == nil {
|
|
m.Prefix = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IgnoreBytes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBadgerpb3
|
|
}
|
|
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 ErrInvalidLengthBadgerpb3
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.IgnoreBytes = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipBadgerpb3(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthBadgerpb3
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipBadgerpb3(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, ErrIntOverflowBadgerpb3
|
|
}
|
|
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, ErrIntOverflowBadgerpb3
|
|
}
|
|
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, ErrIntOverflowBadgerpb3
|
|
}
|
|
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, ErrInvalidLengthBadgerpb3
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupBadgerpb3
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthBadgerpb3
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthBadgerpb3 = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowBadgerpb3 = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupBadgerpb3 = fmt.Errorf("proto: unexpected end of group")
|
|
)
|