代码拉取完成,页面将自动刷新
同步操作将从 人间喜乐/webook 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
// Code generated by Wire. DO NOT EDIT.
//go:generate go run github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject
package main
import (
"github.com/google/wire"
repository2 "webook/interactive/repository"
cache2 "webook/interactive/repository/cache"
dao2 "webook/interactive/repository/dao"
service2 "webook/interactive/service"
"webook/internal/events/article"
"webook/internal/repository"
"webook/internal/repository/cache"
"webook/internal/repository/dao"
"webook/internal/service"
"webook/internal/web"
"webook/internal/web/jwt"
"webook/ioc"
)
import (
_ "github.com/spf13/viper/remote"
)
// Injectors from wire.go:
func InitWebServer() *App {
cmdable := ioc.InitRedis()
handler := jwt.NewRedisJWTHandler(cmdable)
loggerV1 := ioc.InitLogger()
v := ioc.InitGinMiddlewares(cmdable, handler, loggerV1)
db := ioc.InitDB(loggerV1)
userDao := dao.NewUserDAO(db)
userCache := cache.NewUserCache(cmdable)
userRepository := repository.NewCacheUserRepository(userDao, userCache)
userService := service.NewUserService(userRepository)
codeCache := cache.NewCodeCache(cmdable)
codeRepository := repository.NewCodeRepository(codeCache)
smsService := ioc.InitSMSService()
codeService := service.NewCodeService(codeRepository, smsService)
userHandler := web.NewUserHandler(userService, codeService, handler)
wechatService := ioc.InitWechatService(loggerV1)
oAuth2WechatHandler := web.NewOAuth2WechatHandler(wechatService, userService, handler)
articleDao := dao.NewArticleORMDAO(db)
articleCache := cache.NewArticleRedisCache(cmdable)
articleRepository := repository.NewCacheArticleRepository(articleDao, articleCache, userRepository)
client := ioc.InitSaramaClient()
syncProducer := ioc.InitSyncProducer(client)
producer := article.NewSaramaSyncProducer(syncProducer)
articleService := service.NewArticleService(articleRepository, producer)
clientv3Client := ioc.InitEtcd()
interactiveServiceClient := ioc.InitIntrClient(clientv3Client)
rewardServiceClient := ioc.InitReward()
articleHandler := web.NewArticleHandler(loggerV1, articleService, interactiveServiceClient, rewardServiceClient)
engine := ioc.InitWebServer(v, userHandler, oAuth2WechatHandler, articleHandler)
v2 := ioc.InitConsumers()
rankingCache := cache.NewRankingRedisCache(cmdable)
rankingRepository := repository.NewCachedRankingRepository(rankingCache)
rankingService := service.NewBatchRankingService(interactiveServiceClient, articleService, rankingRepository)
rlockClient := ioc.InitRlockClient(cmdable)
rankingJob := ioc.InitRankingJob(rankingService, rlockClient, loggerV1)
cron := ioc.InitJobs(loggerV1, rankingJob)
app := &App{
server: engine,
consumers: v2,
cron: cron,
}
return app
}
// wire.go:
var interactiveSvcSet = wire.NewSet(dao2.NewGORMInteractiveDao, cache2.NewRedisInteractiveCache, repository2.NewCachedInteractiveRepository, service2.NewInteractiveService)
var rankingSvcSet = wire.NewSet(cache.NewRankingRedisCache, repository.NewCachedRankingRepository, service.NewBatchRankingService)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。