mirror of https://github.com/status-im/go-waku.git
fix: order of fields of History Response protobuf (#35)
This commit is contained in:
parent
c3ac5ef9c5
commit
654f3f8cd4
|
@ -45,6 +45,31 @@ func (PagingInfo_Direction) EnumDescriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_ca6891f77a46e680, []int{1, 0}
|
return fileDescriptor_ca6891f77a46e680, []int{1, 0}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type HistoryResponse_Error int32
|
||||||
|
|
||||||
|
const (
|
||||||
|
HistoryResponse_NONE HistoryResponse_Error = 0
|
||||||
|
HistoryResponse_INVALID_CURSOR HistoryResponse_Error = 1
|
||||||
|
)
|
||||||
|
|
||||||
|
var HistoryResponse_Error_name = map[int32]string{
|
||||||
|
0: "NONE",
|
||||||
|
1: "INVALID_CURSOR",
|
||||||
|
}
|
||||||
|
|
||||||
|
var HistoryResponse_Error_value = map[string]int32{
|
||||||
|
"NONE": 0,
|
||||||
|
"INVALID_CURSOR": 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x HistoryResponse_Error) String() string {
|
||||||
|
return proto.EnumName(HistoryResponse_Error_name, int32(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (HistoryResponse_Error) EnumDescriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_ca6891f77a46e680, []int{4, 0}
|
||||||
|
}
|
||||||
|
|
||||||
type Index struct {
|
type Index struct {
|
||||||
Digest []byte `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
|
Digest []byte `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
|
||||||
ReceiverTime float64 `protobuf:"fixed64,2,opt,name=receiverTime,proto3" json:"receiverTime,omitempty"`
|
ReceiverTime float64 `protobuf:"fixed64,2,opt,name=receiverTime,proto3" json:"receiverTime,omitempty"`
|
||||||
|
@ -266,8 +291,10 @@ func (m *HistoryQuery) GetEndTime() float64 {
|
||||||
}
|
}
|
||||||
|
|
||||||
type HistoryResponse struct {
|
type HistoryResponse struct {
|
||||||
Messages []*WakuMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
|
// the first field is reserved for future use
|
||||||
PagingInfo *PagingInfo `protobuf:"bytes,2,opt,name=pagingInfo,proto3" json:"pagingInfo,omitempty"`
|
Messages []*WakuMessage `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
|
||||||
|
PagingInfo *PagingInfo `protobuf:"bytes,3,opt,name=pagingInfo,proto3" json:"pagingInfo,omitempty"`
|
||||||
|
Error HistoryResponse_Error `protobuf:"varint,4,opt,name=error,proto3,enum=pb.HistoryResponse_Error" json:"error,omitempty"`
|
||||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
XXX_unrecognized []byte `json:"-"`
|
XXX_unrecognized []byte `json:"-"`
|
||||||
XXX_sizecache int32 `json:"-"`
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
@ -312,6 +339,13 @@ func (m *HistoryResponse) GetPagingInfo() *PagingInfo {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *HistoryResponse) GetError() HistoryResponse_Error {
|
||||||
|
if m != nil {
|
||||||
|
return m.Error
|
||||||
|
}
|
||||||
|
return HistoryResponse_NONE
|
||||||
|
}
|
||||||
|
|
||||||
type HistoryRPC struct {
|
type HistoryRPC struct {
|
||||||
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
|
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"`
|
Query *HistoryQuery `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
|
||||||
|
@ -369,6 +403,7 @@ func (m *HistoryRPC) GetResponse() *HistoryResponse {
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterEnum("pb.PagingInfo_Direction", PagingInfo_Direction_name, PagingInfo_Direction_value)
|
proto.RegisterEnum("pb.PagingInfo_Direction", PagingInfo_Direction_name, PagingInfo_Direction_value)
|
||||||
|
proto.RegisterEnum("pb.HistoryResponse_Error", HistoryResponse_Error_name, HistoryResponse_Error_value)
|
||||||
proto.RegisterType((*Index)(nil), "pb.Index")
|
proto.RegisterType((*Index)(nil), "pb.Index")
|
||||||
proto.RegisterType((*PagingInfo)(nil), "pb.PagingInfo")
|
proto.RegisterType((*PagingInfo)(nil), "pb.PagingInfo")
|
||||||
proto.RegisterType((*ContentFilter)(nil), "pb.ContentFilter")
|
proto.RegisterType((*ContentFilter)(nil), "pb.ContentFilter")
|
||||||
|
@ -382,34 +417,37 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var fileDescriptor_ca6891f77a46e680 = []byte{
|
var fileDescriptor_ca6891f77a46e680 = []byte{
|
||||||
// 457 bytes of a gzipped FileDescriptorProto
|
// 509 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0x5d, 0x6b, 0x13, 0x41,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x6f, 0x6b, 0x13, 0x41,
|
||||||
0x14, 0x75, 0x92, 0x26, 0xcd, 0xde, 0x8d, 0x69, 0xbc, 0x82, 0x2c, 0x45, 0x25, 0xee, 0x43, 0x09,
|
0x10, 0xc6, 0xbb, 0xf9, 0xd7, 0xdc, 0x24, 0xa6, 0x71, 0x04, 0x39, 0x8b, 0x4a, 0x3c, 0xb0, 0x04,
|
||||||
0x08, 0x2b, 0xa4, 0x20, 0xf8, 0x58, 0x53, 0x8a, 0x41, 0xc4, 0x3a, 0x16, 0xfa, 0x58, 0xf6, 0xe3,
|
0x84, 0x2b, 0xa4, 0x20, 0xf8, 0x32, 0x26, 0x2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xa0, 0x03, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,14 @@ message HistoryQuery {
|
||||||
}
|
}
|
||||||
|
|
||||||
message HistoryResponse {
|
message HistoryResponse {
|
||||||
repeated WakuMessage messages = 1;
|
// the first field is reserved for future use
|
||||||
PagingInfo pagingInfo = 2; // used for pagination
|
repeated WakuMessage messages = 2;
|
||||||
|
PagingInfo pagingInfo = 3;
|
||||||
|
enum Error {
|
||||||
|
NONE = 0;
|
||||||
|
INVALID_CURSOR = 1;
|
||||||
|
}
|
||||||
|
Error error = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message HistoryRPC {
|
message HistoryRPC {
|
||||||
|
|
Loading…
Reference in New Issue