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