Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
f862ddc9
Commit
f862ddc9
authored
Jan 15, 2026
by
yangjianbo
Browse files
style: 修复 gofmt 格式化问题
Co-Authored-By:
Claude Opus 4.5
<
noreply@anthropic.com
>
parent
b5903230
Changes
2
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/gateway_service.go
View file @
f862ddc9
...
@@ -144,22 +144,22 @@ func (e *UpstreamFailoverError) Error() string {
...
@@ -144,22 +144,22 @@ func (e *UpstreamFailoverError) Error() string {
// GatewayService handles API gateway operations
// GatewayService handles API gateway operations
type
GatewayService
struct
{
type
GatewayService
struct
{
accountRepo
AccountRepository
accountRepo
AccountRepository
groupRepo
GroupRepository
groupRepo
GroupRepository
usageLogRepo
UsageLogRepository
usageLogRepo
UsageLogRepository
userRepo
UserRepository
userRepo
UserRepository
userSubRepo
UserSubscriptionRepository
userSubRepo
UserSubscriptionRepository
cache
GatewayCache
cache
GatewayCache
cfg
*
config
.
Config
cfg
*
config
.
Config
schedulerSnapshot
*
SchedulerSnapshotService
schedulerSnapshot
*
SchedulerSnapshotService
billingService
*
BillingService
billingService
*
BillingService
rateLimitService
*
RateLimitService
rateLimitService
*
RateLimitService
billingCacheService
*
BillingCacheService
billingCacheService
*
BillingCacheService
identityService
*
IdentityService
identityService
*
IdentityService
httpUpstream
HTTPUpstream
httpUpstream
HTTPUpstream
deferredService
*
DeferredService
deferredService
*
DeferredService
concurrencyService
*
ConcurrencyService
concurrencyService
*
ConcurrencyService
claudeTokenProvider
*
ClaudeTokenProvider
claudeTokenProvider
*
ClaudeTokenProvider
}
}
// NewGatewayService creates a new GatewayService
// NewGatewayService creates a new GatewayService
...
@@ -182,22 +182,22 @@ func NewGatewayService(
...
@@ -182,22 +182,22 @@ func NewGatewayService(
claudeTokenProvider
*
ClaudeTokenProvider
,
claudeTokenProvider
*
ClaudeTokenProvider
,
)
*
GatewayService
{
)
*
GatewayService
{
return
&
GatewayService
{
return
&
GatewayService
{
accountRepo
:
accountRepo
,
accountRepo
:
accountRepo
,
groupRepo
:
groupRepo
,
groupRepo
:
groupRepo
,
usageLogRepo
:
usageLogRepo
,
usageLogRepo
:
usageLogRepo
,
userRepo
:
userRepo
,
userRepo
:
userRepo
,
userSubRepo
:
userSubRepo
,
userSubRepo
:
userSubRepo
,
cache
:
cache
,
cache
:
cache
,
cfg
:
cfg
,
cfg
:
cfg
,
schedulerSnapshot
:
schedulerSnapshot
,
schedulerSnapshot
:
schedulerSnapshot
,
concurrencyService
:
concurrencyService
,
concurrencyService
:
concurrencyService
,
billingService
:
billingService
,
billingService
:
billingService
,
rateLimitService
:
rateLimitService
,
rateLimitService
:
rateLimitService
,
billingCacheService
:
billingCacheService
,
billingCacheService
:
billingCacheService
,
identityService
:
identityService
,
identityService
:
identityService
,
httpUpstream
:
httpUpstream
,
httpUpstream
:
httpUpstream
,
deferredService
:
deferredService
,
deferredService
:
deferredService
,
claudeTokenProvider
:
claudeTokenProvider
,
claudeTokenProvider
:
claudeTokenProvider
,
}
}
}
}
...
...
backend/internal/service/openai_gateway_service.go
View file @
f862ddc9
...
@@ -80,20 +80,20 @@ type OpenAIForwardResult struct {
...
@@ -80,20 +80,20 @@ type OpenAIForwardResult struct {
// OpenAIGatewayService handles OpenAI API gateway operations
// OpenAIGatewayService handles OpenAI API gateway operations
type
OpenAIGatewayService
struct
{
type
OpenAIGatewayService
struct
{
accountRepo
AccountRepository
accountRepo
AccountRepository
usageLogRepo
UsageLogRepository
usageLogRepo
UsageLogRepository
userRepo
UserRepository
userRepo
UserRepository
userSubRepo
UserSubscriptionRepository
userSubRepo
UserSubscriptionRepository
cache
GatewayCache
cache
GatewayCache
cfg
*
config
.
Config
cfg
*
config
.
Config
schedulerSnapshot
*
SchedulerSnapshotService
schedulerSnapshot
*
SchedulerSnapshotService
concurrencyService
*
ConcurrencyService
concurrencyService
*
ConcurrencyService
billingService
*
BillingService
billingService
*
BillingService
rateLimitService
*
RateLimitService
rateLimitService
*
RateLimitService
billingCacheService
*
BillingCacheService
billingCacheService
*
BillingCacheService
httpUpstream
HTTPUpstream
httpUpstream
HTTPUpstream
deferredService
*
DeferredService
deferredService
*
DeferredService
openAITokenProvider
*
OpenAITokenProvider
openAITokenProvider
*
OpenAITokenProvider
}
}
// NewOpenAIGatewayService creates a new OpenAIGatewayService
// NewOpenAIGatewayService creates a new OpenAIGatewayService
...
@@ -114,20 +114,20 @@ func NewOpenAIGatewayService(
...
@@ -114,20 +114,20 @@ func NewOpenAIGatewayService(
openAITokenProvider
*
OpenAITokenProvider
,
openAITokenProvider
*
OpenAITokenProvider
,
)
*
OpenAIGatewayService
{
)
*
OpenAIGatewayService
{
return
&
OpenAIGatewayService
{
return
&
OpenAIGatewayService
{
accountRepo
:
accountRepo
,
accountRepo
:
accountRepo
,
usageLogRepo
:
usageLogRepo
,
usageLogRepo
:
usageLogRepo
,
userRepo
:
userRepo
,
userRepo
:
userRepo
,
userSubRepo
:
userSubRepo
,
userSubRepo
:
userSubRepo
,
cache
:
cache
,
cache
:
cache
,
cfg
:
cfg
,
cfg
:
cfg
,
schedulerSnapshot
:
schedulerSnapshot
,
schedulerSnapshot
:
schedulerSnapshot
,
concurrencyService
:
concurrencyService
,
concurrencyService
:
concurrencyService
,
billingService
:
billingService
,
billingService
:
billingService
,
rateLimitService
:
rateLimitService
,
rateLimitService
:
rateLimitService
,
billingCacheService
:
billingCacheService
,
billingCacheService
:
billingCacheService
,
httpUpstream
:
httpUpstream
,
httpUpstream
:
httpUpstream
,
deferredService
:
deferredService
,
deferredService
:
deferredService
,
openAITokenProvider
:
openAITokenProvider
,
openAITokenProvider
:
openAITokenProvider
,
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment