Files
mayfly-go/server/internal/common/api/common.go

17 lines
290 B
Go
Raw Normal View History

package api
import (
"mayfly-go/pkg/biz"
2023-01-14 16:29:52 +08:00
"mayfly-go/pkg/req"
"mayfly-go/pkg/utils"
)
type Common struct {
}
2023-01-14 16:29:52 +08:00
func (i *Common) RasPublicKey(rc *req.Ctx) {
publicKeyStr, err := utils.GetRsaPublicKey()
biz.ErrIsNilAppendErr(err, "rsa生成公私钥失败")
rc.ResData = publicKeyStr
}