go-nwaku/waku/v2/protocol/waku_store.pb.go

1514 lines
36 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: waku_store.proto
package protocol
import (
encoding_binary "encoding/binary"
fmt "fmt"
proto "github.com/golang/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.ProtoPackageIsVersion3 // please upgrade the proto package
type PagingInfo_Direction int32
const (
PagingInfo_BACKWARD PagingInfo_Direction = 0
PagingInfo_FORWARD PagingInfo_Direction = 1
)
var PagingInfo_Direction_name = map[int32]string{
0: "BACKWARD",
1: "FORWARD",
}
var PagingInfo_Direction_value = map[string]int32{
"BACKWARD": 0,
"FORWARD": 1,
}
func (x PagingInfo_Direction) String() string {
return proto.EnumName(PagingInfo_Direction_name, int32(x))
}
func (PagingInfo_Direction) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ca6891f77a46e680, []int{1, 0}
}
type Index struct {
Digest []byte `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
ReceivedTime float64 `protobuf:"fixed64,2,opt,name=receivedTime,proto3" json:"receivedTime,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Index) Reset() { *m = Index{} }
func (m *Index) String() string { return proto.CompactTextString(m) }
func (*Index) ProtoMessage() {}
func (*Index) Descriptor() ([]byte, []int) {
return fileDescriptor_ca6891f77a46e680, []int{0}
}
func (m *Index) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Index.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 *Index) XXX_Merge(src proto.Message) {
xxx_messageInfo_Index.Merge(m, src)
}
func (m *Index) XXX_Size() int {
return m.Size()
}
func (m *Index) XXX_DiscardUnknown() {
xxx_messageInfo_Index.DiscardUnknown(m)
}
var xxx_messageInfo_Index proto.InternalMessageInfo
func (m *Index) GetDigest() []byte {
if m != nil {
return m.Digest
}
return nil
}
func (m *Index) GetReceivedTime() float64 {
if m != nil {
return m.ReceivedTime
}
return 0
}
type PagingInfo struct {
PageSize uint64 `protobuf:"varint,1,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
Cursor *Index `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
Direction PagingInfo_Direction `protobuf:"varint,3,opt,name=direction,proto3,enum=protocol.PagingInfo_Direction" json:"direction,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PagingInfo) Reset() { *m = PagingInfo{} }
func (m *PagingInfo) String() string { return proto.CompactTextString(m) }
func (*PagingInfo) ProtoMessage() {}
func (*PagingInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ca6891f77a46e680, []int{1}
}
func (m *PagingInfo) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PagingInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PagingInfo.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 *PagingInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_PagingInfo.Merge(m, src)
}
func (m *PagingInfo) XXX_Size() int {
return m.Size()
}
func (m *PagingInfo) XXX_DiscardUnknown() {
xxx_messageInfo_PagingInfo.DiscardUnknown(m)
}
var xxx_messageInfo_PagingInfo proto.InternalMessageInfo
func (m *PagingInfo) GetPageSize() uint64 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *PagingInfo) GetCursor() *Index {
if m != nil {
return m.Cursor
}
return nil
}
func (m *PagingInfo) GetDirection() PagingInfo_Direction {
if m != nil {
return m.Direction
}
return PagingInfo_BACKWARD
}
type HistoryQuery struct {
Topics []string `protobuf:"bytes,1,rep,name=topics,proto3" json:"topics,omitempty"`
PagingInfo *PagingInfo `protobuf:"bytes,2,opt,name=pagingInfo,proto3" json:"pagingInfo,omitempty"`
StartTime float64 `protobuf:"fixed64,3,opt,name=startTime,proto3" json:"startTime,omitempty"`
EndTime float64 `protobuf:"fixed64,4,opt,name=endTime,proto3" json:"endTime,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HistoryQuery) Reset() { *m = HistoryQuery{} }
func (m *HistoryQuery) String() string { return proto.CompactTextString(m) }
func (*HistoryQuery) ProtoMessage() {}
func (*HistoryQuery) Descriptor() ([]byte, []int) {
return fileDescriptor_ca6891f77a46e680, []int{2}
}
func (m *HistoryQuery) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *HistoryQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_HistoryQuery.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 *HistoryQuery) XXX_Merge(src proto.Message) {
xxx_messageInfo_HistoryQuery.Merge(m, src)
}
func (m *HistoryQuery) XXX_Size() int {
return m.Size()
}
func (m *HistoryQuery) XXX_DiscardUnknown() {
xxx_messageInfo_HistoryQuery.DiscardUnknown(m)
}
var xxx_messageInfo_HistoryQuery proto.InternalMessageInfo
func (m *HistoryQuery) GetTopics() []string {
if m != nil {
return m.Topics
}
return nil
}
func (m *HistoryQuery) GetPagingInfo() *PagingInfo {
if m != nil {
return m.PagingInfo
}
return nil
}
func (m *HistoryQuery) GetStartTime() float64 {
if m != nil {
return m.StartTime
}
return 0
}
func (m *HistoryQuery) GetEndTime() float64 {
if m != nil {
return m.EndTime
}
return 0
}
type HistoryResponse struct {
Messages []*WakuMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
PagingInfo *PagingInfo `protobuf:"bytes,2,opt,name=pagingInfo,proto3" json:"pagingInfo,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HistoryResponse) Reset() { *m = HistoryResponse{} }
func (m *HistoryResponse) String() string { return proto.CompactTextString(m) }
func (*HistoryResponse) ProtoMessage() {}
func (*HistoryResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ca6891f77a46e680, []int{3}
}
func (m *HistoryResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *HistoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_HistoryResponse.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 *HistoryResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_HistoryResponse.Merge(m, src)
}
func (m *HistoryResponse) XXX_Size() int {
return m.Size()
}
func (m *HistoryResponse) XXX_DiscardUnknown() {
xxx_messageInfo_HistoryResponse.DiscardUnknown(m)
}
var xxx_messageInfo_HistoryResponse proto.InternalMessageInfo
func (m *HistoryResponse) GetMessages() []*WakuMessage {
if m != nil {
return m.Messages
}
return nil
}
func (m *HistoryResponse) GetPagingInfo() *PagingInfo {
if m != nil {
return m.PagingInfo
}
return nil
}
type HistoryRPC struct {
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
Query *HistoryQuery `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
Response *HistoryResponse `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HistoryRPC) Reset() { *m = HistoryRPC{} }
func (m *HistoryRPC) String() string { return proto.CompactTextString(m) }
func (*HistoryRPC) ProtoMessage() {}
func (*HistoryRPC) Descriptor() ([]byte, []int) {
return fileDescriptor_ca6891f77a46e680, []int{4}
}
func (m *HistoryRPC) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *HistoryRPC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_HistoryRPC.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 *HistoryRPC) XXX_Merge(src proto.Message) {
xxx_messageInfo_HistoryRPC.Merge(m, src)
}
func (m *HistoryRPC) XXX_Size() int {
return m.Size()
}
func (m *HistoryRPC) XXX_DiscardUnknown() {
xxx_messageInfo_HistoryRPC.DiscardUnknown(m)
}
var xxx_messageInfo_HistoryRPC proto.InternalMessageInfo
func (m *HistoryRPC) GetRequestId() string {
if m != nil {
return m.RequestId
}
return ""
}
func (m *HistoryRPC) GetQuery() *HistoryQuery {
if m != nil {
return m.Query
}
return nil
}
func (m *HistoryRPC) GetResponse() *HistoryResponse {
if m != nil {
return m.Response
}
return nil
}
func init() {
proto.RegisterEnum("protocol.PagingInfo_Direction", PagingInfo_Direction_name, PagingInfo_Direction_value)
proto.RegisterType((*Index)(nil), "protocol.Index")
proto.RegisterType((*PagingInfo)(nil), "protocol.PagingInfo")
proto.RegisterType((*HistoryQuery)(nil), "protocol.HistoryQuery")
proto.RegisterType((*HistoryResponse)(nil), "protocol.HistoryResponse")
proto.RegisterType((*HistoryRPC)(nil), "protocol.HistoryRPC")
}
func init() { proto.RegisterFile("waku_store.proto", fileDescriptor_ca6891f77a46e680) }
var fileDescriptor_ca6891f77a46e680 = []byte{
// 426 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0xc1, 0x6e, 0xd4, 0x30,
0x10, 0xad, 0xd9, 0x76, 0x9b, 0xcc, 0xae, 0xe8, 0x6a, 0x04, 0x55, 0xa8, 0x20, 0x5a, 0xe5, 0x00,
0x39, 0xa0, 0x48, 0x04, 0xb8, 0x71, 0x69, 0xb7, 0x42, 0xac, 0x10, 0xa2, 0x18, 0xa4, 0x1e, 0xab,
0x90, 0x0c, 0x91, 0x55, 0x1a, 0xa7, 0xb6, 0x03, 0xb4, 0x5f, 0xc1, 0x81, 0x03, 0x7f, 0xc2, 0x2f,
0x70, 0xe4, 0x13, 0xd0, 0xf2, 0x23, 0x68, 0x1d, 0x27, 0x29, 0x82, 0x13, 0x27, 0xeb, 0xcd, 0x7b,
0x33, 0xf3, 0xfc, 0x06, 0x66, 0x1f, 0xb3, 0xd3, 0xe6, 0x44, 0x1b, 0xa9, 0x28, 0xa9, 0x95, 0x34,
0x12, 0x3d, 0xfb, 0xe4, 0xf2, 0xfd, 0x1e, 0x5a, 0xee, 0x8c, 0xb4, 0xce, 0x4a, 0xc7, 0x46, 0x0b,
0xd8, 0x5a, 0x56, 0x05, 0x7d, 0xc2, 0x5d, 0x18, 0x17, 0xa2, 0x24, 0x6d, 0x02, 0x36, 0x67, 0xf1,
0x94, 0x3b, 0x84, 0x11, 0x4c, 0x15, 0xe5, 0x24, 0x3e, 0x50, 0xf1, 0x46, 0x9c, 0x51, 0x70, 0x6d,
0xce, 0x62, 0xc6, 0xff, 0xa8, 0x45, 0xdf, 0x18, 0xc0, 0x51, 0x56, 0x8a, 0xaa, 0x5c, 0x56, 0xef,
0x24, 0xee, 0x81, 0x57, 0x67, 0x25, 0xbd, 0x16, 0x97, 0x64, 0x87, 0x6d, 0xf2, 0x1e, 0xe3, 0x3d,
0x18, 0xe7, 0x8d, 0xd2, 0x52, 0xd9, 0x41, 0x93, 0x74, 0x27, 0xe9, 0xec, 0x25, 0xd6, 0x07, 0x77,
0x34, 0x3e, 0x01, 0xbf, 0x10, 0x8a, 0x72, 0x23, 0x64, 0x15, 0x8c, 0xe6, 0x2c, 0xbe, 0x9e, 0x86,
0x83, 0x76, 0xd8, 0x96, 0x1c, 0x76, 0x2a, 0x3e, 0x34, 0x44, 0x77, 0xc1, 0xef, 0xeb, 0x38, 0x05,
0xef, 0x60, 0x7f, 0xf1, 0xfc, 0x78, 0x9f, 0x1f, 0xce, 0x36, 0x70, 0x02, 0xdb, 0x4f, 0x5f, 0x72,
0x0b, 0x58, 0xf4, 0x85, 0xc1, 0xf4, 0x99, 0x58, 0xc7, 0x75, 0xf1, 0xaa, 0x21, 0x75, 0xb1, 0x8e,
0xc1, 0xc8, 0x5a, 0xe4, 0x3a, 0x60, 0xf3, 0x51, 0xec, 0x73, 0x87, 0xf0, 0x11, 0x40, 0xdd, 0xef,
0x74, 0xde, 0x6f, 0xfc, 0xcb, 0x0f, 0xbf, 0xa2, 0xc3, 0xdb, 0xe0, 0x6b, 0x93, 0x29, 0x63, 0x93,
0x1b, 0xd9, 0xe4, 0x86, 0x02, 0x06, 0xb0, 0x4d, 0x55, 0x9b, 0xea, 0xa6, 0xe5, 0x3a, 0x18, 0x5d,
0xc2, 0x8e, 0x73, 0xc5, 0x49, 0xd7, 0xb2, 0xd2, 0x84, 0x0f, 0xc0, 0x73, 0x97, 0x6b, 0xad, 0x4d,
0xd2, 0x9b, 0xc3, 0xfa, 0xe3, 0xec, 0xb4, 0x79, 0xd1, 0xb2, 0xbc, 0x97, 0xfd, 0x9f, 0xe7, 0xe8,
0x33, 0x03, 0xe8, 0x96, 0x1f, 0x2d, 0xf0, 0x0e, 0x80, 0xa2, 0xf3, 0x86, 0xb4, 0x39, 0x11, 0x85,
0x3d, 0xa7, 0xcf, 0x7d, 0x57, 0x59, 0x16, 0x78, 0x1f, 0xb6, 0xce, 0xd7, 0xc1, 0xb9, 0xf1, 0xbb,
0xc3, 0xf8, 0xab, 0xb1, 0xf2, 0x56, 0x84, 0x8f, 0xc1, 0x53, 0xee, 0x43, 0x36, 0x8e, 0x49, 0x7a,
0xeb, 0xaf, 0x86, 0xee, 0xc7, 0xbc, 0x97, 0x1e, 0xcc, 0xbe, 0xaf, 0x42, 0xf6, 0x63, 0x15, 0xb2,
0x9f, 0xab, 0x90, 0x7d, 0xfd, 0x15, 0x6e, 0xbc, 0x1d, 0xdb, 0xae, 0x87, 0xbf, 0x03, 0x00, 0x00,
0xff, 0xff, 0x9f, 0x85, 0xef, 0xfb, 0xef, 0x02, 0x00, 0x00,
}
func (m *Index) 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 *Index) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Index) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.ReceivedTime != 0 {
i -= 8
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ReceivedTime))))
i--
dAtA[i] = 0x11
}
if len(m.Digest) > 0 {
i -= len(m.Digest)
copy(dAtA[i:], m.Digest)
i = encodeVarintWakuStore(dAtA, i, uint64(len(m.Digest)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *PagingInfo) 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 *PagingInfo) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PagingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Direction != 0 {
i = encodeVarintWakuStore(dAtA, i, uint64(m.Direction))
i--
dAtA[i] = 0x18
}
if m.Cursor != nil {
{
size, err := m.Cursor.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintWakuStore(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if m.PageSize != 0 {
i = encodeVarintWakuStore(dAtA, i, uint64(m.PageSize))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *HistoryQuery) 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 *HistoryQuery) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *HistoryQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.EndTime != 0 {
i -= 8
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.EndTime))))
i--
dAtA[i] = 0x21
}
if m.StartTime != 0 {
i -= 8
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StartTime))))
i--
dAtA[i] = 0x19
}
if m.PagingInfo != nil {
{
size, err := m.PagingInfo.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintWakuStore(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if len(m.Topics) > 0 {
for iNdEx := len(m.Topics) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Topics[iNdEx])
copy(dAtA[i:], m.Topics[iNdEx])
i = encodeVarintWakuStore(dAtA, i, uint64(len(m.Topics[iNdEx])))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *HistoryResponse) 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 *HistoryResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *HistoryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.PagingInfo != nil {
{
size, err := m.PagingInfo.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintWakuStore(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if len(m.Messages) > 0 {
for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Messages[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintWakuStore(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *HistoryRPC) 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 *HistoryRPC) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *HistoryRPC) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Response != nil {
{
size, err := m.Response.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintWakuStore(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
if m.Query != nil {
{
size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintWakuStore(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if len(m.RequestId) > 0 {
i -= len(m.RequestId)
copy(dAtA[i:], m.RequestId)
i = encodeVarintWakuStore(dAtA, i, uint64(len(m.RequestId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintWakuStore(dAtA []byte, offset int, v uint64) int {
offset -= sovWakuStore(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Index) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Digest)
if l > 0 {
n += 1 + l + sovWakuStore(uint64(l))
}
if m.ReceivedTime != 0 {
n += 9
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *PagingInfo) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.PageSize != 0 {
n += 1 + sovWakuStore(uint64(m.PageSize))
}
if m.Cursor != nil {
l = m.Cursor.Size()
n += 1 + l + sovWakuStore(uint64(l))
}
if m.Direction != 0 {
n += 1 + sovWakuStore(uint64(m.Direction))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *HistoryQuery) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Topics) > 0 {
for _, s := range m.Topics {
l = len(s)
n += 1 + l + sovWakuStore(uint64(l))
}
}
if m.PagingInfo != nil {
l = m.PagingInfo.Size()
n += 1 + l + sovWakuStore(uint64(l))
}
if m.StartTime != 0 {
n += 9
}
if m.EndTime != 0 {
n += 9
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *HistoryResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Messages) > 0 {
for _, e := range m.Messages {
l = e.Size()
n += 1 + l + sovWakuStore(uint64(l))
}
}
if m.PagingInfo != nil {
l = m.PagingInfo.Size()
n += 1 + l + sovWakuStore(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *HistoryRPC) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.RequestId)
if l > 0 {
n += 1 + l + sovWakuStore(uint64(l))
}
if m.Query != nil {
l = m.Query.Size()
n += 1 + l + sovWakuStore(uint64(l))
}
if m.Response != nil {
l = m.Response.Size()
n += 1 + l + sovWakuStore(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovWakuStore(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozWakuStore(x uint64) (n int) {
return sovWakuStore(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Index) 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 ErrIntOverflowWakuStore
}
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: Index: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Index: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowWakuStore
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthWakuStore
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthWakuStore
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Digest = append(m.Digest[:0], dAtA[iNdEx:postIndex]...)
if m.Digest == nil {
m.Digest = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 1 {
return fmt.Errorf("proto: wrong wireType = %d for field ReceivedTime", wireType)
}
var v uint64
if (iNdEx + 8) > l {
return io.ErrUnexpectedEOF
}
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
iNdEx += 8
m.ReceivedTime = float64(math.Float64frombits(v))
default:
iNdEx = preIndex
skippy, err := skipWakuStore(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthWakuStore
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *PagingInfo) 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 ErrIntOverflowWakuStore
}
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: PagingInfo: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PagingInfo: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType)
}
m.PageSize = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowWakuStore
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.PageSize |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Cursor", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowWakuStore
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthWakuStore
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthWakuStore
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Cursor == nil {
m.Cursor = &Index{}
}
if err := m.Cursor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Direction", wireType)
}
m.Direction = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowWakuStore
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Direction |= PagingInfo_Direction(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipWakuStore(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthWakuStore
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *HistoryQuery) 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 ErrIntOverflowWakuStore
}
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: HistoryQuery: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HistoryQuery: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Topics", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowWakuStore
}
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 ErrInvalidLengthWakuStore
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthWakuStore
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Topics = append(m.Topics, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PagingInfo", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowWakuStore
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthWakuStore
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthWakuStore
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.PagingInfo == nil {
m.PagingInfo = &PagingInfo{}
}
if err := m.PagingInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 1 {
return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType)
}
var v uint64
if (iNdEx + 8) > l {
return io.ErrUnexpectedEOF
}
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
iNdEx += 8
m.StartTime = float64(math.Float64frombits(v))
case 4:
if wireType != 1 {
return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType)
}
var v uint64
if (iNdEx + 8) > l {
return io.ErrUnexpectedEOF
}
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
iNdEx += 8
m.EndTime = float64(math.Float64frombits(v))
default:
iNdEx = preIndex
skippy, err := skipWakuStore(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthWakuStore
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *HistoryResponse) 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 ErrIntOverflowWakuStore
}
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: HistoryResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HistoryResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowWakuStore
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthWakuStore
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthWakuStore
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Messages = append(m.Messages, &WakuMessage{})
if err := m.Messages[len(m.Messages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PagingInfo", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowWakuStore
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthWakuStore
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthWakuStore
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.PagingInfo == nil {
m.PagingInfo = &PagingInfo{}
}
if err := m.PagingInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipWakuStore(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthWakuStore
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *HistoryRPC) 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 ErrIntOverflowWakuStore
}
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: HistoryRPC: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HistoryRPC: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowWakuStore
}
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 ErrInvalidLengthWakuStore
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthWakuStore
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.RequestId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowWakuStore
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthWakuStore
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthWakuStore
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Query == nil {
m.Query = &HistoryQuery{}
}
if err := m.Query.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowWakuStore
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthWakuStore
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthWakuStore
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Response == nil {
m.Response = &HistoryResponse{}
}
if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipWakuStore(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthWakuStore
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipWakuStore(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, ErrIntOverflowWakuStore
}
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, ErrIntOverflowWakuStore
}
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, ErrIntOverflowWakuStore
}
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, ErrInvalidLengthWakuStore
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupWakuStore
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthWakuStore
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthWakuStore = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowWakuStore = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupWakuStore = fmt.Errorf("proto: unexpected end of group")
)