All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 5m33s
主要改动: - 新增交互式环境配置脚本 (scripts/setup-env.sh) - 新增本地启动快捷脚本 (scripts/run-local.sh) - 新增环境变量模板文件 (.env.example) - 部署模式改版:使用嵌入式配置 + 环境变量覆盖 - 添加对象存储功能支持 - 改进 IoT 卡片导入任务 - 优化 OpenAPI 文档生成 - 删除旧的配置文件,改用嵌入式默认配置
35 lines
1.8 KiB
Go
35 lines
1.8 KiB
Go
package bootstrap
|
|
|
|
import (
|
|
"github.com/break/junhong_cmp_fiber/internal/handler/admin"
|
|
"github.com/break/junhong_cmp_fiber/internal/handler/app"
|
|
"github.com/break/junhong_cmp_fiber/internal/handler/h5"
|
|
"github.com/go-playground/validator/v10"
|
|
)
|
|
|
|
func initHandlers(svc *services, deps *Dependencies) *Handlers {
|
|
validate := validator.New()
|
|
|
|
return &Handlers{
|
|
Account: admin.NewAccountHandler(svc.Account),
|
|
Role: admin.NewRoleHandler(svc.Role),
|
|
Permission: admin.NewPermissionHandler(svc.Permission),
|
|
PersonalCustomer: app.NewPersonalCustomerHandler(svc.PersonalCustomer, deps.Logger),
|
|
Shop: admin.NewShopHandler(svc.Shop),
|
|
ShopAccount: admin.NewShopAccountHandler(svc.ShopAccount),
|
|
AdminAuth: admin.NewAuthHandler(svc.Auth, validate),
|
|
H5Auth: h5.NewAuthHandler(svc.Auth, validate),
|
|
ShopCommission: admin.NewShopCommissionHandler(svc.ShopCommission),
|
|
CommissionWithdrawal: admin.NewCommissionWithdrawalHandler(svc.CommissionWithdrawal),
|
|
CommissionWithdrawalSetting: admin.NewCommissionWithdrawalSettingHandler(svc.CommissionWithdrawalSetting),
|
|
Enterprise: admin.NewEnterpriseHandler(svc.Enterprise),
|
|
EnterpriseCard: admin.NewEnterpriseCardHandler(svc.EnterpriseCard),
|
|
CustomerAccount: admin.NewCustomerAccountHandler(svc.CustomerAccount),
|
|
MyCommission: admin.NewMyCommissionHandler(svc.MyCommission),
|
|
IotCard: admin.NewIotCardHandler(svc.IotCard),
|
|
IotCardImport: admin.NewIotCardImportHandler(svc.IotCardImport),
|
|
AssetAllocationRecord: admin.NewAssetAllocationRecordHandler(svc.AssetAllocationRecord),
|
|
Storage: admin.NewStorageHandler(deps.StorageService),
|
|
}
|
|
}
|