Files
evening_detective_server/api/main.proto
T
2026-07-06 12:58:27 +07:00

99 lines
1.6 KiB
Protocol Buffer

syntax = "proto3";
package crabs.evening_detective_server;
import "google/api/annotations.proto";
option go_package = "pkg/proto";
service EveningDetectiveServer {
rpc Ping(PingReq) returns (PingRsp) {
option (google.api.http) = {
get: "/api/ping"
};
}
rpc Echo(EchoReq) returns (EchoRsp) {
option (google.api.http) = {
post: "/api/echo"
};
}
rpc Signup(SignupReq) returns (SignupRsp) {
option (google.api.http) = {
post: "/api/signup"
body: "*"
};
}
rpc RefreshPassword(RefreshPasswordReq) returns (RefreshPasswordRsp) {
option (google.api.http) = {
post: "/api/refresh-password"
body: "*"
};
}
rpc Login(LoginReq) returns (LoginRsp) {
option (google.api.http) = {
post: "/api/login"
body: "*"
};
}
rpc Refresh(RefreshReq) returns (RefreshRsp) {
option (google.api.http) = {
post: "/api/refresh"
body: "*"
};
}
}
message PingReq {}
message PingRsp {}
message EchoReq {
string text = 1;
}
message EchoRsp {
string text = 1;
}
message SignupReq {
string username = 1;
string email = 2;
}
message SignupRsp {
string error = 1;
}
message RefreshPasswordReq {
string email = 1;
}
message RefreshPasswordRsp {
string error = 1;
}
message LoginReq {
string email = 1;
string password = 2;
}
message LoginRsp {
string error = 1;
string accessToken = 2;
string refreshToken = 3;
}
message RefreshReq {
string refreshToken = 1;
}
message RefreshRsp {
string error = 1;
string accessToken = 2;
string refreshToken = 3;
}