Merge branch 'master' of gitlab.fusenpack.com:backend/proto

This commit is contained in:
menghaiwen@fusen.cn
2024-01-30 12:10:08 +08:00
4 changed files with 32 additions and 16 deletions

View File

@@ -76,6 +76,8 @@ func Auto{{.ClientName}}ClientEx(ctx context.Context, opts ...grpc.DialOption) (
return nil, fmt.Errorf("nameClient must be init. call") return nil, fmt.Errorf("nameClient must be init. call")
} }
opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials()))
sel := vo.SelectOneHealthInstanceParam{ sel := vo.SelectOneHealthInstanceParam{
ServiceName: "{{.GrpcServiceName}}", ServiceName: "{{.GrpcServiceName}}",
GroupName: groupName, GroupName: groupName,

View File

@@ -10,7 +10,7 @@ import "service/basic.proto";
//定义服务 //定义服务
service auth { service auth {
// 登录接口 // 检验接口
rpc ValidToken(ValidTokenRequest) returns (ValidTokenResponse) {} rpc ValidToken(ValidTokenRequest) returns (ValidTokenResponse) {}
// Cookie 接受接口 // Cookie 接受接口

View File

@@ -57,7 +57,21 @@ service ldap {
rpc SetLdapGroupAuth(SetLdapGroupAuthReq) returns (SetLdapGroupAuthRsp); rpc SetLdapGroupAuth(SetLdapGroupAuthReq) returns (SetLdapGroupAuthRsp);
//权限组授权--移除 //权限组授权--移除
rpc RemoveLdapGroupAuth(RemoveLdapGroupAuthReq) returns (RemoveLdapGroupAuthRsp); rpc RemoveLdapGroupAuth(RemoveLdapGroupAuthReq) returns (RemoveLdapGroupAuthRsp);
//验证权限组
rpc VerifyAuthorityGroup(VerifyAuthorityGroupReq) returns (VerifyAuthorityGroupRsp);
} }
message VerifyAuthorityGroupReq {
string path = 1;
string method = 2;
string category = 3;
int64 group_id = 4;
}
message VerifyAuthorityGroupRsp {
}
message GetLdapGroupsReq { message GetLdapGroupsReq {
LdapGroupFilter filter = 1; LdapGroupFilter filter = 1;
@@ -308,4 +322,5 @@ message LdapParseTokenRsp{
string UserDn = 1; string UserDn = 1;
int64 UserId = 2; int64 UserId = 2;
string UserEmail = 3; string UserEmail = 3;
int64 group_id = 4;
} }

View File

@@ -70,7 +70,7 @@ message EmailNotifyBasic {
// 默认是 type email // 默认是 type email
message EmailSendReq { message EmailSendReq {
EmailNotifyBasic basic_email = 1; EmailNotifyBasic basic_email = 1; // 邮件基础要素
string title = 2; // 邮件标题 string title = 2; // 邮件标题
string content = 3; // 邮件内容 string content = 3; // 邮件内容
Operator operator = 4; // 操作类型 Operator operator = 4; // 操作类型
@@ -81,10 +81,9 @@ message EmailSendReq {
enum NotifyType { enum NotifyType {
email = 0; // email email = 0; // email
feishu = 1; // 飞书 feishu = 1; // 飞书
wechat = 2; // 微信 // wechat = 2; // 微信
} }
// 操作类型 // 操作类型
enum EmailStatus { enum EmailStatus {
ok = 0; // 成功 ok = 0; // 成功
@@ -94,11 +93,9 @@ enum EmailStatus {
finish = 4; // 结束 finish = 4; // 结束
} }
message EmailSendResp { message EmailSendResp {
EmailStatus status = 1; EmailStatus status = 1; // 邮件的状态
string msg = 2; string msg = 2; // 通知信息
} }
message EmailRegisterReq { message EmailRegisterReq {
@@ -113,8 +110,8 @@ message EmailRegisterResp {
message EmailResetHtmlReq { message EmailResetHtmlReq {
EmailNotifyBasic basic_email = 1; EmailNotifyBasic basic_email = 1; // 邮件基础要素
string confirmation_link = 2; string confirmation_link = 2; // 确认链接
} }
message EmailResetHtmlResp { message EmailResetHtmlResp {
@@ -122,6 +119,7 @@ message EmailResetHtmlResp {
string notify_id = 2; // 通知id string notify_id = 2; // 通知id
} }
// 这个不会接在rpc服务里
message EmailResetConfirmReq { message EmailResetConfirmReq {
string reset_password_link = 1; string reset_password_link = 1;
string reset_token = 2; string reset_token = 2;
@@ -134,8 +132,8 @@ message EmailResetConfirmResp {
message OrderPaymentDetailsReq { message OrderPaymentDetailsReq {
EmailNotifyBasic basic_email = 1; EmailNotifyBasic basic_email = 1; // 邮件基础要素
string payment_details_link = 2; string payment_details_link = 2; // 支付详情链接
} }
message OrderPaymentDetailsResp { message OrderPaymentDetailsResp {
@@ -144,10 +142,11 @@ message OrderPaymentDetailsResp {
} }
message OrderStatusTransitionReq { message OrderStatusTransitionReq {
EmailNotifyBasic basic_email = 1; EmailNotifyBasic basic_email = 1; // 邮件基础要素
string last_status = 2; // 上个状态 string last_status = 2; // 上个状态
string current_status = 3; // 当前状态 string current_status = 3; // 当前状态
string check_status_link = 4; // 检查状态 string check_status_link = 4; // 检查状态
bool is_show_click_text = 5; // 展示 开始生产 到 生产完成时 的特殊显示语句
} }
message OrderStatusTransitionResp { message OrderStatusTransitionResp {
@@ -157,7 +156,7 @@ message OrderStatusTransitionResp {
message OrderPayArrearsReq { message OrderPayArrearsReq {
EmailNotifyBasic basic_email = 1; EmailNotifyBasic basic_email = 1; // 邮件基础要素
string pay_arrears_link = 2; // 检查状态 string pay_arrears_link = 2; // 检查状态
} }