Files
tunnel-please-grpc/proto/user.proto
2026-01-02 23:00:39 +07:00

44 lines
760 B
Protocol Buffer

syntax = "proto3";
package slug;
option go_package = "./gen";
import "google/protobuf/timestamp.proto";
service UserService {
rpc Check(CheckRequest) returns (CheckResponse);
}
service UserSessions {
rpc GetSession(GetSessionRequest) returns (GetSessionsResponse);
}
enum AuthorizationResponse {
MESSAGE_TYPE_AUTHORIZED= 0;
MESSAGE_TYPE_UNAUTHORIZED = 1;
}
message CheckRequest {
string auth_token = 1;
}
message CheckResponse {
AuthorizationResponse response = 1;
}
message GetSessionRequest {
string identity = 1;
}
message GetSessionsResponse {
repeated Detail details = 1;
}
message Detail {
string forwarding_type = 1;
string slug = 2;
string user_id = 3;
bool active = 4;
google.protobuf.Timestamp started_at = 5;
}