fix(backend): 移除对已删除 ports 包的依赖
适配 main 分支的 ports 目录删除重构: - 将 ports 包中的接口移至 service 包 - 更新 repository 层的导入路径
This commit is contained in:
@@ -21,7 +21,6 @@ import (
|
||||
"github.com/Wei-Shaw/sub2api/internal/model"
|
||||
"github.com/Wei-Shaw/sub2api/internal/pkg/geminicli"
|
||||
"github.com/Wei-Shaw/sub2api/internal/pkg/googleapi"
|
||||
"github.com/Wei-Shaw/sub2api/internal/service/ports"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -35,19 +34,19 @@ const (
|
||||
)
|
||||
|
||||
type GeminiMessagesCompatService struct {
|
||||
accountRepo ports.AccountRepository
|
||||
cache ports.GatewayCache
|
||||
accountRepo AccountRepository
|
||||
cache GatewayCache
|
||||
tokenProvider *GeminiTokenProvider
|
||||
rateLimitService *RateLimitService
|
||||
httpUpstream ports.HTTPUpstream
|
||||
httpUpstream HTTPUpstream
|
||||
}
|
||||
|
||||
func NewGeminiMessagesCompatService(
|
||||
accountRepo ports.AccountRepository,
|
||||
cache ports.GatewayCache,
|
||||
accountRepo AccountRepository,
|
||||
cache GatewayCache,
|
||||
tokenProvider *GeminiTokenProvider,
|
||||
rateLimitService *RateLimitService,
|
||||
httpUpstream ports.HTTPUpstream,
|
||||
httpUpstream HTTPUpstream,
|
||||
) *GeminiMessagesCompatService {
|
||||
return &GeminiMessagesCompatService{
|
||||
accountRepo: accountRepo,
|
||||
|
||||
Reference in New Issue
Block a user