1 Star 0 Fork 0

CaptialSTeam/ubdframe

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
app.go 1.43 KB
一键复制 编辑 原始数据 按行查看 历史
sage 提交于 2024-12-23 11:55 +08:00 . modify
// @title Web模块API
// @version 1.0
// @description This is a sample server celler server.
// @termsOfService http://swagger.io/terms/
// @contact.name API Support
// @contact.url http://www.swagger.io/support
// @contact.email sage12345678@qq.com
// @license.name Apache 2.0
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
// @host localhost:8080
// @BasePath /
// @schemes http https
// @produce json,html
// @securityDefinitions.basic BasicAuth
// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name Authorization
// @description Api-Token, Header: Authorization
// @externalDocs.description OpenAPI
// @externalDocs.url https://swagger.io/resources/open-api/
package webapp
import (
"gitee.com/captials-team/ubdframe/src/apps"
"gitee.com/captials-team/ubdframe/src/common"
"gitee.com/captials-team/ubdframe/src/domain/configstc"
v1log "gitee.com/captials-team/ubdframe/src/pkg/logs"
"go.uber.org/dig"
)
type App struct {
*apps.App
di *dig.Container
Conf *configstc.WebAppConfig
ApiServer *ApiServer
}
func NewApp(di *dig.Container, conf *configstc.WebAppConfig, logger v1log.ILog) *App {
app := &App{
di: di,
Conf: conf,
App: apps.NewApp(di, "web_app"),
}
common.ErrPanic(di.Provide(NewApiServer))
common.ErrPanic(di.Invoke(func(api *ApiServer) {
app.WithApiServer(api)
app.ApiServer = api
}))
return app
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/captials-team/ubdframe.git
git@gitee.com:captials-team/ubdframe.git
captials-team
ubdframe
ubdframe
v1.0.2

搜索帮助