422 lines
9.2 KiB
Go
422 lines
9.2 KiB
Go
// Code generated by Wire. DO NOT EDIT.
|
|
|
|
//go:generate go run -mod=mod github.com/google/wire/cmd/wire
|
|
//go:build !wireinject
|
|
// +build !wireinject
|
|
|
|
package wirex
|
|
|
|
import (
|
|
"context"
|
|
"github.guxuan/haibei/internal/mods"
|
|
"github.guxuan/haibei/internal/mods/activity"
|
|
api5 "github.guxuan/haibei/internal/mods/activity/api"
|
|
biz5 "github.guxuan/haibei/internal/mods/activity/biz"
|
|
dal5 "github.guxuan/haibei/internal/mods/activity/dal"
|
|
"github.guxuan/haibei/internal/mods/app"
|
|
api7 "github.guxuan/haibei/internal/mods/app/api"
|
|
biz7 "github.guxuan/haibei/internal/mods/app/biz"
|
|
dal7 "github.guxuan/haibei/internal/mods/app/dal"
|
|
"github.guxuan/haibei/internal/mods/common"
|
|
api3 "github.guxuan/haibei/internal/mods/common/api"
|
|
biz3 "github.guxuan/haibei/internal/mods/common/biz"
|
|
dal3 "github.guxuan/haibei/internal/mods/common/dal"
|
|
"github.guxuan/haibei/internal/mods/customer"
|
|
api2 "github.guxuan/haibei/internal/mods/customer/api"
|
|
biz2 "github.guxuan/haibei/internal/mods/customer/biz"
|
|
dal2 "github.guxuan/haibei/internal/mods/customer/dal"
|
|
"github.guxuan/haibei/internal/mods/point"
|
|
api6 "github.guxuan/haibei/internal/mods/point/api"
|
|
biz6 "github.guxuan/haibei/internal/mods/point/biz"
|
|
dal6 "github.guxuan/haibei/internal/mods/point/dal"
|
|
"github.guxuan/haibei/internal/mods/product"
|
|
api4 "github.guxuan/haibei/internal/mods/product/api"
|
|
biz4 "github.guxuan/haibei/internal/mods/product/biz"
|
|
dal4 "github.guxuan/haibei/internal/mods/product/dal"
|
|
"github.guxuan/haibei/internal/mods/rbac"
|
|
"github.guxuan/haibei/internal/mods/rbac/api"
|
|
"github.guxuan/haibei/internal/mods/rbac/biz"
|
|
"github.guxuan/haibei/internal/mods/rbac/dal"
|
|
"github.guxuan/haibei/pkg/util"
|
|
)
|
|
|
|
// Injectors from wire.go:
|
|
|
|
func BuildInjector(ctx context.Context) (*Injector, func(), error) {
|
|
db, cleanup, err := InitDB(ctx)
|
|
if err != nil {
|
|
return nil, nil, err
|
|
}
|
|
cacher, cleanup2, err := InitCacher(ctx)
|
|
if err != nil {
|
|
cleanup()
|
|
return nil, nil, err
|
|
}
|
|
auther, cleanup3, err := InitAuth(ctx)
|
|
if err != nil {
|
|
cleanup2()
|
|
cleanup()
|
|
return nil, nil, err
|
|
}
|
|
trans := &util.Trans{
|
|
DB: db,
|
|
}
|
|
menu := &dal.Menu{
|
|
DB: db,
|
|
}
|
|
menuResource := &dal.MenuResource{
|
|
DB: db,
|
|
}
|
|
roleMenu := &dal.RoleMenu{
|
|
DB: db,
|
|
}
|
|
bizMenu := &biz.Menu{
|
|
Cache: cacher,
|
|
Trans: trans,
|
|
MenuDAL: menu,
|
|
MenuResourceDAL: menuResource,
|
|
RoleMenuDAL: roleMenu,
|
|
}
|
|
apiMenu := &api.Menu{
|
|
MenuBIZ: bizMenu,
|
|
}
|
|
role := &dal.Role{
|
|
DB: db,
|
|
}
|
|
userRole := &dal.UserRole{
|
|
DB: db,
|
|
}
|
|
bizRole := &biz.Role{
|
|
Cache: cacher,
|
|
Trans: trans,
|
|
RoleDAL: role,
|
|
RoleMenuDAL: roleMenu,
|
|
UserRoleDAL: userRole,
|
|
}
|
|
apiRole := &api.Role{
|
|
RoleBIZ: bizRole,
|
|
}
|
|
user := &dal.User{
|
|
DB: db,
|
|
}
|
|
bizUser := &biz.User{
|
|
Cache: cacher,
|
|
Trans: trans,
|
|
UserDAL: user,
|
|
UserRoleDAL: userRole,
|
|
}
|
|
apiUser := &api.User{
|
|
UserBIZ: bizUser,
|
|
}
|
|
dalCustomer := &dal2.Customer{
|
|
DB: db,
|
|
}
|
|
login := &biz.Login{
|
|
Cache: cacher,
|
|
Auth: auther,
|
|
UserDAL: user,
|
|
UserRoleDAL: userRole,
|
|
CustomerDAL: dalCustomer,
|
|
MenuDAL: menu,
|
|
UserBIZ: bizUser,
|
|
}
|
|
apiLogin := &api.Login{
|
|
LoginBIZ: login,
|
|
}
|
|
logger := &dal.Logger{
|
|
DB: db,
|
|
}
|
|
bizLogger := &biz.Logger{
|
|
LoggerDAL: logger,
|
|
}
|
|
apiLogger := &api.Logger{
|
|
LoggerBIZ: bizLogger,
|
|
}
|
|
casbinx := &rbac.Casbinx{
|
|
Cache: cacher,
|
|
MenuDAL: menu,
|
|
MenuResourceDAL: menuResource,
|
|
RoleDAL: role,
|
|
}
|
|
rbacRBAC := &rbac.RBAC{
|
|
DB: db,
|
|
MenuAPI: apiMenu,
|
|
RoleAPI: apiRole,
|
|
UserAPI: apiUser,
|
|
LoginAPI: apiLogin,
|
|
LoggerAPI: apiLogger,
|
|
Casbinx: casbinx,
|
|
}
|
|
bizCustomer := &biz2.Customer{
|
|
Cache: cacher,
|
|
Trans: trans,
|
|
CustomerDAL: dalCustomer,
|
|
Auth: auther,
|
|
}
|
|
apiCustomer := &api2.Customer{
|
|
CustomerBIZ: bizCustomer,
|
|
}
|
|
balance := &dal2.Balance{
|
|
DB: db,
|
|
}
|
|
bizBalance := &biz2.Balance{
|
|
Trans: trans,
|
|
BalanceDAL: balance,
|
|
}
|
|
apiBalance := &api2.Balance{
|
|
BalanceBIZ: bizBalance,
|
|
}
|
|
productOrder := &dal2.ProductOrder{
|
|
DB: db,
|
|
}
|
|
bizProductOrder := &biz2.ProductOrder{
|
|
Trans: trans,
|
|
ProductOrderDAL: productOrder,
|
|
}
|
|
apiProductOrder := &api2.ProductOrder{
|
|
ProductOrderBIZ: bizProductOrder,
|
|
}
|
|
customerCustomer := &customer.Customer{
|
|
DB: db,
|
|
CustomerAPI: apiCustomer,
|
|
BalanceAPI: apiBalance,
|
|
ProductOrderAPI: apiProductOrder,
|
|
}
|
|
dalCommon := &dal3.Common{
|
|
DB: db,
|
|
}
|
|
bizCommon := &biz3.Common{
|
|
Trans: trans,
|
|
CommonDAL: dalCommon,
|
|
}
|
|
apiCommon := &api3.Common{
|
|
CommonBIZ: bizCommon,
|
|
}
|
|
banner := &dal3.Banner{
|
|
DB: db,
|
|
}
|
|
bizBanner := &biz3.Banner{
|
|
Trans: trans,
|
|
BannerDAL: banner,
|
|
}
|
|
apiBanner := &api3.Banner{
|
|
BannerBIZ: bizBanner,
|
|
}
|
|
notice := &dal3.Notice{
|
|
DB: db,
|
|
}
|
|
bizNotice := &biz3.Notice{
|
|
Trans: trans,
|
|
NoticeDAL: notice,
|
|
}
|
|
apiNotice := &api3.Notice{
|
|
NoticeBIZ: bizNotice,
|
|
}
|
|
company := &dal3.Company{
|
|
DB: db,
|
|
}
|
|
bizCompany := &biz3.Company{
|
|
Trans: trans,
|
|
CompanyDAL: company,
|
|
}
|
|
apiCompany := &api3.Company{
|
|
CompanyBIZ: bizCompany,
|
|
}
|
|
area := &dal3.Area{
|
|
DB: db,
|
|
}
|
|
bizArea := &biz3.Area{
|
|
Trans: trans,
|
|
AreaDAL: area,
|
|
}
|
|
apiArea := &api3.Area{
|
|
AreaBIZ: bizArea,
|
|
}
|
|
upload := &biz3.Upload{
|
|
Cache: cacher,
|
|
Trans: trans,
|
|
}
|
|
apiUpload := &api3.Upload{
|
|
UploadBIZ: upload,
|
|
}
|
|
receptionCenter := &dal3.ReceptionCenter{
|
|
DB: db,
|
|
}
|
|
bizReceptionCenter := &biz3.ReceptionCenter{
|
|
Trans: trans,
|
|
ReceptionCenterDAL: receptionCenter,
|
|
}
|
|
apiReceptionCenter := &api3.ReceptionCenter{
|
|
ReceptionCenterBIZ: bizReceptionCenter,
|
|
}
|
|
smsLog := &dal3.SMSLog{
|
|
DB: db,
|
|
}
|
|
bizSMSLog := &biz3.SMSLog{
|
|
Trans: trans,
|
|
SMSLogDAL: smsLog,
|
|
}
|
|
apiSMSLog := &api3.SMSLog{
|
|
SMSLogBIZ: bizSMSLog,
|
|
}
|
|
commonCommon := &common.Common{
|
|
DB: db,
|
|
CommonAPI: apiCommon,
|
|
BannerAPI: apiBanner,
|
|
NoticeAPI: apiNotice,
|
|
CompanyAPI: apiCompany,
|
|
AreaAPI: apiArea,
|
|
UploadAPI: apiUpload,
|
|
ReceptionCenterAPI: apiReceptionCenter,
|
|
SMSLogAPI: apiSMSLog,
|
|
}
|
|
dalProduct := &dal4.Product{
|
|
DB: db,
|
|
}
|
|
bizProduct := &biz4.Product{
|
|
Trans: trans,
|
|
ProductDAL: dalProduct,
|
|
}
|
|
apiProduct := &api4.Product{
|
|
ProductBIZ: bizProduct,
|
|
}
|
|
productCategory := &dal4.ProductCategory{
|
|
DB: db,
|
|
}
|
|
bizProductCategory := &biz4.ProductCategory{
|
|
Trans: trans,
|
|
ProductCategoryDAL: productCategory,
|
|
}
|
|
apiProductCategory := &api4.ProductCategory{
|
|
ProductCategoryBIZ: bizProductCategory,
|
|
}
|
|
productProduct := &product.Product{
|
|
DB: db,
|
|
ProductAPI: apiProduct,
|
|
ProductCategoryAPI: apiProductCategory,
|
|
}
|
|
dalActivity := &dal5.Activity{
|
|
DB: db,
|
|
}
|
|
bizActivity := &biz5.Activity{
|
|
Trans: trans,
|
|
ActivityDAL: dalActivity,
|
|
}
|
|
apiActivity := &api5.Activity{
|
|
ActivityBIZ: bizActivity,
|
|
}
|
|
questionnaire := &dal5.Questionnaire{
|
|
DB: db,
|
|
}
|
|
bizQuestionnaire := &biz5.Questionnaire{
|
|
Trans: trans,
|
|
QuestionnaireDAL: questionnaire,
|
|
}
|
|
apiQuestionnaire := &api5.Questionnaire{
|
|
QuestionnaireBIZ: bizQuestionnaire,
|
|
}
|
|
activityDetail := &dal5.ActivityDetail{
|
|
DB: db,
|
|
}
|
|
bizActivityDetail := &biz5.ActivityDetail{
|
|
Trans: trans,
|
|
ActivityDetailDAL: activityDetail,
|
|
}
|
|
apiActivityDetail := &api5.ActivityDetail{
|
|
ActivityDetailBIZ: bizActivityDetail,
|
|
}
|
|
qeustionDetail := &dal5.QeustionDetail{
|
|
DB: db,
|
|
}
|
|
bizQeustionDetail := &biz5.QeustionDetail{
|
|
Trans: trans,
|
|
QeustionDetailDAL: qeustionDetail,
|
|
}
|
|
apiQeustionDetail := &api5.QeustionDetail{
|
|
QeustionDetailBIZ: bizQeustionDetail,
|
|
}
|
|
activityActivity := &activity.Activity{
|
|
DB: db,
|
|
ActivityAPI: apiActivity,
|
|
QuestionnaireAPI: apiQuestionnaire,
|
|
ActivityDetailAPI: apiActivityDetail,
|
|
QeustionDetailAPI: apiQeustionDetail,
|
|
}
|
|
dalPoint := &dal6.Point{
|
|
DB: db,
|
|
}
|
|
bizPoint := &biz6.Point{
|
|
Trans: trans,
|
|
PointDAL: dalPoint,
|
|
}
|
|
apiPoint := &api6.Point{
|
|
PointBIZ: bizPoint,
|
|
}
|
|
grade := &dal6.Grade{
|
|
DB: db,
|
|
}
|
|
bizGrade := &biz6.Grade{
|
|
Trans: trans,
|
|
GradeDAL: grade,
|
|
}
|
|
apiGrade := &api6.Grade{
|
|
GradeBIZ: bizGrade,
|
|
}
|
|
pointPoint := &point.Point{
|
|
DB: db,
|
|
PointAPI: apiPoint,
|
|
GradeAPI: apiGrade,
|
|
}
|
|
dalApp := &dal7.App{
|
|
DB: db,
|
|
}
|
|
bizApp := &biz7.App{
|
|
DB: db,
|
|
Trans: trans,
|
|
AppDAL: dalApp,
|
|
BannerDal: banner,
|
|
NoticeDal: notice,
|
|
ProductDal: dalProduct,
|
|
ProductCategoryDal: productCategory,
|
|
ProductOrderDal: productOrder,
|
|
ActivityDal: dalActivity,
|
|
ActivityDetailDal: activityDetail,
|
|
QuestionnaireDal: questionnaire,
|
|
QeustionDetailDal: qeustionDetail,
|
|
CustomerDal: dalCustomer,
|
|
BalanceDal: balance,
|
|
}
|
|
apiApp := &api7.App{
|
|
AppBIZ: bizApp,
|
|
CustomerBIZ: bizCustomer,
|
|
BannerBIZ: bizBanner,
|
|
ActivityBIZ: bizActivity,
|
|
QuestionnaireBIZ: bizQuestionnaire,
|
|
ProductBIZ: bizProduct,
|
|
}
|
|
appApp := &app.App{
|
|
DB: db,
|
|
AppAPI: apiApp,
|
|
}
|
|
modsMods := &mods.Mods{
|
|
RBAC: rbacRBAC,
|
|
Customer: customerCustomer,
|
|
Common: commonCommon,
|
|
Product: productProduct,
|
|
Activity: activityActivity,
|
|
Point: pointPoint,
|
|
App: appApp,
|
|
}
|
|
injector := &Injector{
|
|
DB: db,
|
|
Cache: cacher,
|
|
Auth: auther,
|
|
M: modsMods,
|
|
}
|
|
return injector, func() {
|
|
cleanup3()
|
|
cleanup2()
|
|
cleanup()
|
|
}, nil
|
|
}
|