Record event & check user relation permission APis

This commit is contained in:
2024-07-15 20:04:03 +08:00
parent ad83100677
commit 4e96bb2cd5
9 changed files with 694 additions and 49 deletions

21
pkg/proto/record.proto Normal file
View File

@ -0,0 +1,21 @@
syntax = "proto3";
option go_package = ".;proto";
package proto;
service EventRecorder {
rpc RecordEvent(RecordEventRequest) returns (RecordEventResponse) {}
}
message RecordEventRequest {
uint64 user_id = 1;
string action = 2;
string target = 3;
string ip = 4;
string user_agent = 5;
}
message RecordEventResponse {
bool is_success = 1;
}