| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474 |
- syntax = "proto3";
- package gorpc;
- option go_package = "code.clickto.dev/nomo-server/go-service-pb/client";
- import "pb/common.proto";
- // VpnTag
- message VpnTagVo {
- int64 id = 1;
- string productCode = 2;
- string type = 3;
- string name = 4;
- int64 sort = 5;
- Status status = 6;
- string remark = 7;
- int64 createTime = 8;
- int64 updateTime = 9;
- string otherConfig = 10;
- }
- message VpnTagGetReq { VpnTagVo vo = 1; }
- message VpnTagListReq {
- Page page = 1;
- VpnTagVo vo = 2;
- repeated string productCodes = 3;
- repeated int64 excludeIds = 4;
- }
- message VpnTagListResp {
- int64 total = 1;
- repeated VpnTagVo list = 2;
- }
- message VpnTagBatchAddReq { repeated VpnTagVo list = 1; }
- message VpnTagBatchAddResp { repeated VpnTagVo list = 1; }
- message VpnTagBatchUpdateReq { repeated VpnTagVo list = 1; }
- message VpnTagBatchUpdateResp { repeated VpnTagVo list = 1; }
- message VpnTagBatchDelReq { repeated int64 ids = 1; }
- // VpnTag
- message VpnGroupVo {
- int64 id = 1;
- string productCode = 2;
- string name = 3;
- string icon = 4;
- int64 sort = 5;
- Status status = 6;
- string remark = 7;
- int64 createTime = 8;
- int64 updateTime = 9;
- string version = 10;
- string otherConfig = 11;
- }
- message VpnGroupExVo {
- VpnGroupVo vo = 1;
- repeated int64 tagIds = 2;
- }
- message VpnGroupAddReq {
- VpnGroupVo vo = 1;
- repeated int64 tagIds = 2;
- }
- message VpnGroupGetReq { VpnGroupVo vo = 1; }
- message VpnGroupListReq {
- Page page = 1;
- VpnGroupVo vo = 2;
- repeated string productCodes = 3;
- repeated int64 excludeIds = 4;
- }
- message VpnGroupListResp {
- int64 total = 1;
- repeated VpnGroupVo list = 2;
- }
- message VpnGroupBatchAddReq { repeated VpnGroupExVo list = 1; }
- message VpnGroupBatchAddResp { repeated VpnGroupExVo list = 1; }
- message VpnGroupBatchUpdateReq { repeated VpnGroupExVo list = 1; }
- message VpnGroupBatchUpdateResp { repeated VpnGroupExVo list = 1; }
- message VpnGroupBatchDelReq { repeated int64 ids = 1; }
- // VpnGroupTag
- message VpnGroupTagVo {
- int64 id = 1;
- int64 groupId = 2;
- int64 tagId = 3;
- int64 createTime = 4;
- int64 updateTime = 5;
- }
- message VpnGroupTagListReq {
- Page page = 1;
- VpnGroupTagVo vo = 2;
- repeated int64 groupIds = 3;
- repeated int64 tagIds = 4;
- }
- message VpnGroupTagListResp {
- int64 total = 1;
- repeated VpnGroupTagVo list = 2;
- }
- // VpnLocation
- message VpnLocationVo {
- int64 id = 1;
- int64 groupId = 2;
- string name = 3;
- string code = 4;
- string icon = 5;
- int64 type = 6;
- string displayPolicyConfig = 7;
- string routePolicyConfig = 8;
- int64 sort = 9;
- Status status = 10;
- string remark = 11;
- int64 createTime = 12;
- int64 updateTime = 13;
- string version = 14;
- string otherConfig = 15;
- }
- message VpnLocationExVo {
- VpnLocationVo vo = 1;
- string productCode = 2;
- }
- message VpnLocationGetReq { VpnLocationVo vo = 1; }
- message VpnLocationListReq {
- Page page = 1;
- VpnLocationExVo vo = 2;
- repeated int64 groupIds = 3;
- repeated int64 excludeIds = 4;
- repeated string productCodes = 5;
- }
- message VpnLocationListResp {
- int64 total = 1;
- repeated VpnLocationExVo list = 2;
- }
- message VpnLocationBatchAddReq { repeated VpnLocationVo list = 1; }
- message VpnLocationBatchAddResp { repeated VpnLocationExVo list = 1; }
- message VpnLocationBatchUpdateReq { repeated VpnLocationVo list = 1; }
- message VpnLocationBatchUpdateResp { repeated VpnLocationExVo list = 1; }
- message VpnLocationBatchDelReq { repeated int64 ids = 1; }
- // VpnServer
- message VpnServerVo {
- int64 id = 1;
- int64 instanceId = 2;
- string name = 3;
- string ip = 4;
- int64 port = 5;
- int64 pingPort = 6;
- string netConfig = 7;
- string routePolicyConfig = 8;
- string serverInfo = 9;
- Status status = 10;
- string remark = 11;
- int64 createTime = 12;
- int64 updateTime = 13;
- string version = 14;
- string otherInfo = 15;
- int64 monitorPort = 16;
- }
- message VpnServerExVo {
- VpnServerVo vo = 1;
- repeated int64 locationIds = 2;
- }
- message VpnServerListReq {
- Page page = 1;
- VpnServerVo vo = 2;
- repeated int64 excludeIds = 3; // 排除的ID
- repeated string productCodes = 4;
- repeated int64 locationIds = 5;
- repeated int64 instanceIds = 6;
- }
- message VpnServerListResp {
- int64 total = 1;
- repeated VpnServerVo list = 2;
- }
- message VpnServerExListResp {
- int64 total = 1;
- repeated VpnServerExVo list = 2;
- }
- message VpnServerAddReq {
- VpnServerVo vo = 1;
- repeated int64 locationIds = 2;
- }
- message VpnServerBatchAddReq { repeated VpnServerExVo list = 1; }
- message VpnServerBatchAddResp { repeated VpnServerExVo list = 1; }
- message VpnServerBatchUpdateReq { repeated VpnServerExVo list = 1; }
- message VpnServerBatchUpdateResp { repeated VpnServerExVo list = 1; }
- message VpnServerBatchDelReq { repeated int64 ids = 1; }
- message VpnServerLocationVo {
- int64 id = 1;
- int64 serverId = 2;
- int64 locationId = 3;
- int64 createTime = 4;
- int64 updateTime = 5;
- Status status = 6;
- }
- message VpnServerLocationListReq {
- Page page = 1;
- VpnServerLocationVo vo = 2;
- repeated int64 serverIds = 3;
- repeated int64 locationIds = 4;
- }
- message VpnServerLocationListResp {
- int64 total = 1;
- repeated VpnServerLocationVo list = 2;
- }
- message VpnLocationServerCountVo {
- int64 locationId = 1;
- int64 serverCount = 2;
- }
- message VpnLocationServerCountReq {
- Page page = 1;
- Status status = 2;
- repeated int64 serverIds = 3;
- repeated int64 locationIds = 4;
- }
- message VpnLocationServerCountResp {
- int64 total = 1;
- repeated VpnLocationServerCountVo list = 2;
- }
- message VpnProbeTaskVo {
- int64 id = 1;
- string taskId = 2;
- string filter = 3; // 筛选条件
- string type = 4; // 类型
- string uploadDomain = 5; // 配置
- string params = 6;
- int64 answer = 7;
- float percentage = 8; // 进度百分比
- string result = 9; // 结果
- int64 userId = 10;
- int64 createTime = 11;
- int64 updateTime = 12;
- }
- message VpnProbeTaskListReq {
- Page page = 1;
- VpnProbeTaskVo vo = 2;
- }
- message VpnProbeTaskListResp {
- int64 total = 1;
- repeated VpnProbeTaskVo list = 2;
- }
- message VpnConfigTemplatePlanVo {
- int64 id = 1; // id
- string productCode = 2; // 产品Code
- string name = 3; // 配置名称
- string config = 4; // 保留字段,用于扩展配置
- int64 sort = 5; // 排序
- Status status = 6; // 状态
- string remark = 7; // 备注
- int64 createTime = 8; // 创建时间
- int64 createAt = 9; // 创建者Id
- int64 updateTime = 10; // 更新时间
- int64 updateAt = 11; // 更新者Id
- string version = 12; // 数据版本
- }
- message VpnConfigTemplatePlanDetailVo {
- int64 id = 1; // id
- int64 planId = 2; // 配置模板主表id
- string core = 3; // 内核
- string name = 4; // 名称
- string envs = 5; // 环境变量
- string serverConfig = 6; // 服务端配置
- string clientConfig = 7; // 客户端配置
- string policyConfig = 8; // 策略配置
- int64 sort = 9; // 排序
- Status status = 10; // 状态
- string remark = 11; // 备注
- int64 createTime = 12; // 创建时间
- int64 createAt = 13; // 创建者Id
- int64 updateTime = 14; // 更新时间
- int64 updateAt = 15; // 更新者Id
- string version = 16; // 数据版本
- }
- message VpnConfigTemplatePlanAddReq {
- VpnConfigTemplatePlanVo plan = 1;
- repeated VpnConfigTemplatePlanDetailVo details = 2;
- }
- message VpnConfigTemplatePlanAddResp {
- VpnConfigTemplatePlanVo plan = 1;
- repeated VpnConfigTemplatePlanDetailVo details = 2;
- }
- message VpnConfigTemplatePlanUpdateReq { VpnConfigTemplatePlanVo vo = 1; }
- message VpnConfigTemplatePlanUpdateResp { VpnConfigTemplatePlanVo vo = 1; }
- message VpnConfigTemplatePlanDelReq { repeated int64 ids = 1; }
- message VpnConfigTemplatePlanGetReq { VpnConfigTemplatePlanVo vo = 1; }
- message VpnConfigTemplatePlanGetResp {
- VpnConfigTemplatePlanVo plan = 1;
- repeated VpnConfigTemplatePlanDetailVo details = 2;
- }
- message VpnConfigTemplatePlanListReq {
- Page page = 1;
- VpnConfigTemplatePlanVo vo = 2;
- repeated int64 excludeIds = 3;
- repeated string productCodes = 4;
- }
- message VpnConfigTemplatePlanListResp {
- int64 total = 1;
- repeated VpnConfigTemplatePlanGetResp list = 2;
- }
- message VpnConfigTemplatePlanDetailAddReq {
- VpnConfigTemplatePlanDetailVo vo = 1;
- }
- message VpnConfigTemplatePlanDetailAddResp {
- VpnConfigTemplatePlanDetailVo vo = 1;
- }
- message VpnConfigTemplatePlanDetailUpdateReq {
- VpnConfigTemplatePlanDetailVo vo = 1;
- }
- message VpnConfigTemplatePlanDetailUpdateResp {
- VpnConfigTemplatePlanDetailVo vo = 1;
- }
- message VpnConfigTemplatePlanDetailDelReq { repeated int64 ids = 1; }
- message VpnConfigTemplatePlanDetailGetReq {
- VpnConfigTemplatePlanDetailVo vo = 1;
- }
- message VpnConfigTemplatePlanDetailGetResp {
- VpnConfigTemplatePlanDetailVo vo = 1;
- }
- message VpnConfigTemplatePlanDetailListReq {
- Page page = 1;
- VpnConfigTemplatePlanDetailVo vo = 2;
- repeated int64 planIds = 3;
- repeated int64 excludeIds = 4;
- repeated string productCodes = 5;
- }
- message VpnConfigTemplatePlanDetailListResp {
- int64 total = 1;
- repeated VpnConfigTemplatePlanDetailVo list = 2;
- }
- // govpn 模块,VPN相关服务
- service GoVpnClient {
- rpc Ping(Request) returns (Response);
- // 表的事务操作
- rpc Transaction(TransactionReq) returns (Empty);
- // VpnTag
- rpc VpnTagAdd(VpnTagVo) returns (VpnTagVo);
- rpc VpnTagUpdate(VpnTagVo) returns (VpnTagVo);
- rpc VpnTagDel(Ids) returns (Empty);
- rpc VpnTagGet(VpnTagGetReq) returns (VpnTagVo);
- rpc VpnTagList(VpnTagListReq) returns (VpnTagListResp);
- rpc VpnTagBatchAdd(VpnTagBatchAddReq) returns (VpnTagBatchAddResp);
- rpc VpnTagBatchUpdate(VpnTagBatchUpdateReq) returns (VpnTagBatchUpdateResp);
- // VpnGroup
- rpc VpnGroupAdd(VpnGroupAddReq) returns (VpnGroupVo);
- rpc VpnGroupUpdate(VpnGroupAddReq) returns (Empty);
- rpc VpnGroupDel(Ids) returns (Empty);
- rpc VpnGroupGet(VpnGroupGetReq) returns (VpnGroupVo);
- rpc VpnGroupList(VpnGroupListReq) returns (VpnGroupListResp);
- rpc VpnGroupBatchAdd(VpnGroupBatchAddReq) returns (VpnGroupBatchAddResp);
- rpc VpnGroupBatchUpdate(VpnGroupBatchUpdateReq)
- returns (VpnGroupBatchUpdateResp);
- // VpnGroupTag
- rpc VpnGroupTagAdd(VpnGroupTagVo) returns (VpnGroupTagVo);
- rpc VpnGroupTagUpdate(VpnGroupTagVo) returns (VpnGroupTagVo);
- rpc VpnGroupTagDel(Ids) returns (Empty);
- rpc VpnGroupTagGet(VpnGroupTagVo) returns (VpnGroupTagVo);
- rpc VpnGroupTagList(VpnGroupTagListReq) returns (VpnGroupTagListResp);
- // VpnLocation
- rpc VpnLocationAdd(VpnLocationVo) returns (VpnLocationVo);
- rpc VpnLocationUpdate(VpnLocationVo) returns (Empty);
- rpc VpnLocationDel(Ids) returns (Empty);
- rpc VpnLocationGet(VpnLocationGetReq) returns (VpnLocationVo);
- rpc VpnLocationList(VpnLocationListReq) returns (VpnLocationListResp);
- rpc VpnLocationBatchAdd(VpnLocationBatchAddReq)
- returns (VpnLocationBatchAddResp);
- rpc VpnLocationBatchUpdate(VpnLocationBatchUpdateReq)
- returns (VpnLocationBatchUpdateResp);
- // VpnServer
- rpc VpnServerAdd(VpnServerAddReq) returns (VpnServerAddReq);
- rpc VpnServerUpdate(VpnServerAddReq) returns (VpnServerAddReq);
- rpc VpnServerDel(Ids) returns (Empty);
- rpc VpnServerGet(VpnServerVo) returns (VpnServerVo);
- rpc VpnServerList(VpnServerListReq) returns (VpnServerListResp);
- rpc VpnServerExList(VpnServerListReq) returns (VpnServerExListResp);
- rpc VpnServerBatchAdd(VpnServerBatchAddReq) returns (VpnServerBatchAddResp);
- rpc VpnServerBatchUpdate(VpnServerBatchUpdateReq)
- returns (VpnServerBatchUpdateResp);
- // VpnServerLocation
- rpc VpnServerLocationAdd(VpnServerLocationVo) returns (VpnServerLocationVo);
- rpc VpnServerLocationUpdate(VpnServerLocationVo) returns (Empty);
- rpc VpnServerLocationDel(Ids) returns (Empty);
- rpc VpnServerLocationGet(VpnServerLocationVo) returns (VpnServerLocationVo);
- rpc VpnServerLocationList(VpnServerLocationListReq)
- returns (VpnServerLocationListResp);
- // VpnLocationServerCount
- rpc VpnLocationServerCount(VpnLocationServerCountReq)
- returns (VpnLocationServerCountResp);
- // VpnProbeTask
- rpc VpnProbeTaskAdd(VpnProbeTaskVo) returns (VpnProbeTaskVo);
- rpc VpnProbeTaskUpdate(VpnProbeTaskVo) returns (Empty);
- rpc VpnProbeTaskList(VpnProbeTaskListReq) returns (VpnProbeTaskListResp);
- // VpnConfigTemplatePlan
- rpc VpnConfigTemplatePlanAdd(VpnConfigTemplatePlanAddReq)
- returns (VpnConfigTemplatePlanAddResp);
- rpc VpnConfigTemplatePlanUpdate(VpnConfigTemplatePlanUpdateReq)
- returns (VpnConfigTemplatePlanUpdateResp);
- rpc VpnConfigTemplatePlanDel(VpnConfigTemplatePlanDelReq) returns (Empty);
- rpc VpnConfigTemplatePlanGet(VpnConfigTemplatePlanGetReq)
- returns (VpnConfigTemplatePlanGetResp);
- rpc VpnConfigTemplatePlanList(VpnConfigTemplatePlanListReq)
- returns (VpnConfigTemplatePlanListResp);
- rpc VpnConfigTemplatePlanDetailAdd(VpnConfigTemplatePlanDetailAddReq)
- returns (VpnConfigTemplatePlanDetailAddResp);
- rpc VpnConfigTemplatePlanDetailUpdate(VpnConfigTemplatePlanDetailUpdateReq)
- returns (VpnConfigTemplatePlanDetailUpdateResp);
- rpc VpnConfigTemplatePlanDetailDel(VpnConfigTemplatePlanDetailDelReq) returns (Empty);
- rpc VpnConfigTemplatePlanDetailGet(VpnConfigTemplatePlanDetailGetReq)
- returns (VpnConfigTemplatePlanDetailGetResp);
- rpc VpnConfigTemplatePlanDetailList(VpnConfigTemplatePlanDetailListReq)
- returns (VpnConfigTemplatePlanDetailListResp);
- }
|