I am batman

This commit is contained in:
2026-06-20 11:07:01 -04:00
commit 013d01358c
52 changed files with 7615 additions and 0 deletions

118
proto/auth.proto Normal file
View File

@@ -0,0 +1,118 @@
syntax = "proto3";
package auth;
// set to your module path + proto path; adjust if your module name differs
option go_package = "go-microservices/proto/auth;authpb";
service AuthService {
rpc SignUp (SignUpRequest) returns (SignUpResponse);
rpc SignIn (SignInRequest) returns (SignInResponse);
rpc ValidateToken (ValidateTokenRequest) returns (ValidateTokenResponse);
rpc GetUserInfo (GetUserInfoRequest) returns (GetUserInfoResponse);
rpc ConfirmEmail (ConfirmEmailRequest) returns (ConfirmEmailResponse);
rpc CreateTest (CreateTestRequest) returns (CreateTestResponse);
rpc ListTests (ListTestsRequest) returns (ListTestsResponse);
rpc GetTest (GetTestRequest) returns (GetTestResponse);
rpc UpdateTest (UpdateTestRequest) returns (UpdateTestResponse);
rpc DeleteTest (DeleteTestRequest) returns (DeleteTestResponse);
}
message SignUpRequest {
string username = 1;
string email = 2;
string password = 3;
}
message SignUpResponse {
string user_id = 1;
string message = 2;
}
message SignInRequest {
string email = 1;
string password = 2;
}
message SignInResponse {
string access_token = 1;
string refresh_token = 2;
string user_id = 3;
string message = 4;
}
message ValidateTokenRequest {
string token = 1;
}
message ValidateTokenResponse {
bool valid = 1;
string user_id = 2;
string message = 3;
}
message GetUserInfoRequest {
string user_id = 1;
}
message GetUserInfoResponse {
string user_id = 1;
string username = 2;
string email = 3;
repeated string roles = 4;
}
message ConfirmEmailRequest {
string token = 1;
}
message ConfirmEmailResponse {
bool success = 1;
}
message Test {
uint64 id = 1;
string content = 2;
string created_at = 3;
}
message CreateTestRequest {
string content = 1;
}
message CreateTestResponse {
Test test = 1;
}
message ListTestsRequest {}
message ListTestsResponse {
repeated Test tests = 1;
}
message GetTestRequest {
uint64 id = 1;
}
message GetTestResponse {
Test test = 1;
}
message UpdateTestRequest {
uint64 id = 1;
string content = 2;
}
message UpdateTestResponse {
Test test = 1;
}
message DeleteTestRequest {
uint64 id = 1;
}
message DeleteTestResponse {
bool success = 1;
string message = 2;
}