feat: 引入签名认证、加密工具包及大量goctl代码生成模板,并更新API、Admin和Node服务逻辑。

This commit is contained in:
2026-02-27 08:49:37 -08:00
parent 9dacd85a89
commit e1896f677c
166 changed files with 2913 additions and 489 deletions
@@ -26,8 +26,8 @@ func NewResetPasswordLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Res
}
}
func (l *ResetPasswordLogic) ResetPassword(req *types.ResetPasswordReq) error {
func (l *ResetPasswordLogic) ResetPassword(req *types.ResetPasswordReq) (resp *types.LoginResp, err error) {
// todo: add your logic here and delete this line
return nil
return
}
@@ -26,7 +26,7 @@ func NewUserLoginLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserLog
}
}
func (l *UserLoginLogic) UserLogin(req *types.UserLoginReq) (resp *types.AuthResp, err error) {
func (l *UserLoginLogic) UserLogin(req *types.UserLoginReq) (resp *types.LoginResp, err error) {
// todo: add your logic here and delete this line
return
@@ -26,7 +26,7 @@ func NewUserRegisterLogic(ctx context.Context, svcCtx *svc.ServiceContext) *User
}
}
func (l *UserRegisterLogic) UserRegister(req *types.UserRegisterReq) (resp *types.AuthResp, err error) {
func (l *UserRegisterLogic) UserRegister(req *types.UserRegisterReq) (resp *types.LoginResp, err error) {
// todo: add your logic here and delete this line
return
+2 -13
View File
@@ -8,7 +8,6 @@ import (
"github.com/zero-ppanel/zero-ppanel/apps/api/internal/svc"
"github.com/zero-ppanel/zero-ppanel/apps/api/internal/types"
"github.com/zero-ppanel/zero-ppanel/apps/rpc/core/core"
"github.com/zeromicro/go-zero/core/logx"
)
@@ -28,17 +27,7 @@ func NewHealthLogic(ctx context.Context, svcCtx *svc.ServiceContext) *HealthLogi
}
func (l *HealthLogic) Health() (resp *types.HealthResp, err error) {
// 调用 RPC 进行 Ping 测试,这能触发全链路追踪 (API -> RPC)
rpcResp, err := l.svcCtx.CoreRpc.Ping(l.ctx, &core.Empty{})
// todo: add your logic here and delete this line
status := "ok"
if err != nil {
status = "rpc_error: " + err.Error()
} else if rpcResp.Msg != "" {
status = rpcResp.Msg
}
return &types.HealthResp{
Status: status,
}, nil
return
}