1 Star 0 Fork 0

ichub/gogateway

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gateway_request_init.go 1.03 KB
一键复制 编辑 原始数据 按行查看 历史
leijmdas 提交于 2024-06-16 19:28 . add
package dto
import (
"gitee.com/ichub/goconfig/common/base/baseiface"
"gitee.com/ichub/goconfig/common/basedi"
"github.com/sirupsen/logrus"
)
/*
@Title 文件名称: gateway_request_init.go
@Desp 描述: 自动注册注入
@Author 作者: LEIJMDAS@163.COM 时间(2024-05-05 09:00:17)
@Update 作者: LEIJMDAS@163.COM 时间(2024-05-05 09:00:17)
*/
const singleNameGatewayRequest = "dto.GatewayRequest"
// init center load
func init() {
registerBeanGatewayRequest()
}
// center GatewayRequest
func registerBeanGatewayRequest() {
basedi.RegisterLoadBean(singleNameGatewayRequest, LoadGatewayRequest)
}
func FindBeanGatewayRequest() *GatewayRequest {
bean, ok := basedi.FindBean(singleNameGatewayRequest).(*GatewayRequest)
if !ok {
logrus.Errorf("FindBeanGatewayRequest: failed to cast bean to *GatewayRequest")
return nil
}
return bean
}
func LoadGatewayRequest() baseiface.ISingleton {
var s = NewGatewayRequest()
InjectGatewayRequest(s)
return s
}
func InjectGatewayRequest(s *GatewayRequest) {
logrus.Debug("inject")
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ichub/gogateway.git
git@gitee.com:ichub/gogateway.git
ichub
gogateway
gogateway
954c9c1ec508

搜索帮助