refactor: remove Gorse integration and implement HotRank feature
Some checks failed
Build Backend / build-docker (push) Has been cancelled
Build Backend / build (push) Has been cancelled

- Removed Gorse-related configurations, handlers, and dependencies from the codebase.
- Introduced HotRank feature with configuration options for ranking posts based on recent activity.
- Updated application structure to support HotRank processing, including new caching mechanisms and database interactions.
- Cleaned up related DTOs and repository methods to reflect the removal of Gorse and the addition of HotRank functionality.
This commit is contained in:
lafay
2026-03-24 05:18:30 +08:00
parent b41567a39a
commit 176cd20847
32 changed files with 735 additions and 1128 deletions

View File

@@ -8,7 +8,6 @@ import (
"carrot_bbs/internal/model"
"carrot_bbs/internal/pkg/crypto"
"carrot_bbs/internal/pkg/email"
"carrot_bbs/internal/pkg/gorse"
"carrot_bbs/internal/pkg/hook"
"carrot_bbs/internal/pkg/openai"
"carrot_bbs/internal/pkg/redis"
@@ -49,7 +48,6 @@ var InfrastructureSet = wire.NewSet(
ProvideSSEHub,
// 外部服务客户端
ProvideGorseClient,
ProvideOpenAIClient,
ProvideEmailClient,
ProvideS3Client,
@@ -163,11 +161,6 @@ func ProvideSSEHub() *sse.Hub {
return sse.NewHub()
}
// ProvideGorseClient 提供 Gorse 客户端
func ProvideGorseClient(cfg *config.Config) gorse.Client {
return gorse.NewClient(gorse.ConfigFromAppConfig(&cfg.Gorse))
}
// ProvideOpenAIClient 提供 OpenAI 客户端
func ProvideOpenAIClient(cfg *config.Config) openai.Client {
return openai.NewClient(openai.ConfigFromAppConfig(&cfg.OpenAI))