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
836c4dda
Commit
836c4dda
authored
Dec 24, 2025
by
Forest
Browse files
refactor: 重命名 go module
parent
870b2191
Changes
103
Show whitespace changes
Inline
Side-by-side
backend/internal/service/ports/api_key.go
View file @
836c4dda
...
...
@@ -3,8 +3,8 @@ package ports
import
(
"context"
"sub2api/internal/model"
"sub2api/internal/pkg/pagination"
"
github.com/Wei-Shaw/
sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/pagination"
)
type
ApiKeyRepository
interface
{
...
...
backend/internal/service/ports/group.go
View file @
836c4dda
...
...
@@ -3,8 +3,8 @@ package ports
import
(
"context"
"sub2api/internal/model"
"sub2api/internal/pkg/pagination"
"
github.com/Wei-Shaw/
sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/pagination"
"gorm.io/gorm"
)
...
...
backend/internal/service/ports/openai_oauth.go
View file @
836c4dda
...
...
@@ -3,7 +3,7 @@ package ports
import
(
"context"
"sub2api/internal/pkg/openai"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/openai"
)
// OpenAIOAuthClient interface for OpenAI OAuth operations
...
...
backend/internal/service/ports/proxy.go
View file @
836c4dda
...
...
@@ -3,8 +3,8 @@ package ports
import
(
"context"
"sub2api/internal/model"
"sub2api/internal/pkg/pagination"
"
github.com/Wei-Shaw/
sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/pagination"
)
type
ProxyRepository
interface
{
...
...
backend/internal/service/ports/redeem_code.go
View file @
836c4dda
...
...
@@ -3,8 +3,8 @@ package ports
import
(
"context"
"sub2api/internal/model"
"sub2api/internal/pkg/pagination"
"
github.com/Wei-Shaw/
sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/pagination"
)
type
RedeemCodeRepository
interface
{
...
...
backend/internal/service/ports/setting.go
View file @
836c4dda
...
...
@@ -3,7 +3,7 @@ package ports
import
(
"context"
"sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/model"
)
type
SettingRepository
interface
{
...
...
backend/internal/service/ports/usage_log.go
View file @
836c4dda
...
...
@@ -4,9 +4,9 @@ import (
"context"
"time"
"sub2api/internal/model"
"sub2api/internal/pkg/pagination"
"sub2api/internal/pkg/usagestats"
"
github.com/Wei-Shaw/
sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/pagination"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/usagestats"
)
type
UsageLogRepository
interface
{
...
...
backend/internal/service/ports/user.go
View file @
836c4dda
...
...
@@ -3,8 +3,8 @@ package ports
import
(
"context"
"sub2api/internal/model"
"sub2api/internal/pkg/pagination"
"
github.com/Wei-Shaw/
sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/pagination"
)
type
UserRepository
interface
{
...
...
backend/internal/service/ports/user_subscription.go
View file @
836c4dda
...
...
@@ -4,8 +4,8 @@ import (
"context"
"time"
"sub2api/internal/model"
"sub2api/internal/pkg/pagination"
"
github.com/Wei-Shaw/
sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/pagination"
)
type
UserSubscriptionRepository
interface
{
...
...
backend/internal/service/pricing_service.go
View file @
836c4dda
...
...
@@ -14,8 +14,8 @@ import (
"sync"
"time"
"sub2api/internal/config"
"sub2api/internal/pkg/openai"
"
github.com/Wei-Shaw/
sub2api/internal/config"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/openai"
)
// LiteLLMModelPricing LiteLLM价格数据结构
...
...
backend/internal/service/proxy_service.go
View file @
836c4dda
...
...
@@ -4,9 +4,9 @@ import (
"context"
"errors"
"fmt"
"sub2api/internal/model"
"sub2api/internal/pkg/pagination"
"sub2api/internal/service/ports"
"
github.com/Wei-Shaw/
sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/pagination"
"
github.com/Wei-Shaw/
sub2api/internal/service/ports"
"gorm.io/gorm"
)
...
...
backend/internal/service/ratelimit_service.go
View file @
836c4dda
...
...
@@ -7,9 +7,9 @@ import (
"strconv"
"time"
"sub2api/internal/config"
"sub2api/internal/model"
"sub2api/internal/service/ports"
"
github.com/Wei-Shaw/
sub2api/internal/config"
"
github.com/Wei-Shaw/
sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/service/ports"
)
// RateLimitService 处理限流和过载状态管理
...
...
backend/internal/service/redeem_service.go
View file @
836c4dda
...
...
@@ -6,10 +6,10 @@ import (
"encoding/hex"
"errors"
"fmt"
"github.com/Wei-Shaw/sub2api/internal/model"
"github.com/Wei-Shaw/sub2api/internal/pkg/pagination"
"github.com/Wei-Shaw/sub2api/internal/service/ports"
"strings"
"sub2api/internal/model"
"sub2api/internal/pkg/pagination"
"sub2api/internal/service/ports"
"time"
"github.com/redis/go-redis/v9"
...
...
backend/internal/service/setting_service.go
View file @
836c4dda
...
...
@@ -6,10 +6,10 @@ import (
"encoding/hex"
"errors"
"fmt"
"github.com/Wei-Shaw/sub2api/internal/config"
"github.com/Wei-Shaw/sub2api/internal/model"
"github.com/Wei-Shaw/sub2api/internal/service/ports"
"strconv"
"sub2api/internal/config"
"sub2api/internal/model"
"sub2api/internal/service/ports"
"gorm.io/gorm"
)
...
...
backend/internal/service/subscription_service.go
View file @
836c4dda
...
...
@@ -7,9 +7,9 @@ import (
"log"
"time"
"sub2api/internal/model"
"sub2api/internal/pkg/pagination"
"sub2api/internal/service/ports"
"
github.com/Wei-Shaw/
sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/pagination"
"
github.com/Wei-Shaw/
sub2api/internal/service/ports"
)
var
(
...
...
backend/internal/service/token_refresh_service.go
View file @
836c4dda
...
...
@@ -7,9 +7,9 @@ import (
"sync"
"time"
"sub2api/internal/config"
"sub2api/internal/model"
"sub2api/internal/service/ports"
"
github.com/Wei-Shaw/
sub2api/internal/config"
"
github.com/Wei-Shaw/
sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/service/ports"
)
// TokenRefreshService OAuth token自动刷新服务
...
...
backend/internal/service/token_refresher.go
View file @
836c4dda
...
...
@@ -5,7 +5,7 @@ import (
"strconv"
"time"
"sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/model"
)
// TokenRefresher 定义平台特定的token刷新策略接口
...
...
backend/internal/service/update_service.go
View file @
836c4dda
...
...
@@ -18,7 +18,7 @@ import (
"strings"
"time"
"sub2api/internal/service/ports"
"
github.com/Wei-Shaw/
sub2api/internal/service/ports"
)
const
(
...
...
backend/internal/service/usage_service.go
View file @
836c4dda
...
...
@@ -4,10 +4,10 @@ import (
"context"
"errors"
"fmt"
"sub2api/internal/model"
"sub2api/internal/pkg/pagination"
"sub2api/internal/pkg/usagestats"
"sub2api/internal/service/ports"
"
github.com/Wei-Shaw/
sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/pagination"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/usagestats"
"
github.com/Wei-Shaw/
sub2api/internal/service/ports"
"time"
"gorm.io/gorm"
...
...
backend/internal/service/user_service.go
View file @
836c4dda
...
...
@@ -4,9 +4,9 @@ import (
"context"
"errors"
"fmt"
"sub2api/internal/model"
"sub2api/internal/pkg/pagination"
"sub2api/internal/service/ports"
"
github.com/Wei-Shaw/
sub2api/internal/model"
"
github.com/Wei-Shaw/
sub2api/internal/pkg/pagination"
"
github.com/Wei-Shaw/
sub2api/internal/service/ports"
"golang.org/x/crypto/bcrypt"
"gorm.io/gorm"
...
...
Prev
1
2
3
4
5
6
Next
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