36 lines
646 B
Protocol Buffer
36 lines
646 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package auth;
|
|
|
|
option go_package = "pkg/api/auth";
|
|
|
|
service AuthService {
|
|
rpc SignUp(SignUpRequest) returns (SignUpResponse);
|
|
rpc SignIn(SignInRequest) returns (SignInResponse);
|
|
rpc ValidateToken(ValidateTokenRequest) returns (ValidateTokenResponse);
|
|
}
|
|
|
|
message SignUpRequest {
|
|
string email = 1;
|
|
string username = 2;
|
|
string password = 3;
|
|
}
|
|
message SignUpResponse {
|
|
string token = 1;
|
|
}
|
|
|
|
message SignInRequest {
|
|
string email = 1;
|
|
string password = 2;
|
|
}
|
|
message SignInResponse {
|
|
string token = 1;
|
|
}
|
|
|
|
message ValidateTokenRequest {
|
|
string token = 1;
|
|
}
|
|
message ValidateTokenResponse {
|
|
string user_id = 1;
|
|
}
|