trans to private
This commit is contained in:
parent
dd46edb310
commit
304517e241
9
.github/workflows/docker.yml
vendored
9
.github/workflows/docker.yml
vendored
@ -17,8 +17,7 @@ jobs:
|
|||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
nite07/pcgamedb
|
git.nite07.com/nite07/pcgamedb
|
||||||
git.drevox.top/code/pcgamedb
|
|
||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
@ -30,12 +29,6 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Login to Gitea
|
- name: Login to Gitea
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
|
@ -16,7 +16,7 @@ builds:
|
|||||||
- arm
|
- arm
|
||||||
- "386"
|
- "386"
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X github.com/nitezs/pcgamedb/constant.Version={{ .Version }}
|
- -s -w -X pcgamedb/constant.Version={{ .Version }}
|
||||||
flags:
|
flags:
|
||||||
- -trimpath
|
- -trimpath
|
||||||
archives:
|
archives:
|
||||||
|
@ -14,7 +14,7 @@ ARG version=dev
|
|||||||
RUN if [ "$version" = "dev" ]; then \
|
RUN if [ "$version" = "dev" ]; then \
|
||||||
version=$(git describe --tags --always); \
|
version=$(git describe --tags --always); \
|
||||||
fi && \
|
fi && \
|
||||||
CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X github.com/nitezs/pcgamedb/constant.Version=${version}" -o pcgamedb .
|
CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X pcgamedb/constant.Version=${version}" -o pcgamedb .
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
2
build.sh
2
build.sh
@ -1,4 +1,4 @@
|
|||||||
go install github.com/swaggo/swag/cmd/swag@latest
|
go install github.com/swaggo/swag/cmd/swag@latest
|
||||||
swag init
|
swag init
|
||||||
CGO_ENABLED=0
|
CGO_ENABLED=0
|
||||||
go build -o pcgamedb -ldflags "-s -w -X github.com/nitezs/pcgamedb/constant.Version=$(git describe --tags --always)" .
|
go build -o pcgamedb -ldflags "-s -w -X pcgamedb/constant.Version=$(git describe --tags --always)" .
|
||||||
|
4
cache/redis.go
vendored
4
cache/redis.go
vendored
@ -6,8 +6,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
|
|
||||||
"github.com/redis/go-redis/v9"
|
"github.com/redis/go-redis/v9"
|
||||||
)
|
)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
"github.com/nitezs/pcgamedb/task"
|
"pcgamedb/task"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/crawler"
|
"pcgamedb/crawler"
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
@ -3,9 +3,9 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/crawler"
|
"pcgamedb/crawler"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/crawler"
|
"pcgamedb/crawler"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/crawler"
|
"pcgamedb/crawler"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
"github.com/nitezs/pcgamedb/server"
|
"pcgamedb/server"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/crawler"
|
"pcgamedb/crawler"
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
"github.com/nitezs/pcgamedb/task"
|
"pcgamedb/task"
|
||||||
|
|
||||||
"github.com/robfig/cron/v3"
|
"github.com/robfig/cron/v3"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/crawler"
|
"pcgamedb/crawler"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
@ -8,10 +8,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"github.com/PuerkitoBio/goquery"
|
"github.com/PuerkitoBio/goquery"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -11,9 +11,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"github.com/jlaffaye/ftp"
|
"github.com/jlaffaye/ftp"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -7,10 +7,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"github.com/PuerkitoBio/goquery"
|
"github.com/PuerkitoBio/goquery"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package crawler
|
package crawler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
@ -8,10 +8,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"github.com/PuerkitoBio/goquery"
|
"github.com/PuerkitoBio/goquery"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -8,11 +8,11 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"github.com/PuerkitoBio/goquery"
|
"github.com/PuerkitoBio/goquery"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"github.com/PuerkitoBio/goquery"
|
"github.com/PuerkitoBio/goquery"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -6,11 +6,11 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
@ -10,12 +10,12 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/cache"
|
"pcgamedb/cache"
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var TwitchToken string
|
var TwitchToken string
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
@ -11,11 +11,11 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"github.com/PuerkitoBio/goquery"
|
"github.com/PuerkitoBio/goquery"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -9,12 +9,12 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/cache"
|
"pcgamedb/cache"
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func _GetSteamID(name string) (int, error) {
|
func _GetSteamID(name string) (int, error) {
|
||||||
|
@ -8,12 +8,12 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/cache"
|
"pcgamedb/cache"
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"github.com/PuerkitoBio/goquery"
|
"github.com/PuerkitoBio/goquery"
|
||||||
)
|
)
|
||||||
|
@ -7,10 +7,10 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"github.com/PuerkitoBio/goquery"
|
"github.com/PuerkitoBio/goquery"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -8,10 +8,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"github.com/PuerkitoBio/goquery"
|
"github.com/PuerkitoBio/goquery"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package db
|
package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetDODIGameItems() ([]*model.GameItem, error) {
|
func GetDODIGameItems() ([]*model.GameItem, error) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package db
|
package db
|
||||||
|
|
||||||
import "github.com/nitezs/pcgamedb/model"
|
import "pcgamedb/model"
|
||||||
|
|
||||||
func IsARMGDDNCrawled(flag string) bool {
|
func IsARMGDDNCrawled(flag string) bool {
|
||||||
return IsGameCrawled(flag, "armgddn")
|
return IsGameCrawled(flag, "armgddn")
|
||||||
|
@ -3,7 +3,7 @@ package db
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
|
|
||||||
"go.mongodb.org/mongo-driver/mongo"
|
"go.mongodb.org/mongo-driver/mongo"
|
||||||
"go.mongodb.org/mongo-driver/mongo/options"
|
"go.mongodb.org/mongo-driver/mongo/options"
|
||||||
|
4
db/db.go
4
db/db.go
@ -6,8 +6,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
|
|
||||||
"go.mongodb.org/mongo-driver/bson"
|
"go.mongodb.org/mongo-driver/bson"
|
||||||
"go.mongodb.org/mongo-driver/mongo"
|
"go.mongodb.org/mongo-driver/mongo"
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"go.mongodb.org/mongo-driver/bson"
|
"go.mongodb.org/mongo-driver/bson"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package db
|
package db
|
||||||
|
|
||||||
import "github.com/nitezs/pcgamedb/model"
|
import "pcgamedb/model"
|
||||||
|
|
||||||
func GetFitgirlAllGameItems() ([]*model.GameItem, error) {
|
func GetFitgirlAllGameItems() ([]*model.GameItem, error) {
|
||||||
return GetGameItemsByAuthor("fitgirl")
|
return GetGameItemsByAuthor("fitgirl")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package db
|
package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetFreeGOGGameItems() ([]*model.GameItem, error) {
|
func GetFreeGOGGameItems() ([]*model.GameItem, error) {
|
||||||
|
@ -10,9 +10,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/cache"
|
"pcgamedb/cache"
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"go.mongodb.org/mongo-driver/bson"
|
"go.mongodb.org/mongo-driver/bson"
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ImportGameInfo(filePath string) error {
|
func ImportGameInfo(filePath string) error {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package db
|
package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetOnlineFixGameItems() ([]*model.GameItem, error) {
|
func GetOnlineFixGameItems() ([]*model.GameItem, error) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package db
|
package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetXatabGameItems() ([]*model.GameItem, error) {
|
func GetXatabGameItems() ([]*model.GameItem, error) {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"go.uber.org/zap/zapcore"
|
"go.uber.org/zap/zapcore"
|
||||||
|
4
main.go
4
main.go
@ -3,8 +3,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/cmd"
|
"pcgamedb/cmd"
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
"github.com/nitezs/pcgamedb/task"
|
"pcgamedb/task"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
@ -3,7 +3,7 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
|
@ -3,7 +3,7 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.mongodb.org/mongo-driver/mongo"
|
"go.mongodb.org/mongo-driver/mongo"
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.mongodb.org/mongo-driver/mongo"
|
"go.mongodb.org/mongo-driver/mongo"
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/crawler"
|
"pcgamedb/crawler"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
"github.com/nitezs/pcgamedb/constant"
|
"pcgamedb/constant"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/crawler"
|
"pcgamedb/crawler"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/crawler"
|
"pcgamedb/crawler"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -3,7 +3,7 @@ package middleware
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/server/handler"
|
"pcgamedb/server/handler"
|
||||||
"github.com/nitezs/pcgamedb/server/middleware"
|
"pcgamedb/server/middleware"
|
||||||
|
|
||||||
"github.com/gin-contrib/cors"
|
"github.com/gin-contrib/cors"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
docs "github.com/nitezs/pcgamedb/docs"
|
docs "pcgamedb/docs"
|
||||||
|
|
||||||
swaggerfiles "github.com/swaggo/files"
|
swaggerfiles "github.com/swaggo/files"
|
||||||
ginSwagger "github.com/swaggo/gin-swagger"
|
ginSwagger "github.com/swaggo/gin-swagger"
|
||||||
|
@ -4,12 +4,12 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/cache"
|
"pcgamedb/cache"
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/log"
|
"pcgamedb/log"
|
||||||
"github.com/nitezs/pcgamedb/server/middleware"
|
"pcgamedb/server/middleware"
|
||||||
"github.com/nitezs/pcgamedb/task"
|
"pcgamedb/task"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/robfig/cron/v3"
|
"github.com/robfig/cron/v3"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package task
|
package task
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
@ -4,11 +4,11 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
"github.com/nitezs/pcgamedb/config"
|
"pcgamedb/config"
|
||||||
"github.com/nitezs/pcgamedb/crawler"
|
"pcgamedb/crawler"
|
||||||
"github.com/nitezs/pcgamedb/db"
|
"pcgamedb/db"
|
||||||
"github.com/nitezs/pcgamedb/model"
|
"pcgamedb/model"
|
||||||
"github.com/nitezs/pcgamedb/utils"
|
"pcgamedb/utils"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user