protobufs/bots.proto
2022-07-16 21:09:09 -04:00

54 lines
892 B
Protocol Buffer

syntax = "proto3";
option go_package = "pkg/rpc/bots";
package bots;
service BotsService {
rpc Get(IdMessage) returns (BotResponse);
rpc GetList(IdList) returns (BotList);
rpc Update(BotRequest) returns (NullResponse);
rpc Create(BotRequest) returns (IdMessage);
rpc Delete(IdMessage) returns (NullResponse);
rpc List(ListRequest) returns (BotList);
}
message IdList {
repeated int64 ID = 1;
}
message IdMessage {
int64 ID = 1;
}
message BotResponse {
int64 ID = 1;
int64 TimeID = 2;
int64 Date = 3;
string FileID = 4;
}
message BotRequest {
int64 ID = 1;
optional int64 TimeID = 2;
optional int64 Date = 3;
optional string FileID = 4;
}
message BotList {
repeated BotResponse Bots = 1;
}
message ListRequest {
BotRequest Filter = 1;
Pagination Page = 2;
}
message Pagination {
int32 Size = 1;
int32 Number = 2;
}
message NullResponse {
}