mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-16 12:23:12 +00:00
53 lines
1.1 KiB
Protocol Buffer
53 lines
1.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package slash.api.v1;
|
|
|
|
import "api/v1/user_service.proto";
|
|
import "google/api/annotations.proto";
|
|
|
|
option go_package = "gen/api/v1";
|
|
|
|
service AuthService {
|
|
rpc GetAuthStatus(GetAuthStatusRequest) returns (GetAuthStatusResponse) {
|
|
option (google.api.http) = {post: "/api/v1/auth/status"};
|
|
}
|
|
rpc SignIn(SignInRequest) returns (SignInResponse) {
|
|
option (google.api.http) = {post: "/api/v1/auth/signin"};
|
|
}
|
|
rpc SignUp(SignUpRequest) returns (SignUpResponse) {
|
|
option (google.api.http) = {post: "/api/v1/auth/signup"};
|
|
}
|
|
rpc SignOut(SignOutRequest) returns (SignOutResponse) {
|
|
option (google.api.http) = {post: "/api/v1/auth/signout"};
|
|
}
|
|
}
|
|
|
|
message GetAuthStatusRequest {}
|
|
|
|
message GetAuthStatusResponse {
|
|
User user = 1;
|
|
}
|
|
|
|
message SignInRequest {
|
|
string email = 1;
|
|
string password = 2;
|
|
}
|
|
|
|
message SignInResponse {
|
|
User user = 1;
|
|
}
|
|
|
|
message SignUpRequest {
|
|
string email = 1;
|
|
string nickname = 2;
|
|
string password = 3;
|
|
}
|
|
|
|
message SignUpResponse {
|
|
User user = 1;
|
|
}
|
|
|
|
message SignOutRequest {}
|
|
|
|
message SignOutResponse {}
|