go-waku/waku/v2/protocol/pb/waku_store.proto
Richard Ramos 58f739765e
refactor: use int64 timestamps (#189)
* refactor: use int64 timestamps
* fix: changed PB Timestamp index to 10
2022-02-23 11:01:53 -04:00

51 lines
880 B
Protocol Buffer

syntax = "proto3";
package pb;
import "waku_message.proto";
message Index {
bytes digest = 1;
sint64 receiverTime = 2;
sint64 senderTime = 3;
}
message PagingInfo {
uint64 pageSize = 1;
Index cursor = 2;
enum Direction {
BACKWARD = 0;
FORWARD = 1;
}
Direction direction = 3;
}
message ContentFilter {
string contentTopic = 1;
}
message HistoryQuery {
string pubsubTopic = 2;
repeated ContentFilter contentFilters = 3;
PagingInfo pagingInfo = 4; // used for pagination
sint64 startTime = 5;
sint64 endTime = 6;
}
message HistoryResponse {
// the first field is reserved for future use
repeated WakuMessage messages = 2;
PagingInfo pagingInfo = 3;
enum Error {
NONE = 0;
INVALID_CURSOR = 1;
}
Error error = 4;
}
message HistoryRPC {
string request_id = 1;
HistoryQuery query = 2;
HistoryResponse response = 3;
}