Commit 836c4dda authored by Forest's avatar Forest
Browse files

refactor: 重命名 go module

parent 870b2191
package server package server
import ( import (
"github.com/Wei-Shaw/sub2api/internal/config"
"github.com/Wei-Shaw/sub2api/internal/handler"
"github.com/Wei-Shaw/sub2api/internal/repository"
"github.com/Wei-Shaw/sub2api/internal/service"
"net/http" "net/http"
"sub2api/internal/config"
"sub2api/internal/handler"
"sub2api/internal/repository"
"sub2api/internal/service"
"time" "time"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
......
package server package server
import ( import (
"github.com/Wei-Shaw/sub2api/internal/config"
"github.com/Wei-Shaw/sub2api/internal/handler"
"github.com/Wei-Shaw/sub2api/internal/middleware"
"github.com/Wei-Shaw/sub2api/internal/repository"
"github.com/Wei-Shaw/sub2api/internal/service"
"github.com/Wei-Shaw/sub2api/internal/web"
"net/http" "net/http"
"sub2api/internal/config"
"sub2api/internal/handler"
"sub2api/internal/middleware"
"sub2api/internal/repository"
"sub2api/internal/service"
"sub2api/internal/web"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
......
...@@ -4,9 +4,9 @@ import ( ...@@ -4,9 +4,9 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"sub2api/internal/model" "github.com/Wei-Shaw/sub2api/internal/model"
"sub2api/internal/pkg/pagination" "github.com/Wei-Shaw/sub2api/internal/pkg/pagination"
"sub2api/internal/service/ports" "github.com/Wei-Shaw/sub2api/internal/service/ports"
"gorm.io/gorm" "gorm.io/gorm"
) )
......
...@@ -14,10 +14,10 @@ import ( ...@@ -14,10 +14,10 @@ import (
"strings" "strings"
"time" "time"
"sub2api/internal/model" "github.com/Wei-Shaw/sub2api/internal/model"
"sub2api/internal/pkg/claude" "github.com/Wei-Shaw/sub2api/internal/pkg/claude"
"sub2api/internal/pkg/openai" "github.com/Wei-Shaw/sub2api/internal/pkg/openai"
"sub2api/internal/service/ports" "github.com/Wei-Shaw/sub2api/internal/service/ports"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid" "github.com/google/uuid"
......
...@@ -7,9 +7,9 @@ import ( ...@@ -7,9 +7,9 @@ import (
"sync" "sync"
"time" "time"
"sub2api/internal/model" "github.com/Wei-Shaw/sub2api/internal/model"
"sub2api/internal/pkg/usagestats" "github.com/Wei-Shaw/sub2api/internal/pkg/usagestats"
"sub2api/internal/service/ports" "github.com/Wei-Shaw/sub2api/internal/service/ports"
) )
// usageCache 用于缓存usage数据 // usageCache 用于缓存usage数据
......
...@@ -7,9 +7,9 @@ import ( ...@@ -7,9 +7,9 @@ import (
"log" "log"
"time" "time"
"sub2api/internal/model" "github.com/Wei-Shaw/sub2api/internal/model"
"sub2api/internal/pkg/pagination" "github.com/Wei-Shaw/sub2api/internal/pkg/pagination"
"sub2api/internal/service/ports" "github.com/Wei-Shaw/sub2api/internal/service/ports"
"gorm.io/gorm" "gorm.io/gorm"
) )
......
...@@ -6,11 +6,11 @@ import ( ...@@ -6,11 +6,11 @@ import (
"encoding/hex" "encoding/hex"
"errors" "errors"
"fmt" "fmt"
"sub2api/internal/config" "github.com/Wei-Shaw/sub2api/internal/config"
"sub2api/internal/model" "github.com/Wei-Shaw/sub2api/internal/model"
"sub2api/internal/pkg/pagination" "github.com/Wei-Shaw/sub2api/internal/pkg/pagination"
"sub2api/internal/pkg/timezone" "github.com/Wei-Shaw/sub2api/internal/pkg/timezone"
"sub2api/internal/service/ports" "github.com/Wei-Shaw/sub2api/internal/service/ports"
"time" "time"
"github.com/redis/go-redis/v9" "github.com/redis/go-redis/v9"
......
...@@ -4,10 +4,10 @@ import ( ...@@ -4,10 +4,10 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"github.com/Wei-Shaw/sub2api/internal/config"
"github.com/Wei-Shaw/sub2api/internal/model"
"github.com/Wei-Shaw/sub2api/internal/service/ports"
"log" "log"
"sub2api/internal/config"
"sub2api/internal/model"
"sub2api/internal/service/ports"
"time" "time"
"github.com/golang-jwt/jwt/v5" "github.com/golang-jwt/jwt/v5"
......
...@@ -7,8 +7,8 @@ import ( ...@@ -7,8 +7,8 @@ import (
"log" "log"
"time" "time"
"sub2api/internal/model" "github.com/Wei-Shaw/sub2api/internal/model"
"sub2api/internal/service/ports" "github.com/Wei-Shaw/sub2api/internal/service/ports"
) )
// 错误定义 // 错误定义
......
...@@ -2,9 +2,9 @@ package service ...@@ -2,9 +2,9 @@ package service
import ( import (
"fmt" "fmt"
"github.com/Wei-Shaw/sub2api/internal/config"
"log" "log"
"strings" "strings"
"sub2api/internal/config"
) )
// ModelPricing 模型价格配置(per-token价格,与LiteLLM格式一致) // ModelPricing 模型价格配置(per-token价格,与LiteLLM格式一致)
......
...@@ -5,7 +5,7 @@ import ( ...@@ -5,7 +5,7 @@ import (
"log" "log"
"time" "time"
"sub2api/internal/service/ports" "github.com/Wei-Shaw/sub2api/internal/service/ports"
) )
const ( const (
......
...@@ -5,8 +5,8 @@ import ( ...@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"time" "time"
"sub2api/internal/pkg/usagestats" "github.com/Wei-Shaw/sub2api/internal/pkg/usagestats"
"sub2api/internal/service/ports" "github.com/Wei-Shaw/sub2api/internal/service/ports"
) )
// DashboardService provides aggregated statistics for admin dashboard. // DashboardService provides aggregated statistics for admin dashboard.
......
...@@ -6,11 +6,11 @@ import ( ...@@ -6,11 +6,11 @@ import (
"crypto/tls" "crypto/tls"
"errors" "errors"
"fmt" "fmt"
"github.com/Wei-Shaw/sub2api/internal/model"
"github.com/Wei-Shaw/sub2api/internal/service/ports"
"math/big" "math/big"
"net/smtp" "net/smtp"
"strconv" "strconv"
"sub2api/internal/model"
"sub2api/internal/service/ports"
"time" "time"
) )
......
...@@ -16,10 +16,10 @@ import ( ...@@ -16,10 +16,10 @@ import (
"strings" "strings"
"time" "time"
"sub2api/internal/config" "github.com/Wei-Shaw/sub2api/internal/config"
"sub2api/internal/model" "github.com/Wei-Shaw/sub2api/internal/model"
"sub2api/internal/pkg/claude" "github.com/Wei-Shaw/sub2api/internal/pkg/claude"
"sub2api/internal/service/ports" "github.com/Wei-Shaw/sub2api/internal/service/ports"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
......
...@@ -4,9 +4,9 @@ import ( ...@@ -4,9 +4,9 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"sub2api/internal/model" "github.com/Wei-Shaw/sub2api/internal/model"
"sub2api/internal/pkg/pagination" "github.com/Wei-Shaw/sub2api/internal/pkg/pagination"
"sub2api/internal/service/ports" "github.com/Wei-Shaw/sub2api/internal/service/ports"
"gorm.io/gorm" "gorm.io/gorm"
) )
......
...@@ -7,11 +7,11 @@ import ( ...@@ -7,11 +7,11 @@ import (
"encoding/hex" "encoding/hex"
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/Wei-Shaw/sub2api/internal/service/ports"
"log" "log"
"net/http" "net/http"
"regexp" "regexp"
"strconv" "strconv"
"sub2api/internal/service/ports"
"time" "time"
) )
......
...@@ -6,9 +6,9 @@ import ( ...@@ -6,9 +6,9 @@ import (
"log" "log"
"time" "time"
"sub2api/internal/model" "github.com/Wei-Shaw/sub2api/internal/model"
"sub2api/internal/pkg/oauth" "github.com/Wei-Shaw/sub2api/internal/pkg/oauth"
"sub2api/internal/service/ports" "github.com/Wei-Shaw/sub2api/internal/service/ports"
) )
// ClaudeOAuthClient handles HTTP requests for Claude OAuth flows // ClaudeOAuthClient handles HTTP requests for Claude OAuth flows
......
...@@ -15,9 +15,9 @@ import ( ...@@ -15,9 +15,9 @@ import (
"strings" "strings"
"time" "time"
"sub2api/internal/config" "github.com/Wei-Shaw/sub2api/internal/config"
"sub2api/internal/model" "github.com/Wei-Shaw/sub2api/internal/model"
"sub2api/internal/service/ports" "github.com/Wei-Shaw/sub2api/internal/service/ports"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
......
...@@ -5,9 +5,9 @@ import ( ...@@ -5,9 +5,9 @@ import (
"fmt" "fmt"
"time" "time"
"sub2api/internal/model" "github.com/Wei-Shaw/sub2api/internal/model"
"sub2api/internal/pkg/openai" "github.com/Wei-Shaw/sub2api/internal/pkg/openai"
"sub2api/internal/service/ports" "github.com/Wei-Shaw/sub2api/internal/service/ports"
) )
// OpenAIOAuthService handles OpenAI OAuth authentication flows // OpenAIOAuthService handles OpenAI OAuth authentication flows
......
...@@ -4,8 +4,8 @@ import ( ...@@ -4,8 +4,8 @@ import (
"context" "context"
"time" "time"
"sub2api/internal/model" "github.com/Wei-Shaw/sub2api/internal/model"
"sub2api/internal/pkg/pagination" "github.com/Wei-Shaw/sub2api/internal/pkg/pagination"
) )
type AccountRepository interface { type AccountRepository interface {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment