syntax = "proto3"; package core; option go_package = "./core"; // ---------------------------------------------------------------------------- // 通用结构 // ---------------------------------------------------------------------------- message Empty {} message BasicResponse { int32 code = 1; string msg = 2; } // ---------------------------------------------------------------------------- // User 服务定义 // ---------------------------------------------------------------------------- message GetUserInfoReq { int64 id = 1; string email = 2; // 用于根据邮箱查询用户 } message GetUserInfoResp { int64 id = 1; string email = 2; string role = 3; string uuid = 4; string password = 5; // 用于验证密码 bool is_disabled = 6; // 用户是否被禁用 bool is_deleted = 7; // 用户是否已被删除 } // ---------------------------------------------------------------------------- // Node 服务定义 // ---------------------------------------------------------------------------- message GetNodeInfoReq { int64 id = 1; } message GetNodeInfoResp { int64 id = 1; string name = 2; string server = 3; string status = 4; } // ---------------------------------------------------------------------------- // 核心 RPC 服务接口 // ---------------------------------------------------------------------------- service Core { // Ping 检查服务健康状态 rpc Ping(Empty) returns(BasicResponse); // 用户相关 rpc GetUserInfo(GetUserInfoReq) returns(GetUserInfoResp); // 节点相关 rpc GetNodeInfo(GetNodeInfoReq) returns(GetNodeInfoResp); }