- add: session-service
- move: redis_cache from database service to utils so it can be reused - update: redis_cache set function to allow creating a key without a lifetime - update: services to use the new get_or_generate_service_id function
This commit is contained in:
36
proto/session_service_api.proto
Normal file
36
proto/session_service_api.proto
Normal file
@@ -0,0 +1,36 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package session_service_api;
|
||||
|
||||
service SessionService {
|
||||
rpc CreateSession (CreateSessionRequest) returns (SessionResponse);
|
||||
rpc GetSession (GetSessionRequest) returns (SessionResponse);
|
||||
rpc DeleteSession (DeleteSessionRequest) returns (Empty);
|
||||
}
|
||||
|
||||
message CreateSessionRequest {
|
||||
string session_id = 1;
|
||||
int32 user_id = 2;
|
||||
string username = 3;
|
||||
int32 character_id = 4;
|
||||
string ip_address = 5;
|
||||
}
|
||||
|
||||
message GetSessionRequest {
|
||||
string session_id = 1;
|
||||
}
|
||||
|
||||
message DeleteSessionRequest {
|
||||
string session_id = 1;
|
||||
}
|
||||
|
||||
message SessionResponse {
|
||||
string session_id = 1;
|
||||
int32 user_id = 2;
|
||||
string username = 3;
|
||||
int32 character_id = 4;
|
||||
string login_time = 5;
|
||||
string ip_address = 6;
|
||||
}
|
||||
|
||||
message Empty {}
|
||||
Reference in New Issue
Block a user