mirror of https://gitee.com/answerdev/answer.git
style: repo change directories
This commit is contained in:
parent
3c8bdcde29
commit
792ef23218
|
@ -14,9 +14,9 @@ import (
|
|||
"github.com/answerdev/answer/internal/base/translator"
|
||||
"github.com/answerdev/answer/internal/controller"
|
||||
"github.com/answerdev/answer/internal/controller_backyard"
|
||||
"github.com/answerdev/answer/internal/repo"
|
||||
"github.com/answerdev/answer/internal/repo/activity"
|
||||
"github.com/answerdev/answer/internal/repo/activity_common"
|
||||
"github.com/answerdev/answer/internal/repo/answer"
|
||||
"github.com/answerdev/answer/internal/repo/auth"
|
||||
"github.com/answerdev/answer/internal/repo/captcha"
|
||||
"github.com/answerdev/answer/internal/repo/collection"
|
||||
|
@ -26,10 +26,12 @@ import (
|
|||
"github.com/answerdev/answer/internal/repo/export"
|
||||
"github.com/answerdev/answer/internal/repo/meta"
|
||||
"github.com/answerdev/answer/internal/repo/notification"
|
||||
"github.com/answerdev/answer/internal/repo/question"
|
||||
"github.com/answerdev/answer/internal/repo/rank"
|
||||
"github.com/answerdev/answer/internal/repo/reason"
|
||||
"github.com/answerdev/answer/internal/repo/report"
|
||||
"github.com/answerdev/answer/internal/repo/revision"
|
||||
"github.com/answerdev/answer/internal/repo/search_common"
|
||||
"github.com/answerdev/answer/internal/repo/site_info"
|
||||
"github.com/answerdev/answer/internal/repo/tag"
|
||||
"github.com/answerdev/answer/internal/repo/unique"
|
||||
|
@ -93,7 +95,7 @@ func initApplication(debug bool, serverConf *conf.Server, dbConf *data.Database,
|
|||
configRepo := config.NewConfigRepo(dataData)
|
||||
userRepo := user.NewUserRepo(dataData, configRepo)
|
||||
uniqueIDRepo := unique.NewUniqueIDRepo(dataData)
|
||||
activityRepo := repo.NewActivityRepo(dataData, uniqueIDRepo, configRepo)
|
||||
activityRepo := activity_common.NewActivityRepo(dataData, uniqueIDRepo, configRepo)
|
||||
userRankRepo := rank.NewUserRankRepo(dataData, configRepo)
|
||||
userActiveActivityRepo := activity.NewUserActiveActivityRepo(dataData, activityRepo, userRankRepo, configRepo)
|
||||
emailRepo := export.NewEmailRepo(dataData)
|
||||
|
@ -106,8 +108,8 @@ func initApplication(debug bool, serverConf *conf.Server, dbConf *data.Database,
|
|||
commentRepo := comment.NewCommentRepo(dataData, uniqueIDRepo)
|
||||
commentCommonRepo := comment.NewCommentCommonRepo(dataData, uniqueIDRepo)
|
||||
userCommon := usercommon.NewUserCommon(userRepo)
|
||||
answerRepo := repo.NewAnswerRepo(dataData, uniqueIDRepo, userRankRepo, activityRepo)
|
||||
questionRepo := repo.NewQuestionRepo(dataData, uniqueIDRepo)
|
||||
answerRepo := answer.NewAnswerRepo(dataData, uniqueIDRepo, userRankRepo, activityRepo)
|
||||
questionRepo := question.NewQuestionRepo(dataData, uniqueIDRepo)
|
||||
tagRepo := tag.NewTagRepo(dataData, uniqueIDRepo)
|
||||
objService := object_info.NewObjService(answerRepo, questionRepo, commentCommonRepo, tagRepo)
|
||||
voteRepo := activity_common.NewVoteRepo(dataData, activityRepo)
|
||||
|
@ -146,7 +148,7 @@ func initApplication(debug bool, serverConf *conf.Server, dbConf *data.Database,
|
|||
questionController := controller.NewQuestionController(questionService, rankService)
|
||||
answerService := service.NewAnswerService(answerRepo, questionRepo, questionCommon, userCommon, collectionCommon, userRepo, revisionService, answerActivityService, answerCommon, voteRepo)
|
||||
answerController := controller.NewAnswerController(answerService, rankService)
|
||||
searchRepo := repo.NewSearchRepo(dataData, uniqueIDRepo, userCommon)
|
||||
searchRepo := search_common.NewSearchRepo(dataData, uniqueIDRepo, userCommon)
|
||||
searchService := service.NewSearchService(searchRepo, tagRepo, userCommon, followRepo)
|
||||
searchController := controller.NewSearchController(searchService)
|
||||
serviceRevisionService := service.NewRevisionService(revisionRepo, userCommon, questionCommon, answerService)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package repo
|
||||
package activity_common
|
||||
|
||||
import (
|
||||
"context"
|
|
@ -1,4 +1,4 @@
|
|||
package repo
|
||||
package answer
|
||||
|
||||
import (
|
||||
"context"
|
|
@ -4,6 +4,7 @@ import (
|
|||
"github.com/answerdev/answer/internal/base/data"
|
||||
"github.com/answerdev/answer/internal/repo/activity"
|
||||
"github.com/answerdev/answer/internal/repo/activity_common"
|
||||
"github.com/answerdev/answer/internal/repo/answer"
|
||||
"github.com/answerdev/answer/internal/repo/auth"
|
||||
"github.com/answerdev/answer/internal/repo/captcha"
|
||||
"github.com/answerdev/answer/internal/repo/collection"
|
||||
|
@ -13,10 +14,12 @@ import (
|
|||
"github.com/answerdev/answer/internal/repo/export"
|
||||
"github.com/answerdev/answer/internal/repo/meta"
|
||||
"github.com/answerdev/answer/internal/repo/notification"
|
||||
"github.com/answerdev/answer/internal/repo/question"
|
||||
"github.com/answerdev/answer/internal/repo/rank"
|
||||
"github.com/answerdev/answer/internal/repo/reason"
|
||||
"github.com/answerdev/answer/internal/repo/report"
|
||||
"github.com/answerdev/answer/internal/repo/revision"
|
||||
"github.com/answerdev/answer/internal/repo/search_common"
|
||||
"github.com/answerdev/answer/internal/repo/site_info"
|
||||
"github.com/answerdev/answer/internal/repo/tag"
|
||||
"github.com/answerdev/answer/internal/repo/unique"
|
||||
|
@ -41,9 +44,9 @@ var ProviderSetRepo = wire.NewSet(
|
|||
user.NewUserRepo,
|
||||
user.NewUserBackyardRepo,
|
||||
rank.NewUserRankRepo,
|
||||
NewQuestionRepo,
|
||||
NewAnswerRepo,
|
||||
NewActivityRepo,
|
||||
question.NewQuestionRepo,
|
||||
answer.NewAnswerRepo,
|
||||
activity_common.NewActivityRepo,
|
||||
activity.NewVoteRepo,
|
||||
activity.NewFollowRepo,
|
||||
activity.NewAnswerActivityRepo,
|
||||
|
@ -55,7 +58,7 @@ var ProviderSetRepo = wire.NewSet(
|
|||
collection.NewCollectionGroupRepo,
|
||||
auth.NewAuthRepo,
|
||||
revision.NewRevisionRepo,
|
||||
NewSearchRepo,
|
||||
search_common.NewSearchRepo,
|
||||
meta.NewMetaRepo,
|
||||
export.NewEmailRepo,
|
||||
reason.NewReasonRepo,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package repo
|
||||
package question
|
||||
|
||||
import (
|
||||
"context"
|
|
@ -1,4 +1,4 @@
|
|||
package repo
|
||||
package search_common
|
||||
|
||||
import (
|
||||
"context"
|
Loading…
Reference in New Issue