sessions
This commit is contained in:
54
sessions.proto
Normal file
54
sessions.proto
Normal file
@@ -0,0 +1,54 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "git.itzana.me/strafesnet/go-grpc/sessions";
|
||||
|
||||
package sessions;
|
||||
|
||||
service SessionsService {
|
||||
rpc Get(SessionId) returns (SessionResponse);
|
||||
rpc Create(SessionCreate) returns (SessionId);
|
||||
rpc List(ListRequest) returns (SessionList);
|
||||
}
|
||||
|
||||
message SessionIdList { repeated int64 ID = 1; }
|
||||
|
||||
message SessionId { int64 ID = 1; }
|
||||
|
||||
message SessionResponse {
|
||||
int64 ID = 1;
|
||||
uint64 UserID = 2;
|
||||
uint64 MapID = 3;
|
||||
int64 Date = 4;
|
||||
uint32 Duration = 5;
|
||||
}
|
||||
|
||||
message SessionCreate {
|
||||
uint64 UserID = 1;
|
||||
uint64 MapID = 2;
|
||||
int64 Date = 3;
|
||||
uint32 Duration = 4;
|
||||
}
|
||||
|
||||
enum SessionSort {
|
||||
SessionSortDateDescending = 0;
|
||||
}
|
||||
|
||||
message SessionFilter {
|
||||
optional uint64 UserID = 1;
|
||||
optional uint64 MapID = 2;
|
||||
}
|
||||
|
||||
message SessionList { repeated SessionResponse Sessions = 1; }
|
||||
|
||||
message ListRequest {
|
||||
SessionFilter Filter = 1;
|
||||
Pagination Page = 2;
|
||||
Sort SessionSort = 3;
|
||||
}
|
||||
|
||||
message Pagination {
|
||||
uint32 Size = 1;
|
||||
uint32 Number = 2;
|
||||
}
|
||||
|
||||
message NullResponse {}
|
||||
Reference in New Issue
Block a user