first
This commit is contained in:
parent
e57ec346ea
commit
91a5668ff0
14
Dockerfile
14
Dockerfile
@ -1,6 +1,6 @@
|
||||
FROM golang:alpine as builder
|
||||
|
||||
WORKDIR /go/src/byg-backend
|
||||
WORKDIR /go/src/bygdata
|
||||
COPY . .
|
||||
|
||||
RUN go env -w GO111MODULE=on \
|
||||
@ -18,14 +18,14 @@ ENV TZ=Asia/Shanghai
|
||||
RUN apk update && apk add --no-cache tzdata openntpd \
|
||||
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
WORKDIR /go/src/byg-backend
|
||||
WORKDIR /go/src/bygdata
|
||||
|
||||
COPY --from=0 /go/src/byg-backend/server ./
|
||||
COPY --from=0 /go/src/byg-backend/resource ./resource/
|
||||
COPY --from=0 /go/src/byg-backend/config.docker.yaml ./
|
||||
COPY --from=0 /go/src/bygdata/server ./
|
||||
COPY --from=0 /go/src/bygdata/resource ./resource/
|
||||
COPY --from=0 /go/src/bygdata/config.docker.yaml ./
|
||||
|
||||
# 挂载目录:如果使用了sqlite数据库,容器命令示例:docker run -d -v /宿主机路径/gva.db:/go/src/byg-backend/gva.db -p 8888:8888 --name gva-server-v1 gva-server:1.0
|
||||
# VOLUME ["/go/src/byg-backend"]
|
||||
# 挂载目录:如果使用了sqlite数据库,容器命令示例:docker run -d -v /宿主机路径/gva.db:/go/src/bygdata/gva.db -p 8888:8888 --name gva-server-v1 gva-server:1.0
|
||||
# VOLUME ["/go/src/bygdata"]
|
||||
|
||||
EXPOSE 8888
|
||||
ENTRYPOINT ./server -c config.docker.yaml
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"byg-backend/api/v1/example"
|
||||
"byg-backend/api/v1/system"
|
||||
"bygdata/api/v1/example"
|
||||
"bygdata/api/v1/system"
|
||||
)
|
||||
|
||||
var ApiGroupApp = new(ApiGroup)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package example
|
||||
|
||||
import "byg-backend/service"
|
||||
import "bygdata/service"
|
||||
|
||||
type ApiGroup struct {
|
||||
CustomerApi
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
common "byg-backend/model/common/request"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/example"
|
||||
"bygdata/global"
|
||||
common "bygdata/model/common/request"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/example"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -7,12 +7,12 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"byg-backend/model/example"
|
||||
"bygdata/model/example"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
exampleRes "byg-backend/model/example/response"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
exampleRes "bygdata/model/example/response"
|
||||
"bygdata/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/request"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/example"
|
||||
exampleRes "byg-backend/model/example/response"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/request"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/example"
|
||||
exampleRes "bygdata/model/example/response"
|
||||
"bygdata/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/example"
|
||||
"byg-backend/model/example/request"
|
||||
exampleRes "byg-backend/model/example/response"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/example"
|
||||
"bygdata/model/example/request"
|
||||
exampleRes "bygdata/model/example/response"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
"strconv"
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package sqs
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/awssqs"
|
||||
"bygdata/global"
|
||||
"bygdata/model/awssqs"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
common "byg-backend/model/common/request"
|
||||
"byg-backend/model/common/response"
|
||||
request "byg-backend/model/system/request"
|
||||
"bygdata/global"
|
||||
common "bygdata/model/common/request"
|
||||
"bygdata/model/common/response"
|
||||
request "bygdata/model/system/request"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/mcp/client"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system/request"
|
||||
"bygdata/global"
|
||||
"bygdata/mcp/client"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system/request"
|
||||
"fmt"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
common "byg-backend/model/common/request"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system/request"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
common "bygdata/model/common/request"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system/request"
|
||||
"bygdata/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
"strings"
|
||||
|
||||
@ -5,11 +5,11 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system/request"
|
||||
systemRes "byg-backend/model/system/response"
|
||||
"byg-backend/plugin/plugin-tool/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system/request"
|
||||
systemRes "bygdata/model/system/response"
|
||||
"bygdata/plugin/plugin-tool/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system/request"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system/request"
|
||||
"bygdata/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package system
|
||||
|
||||
import "byg-backend/service"
|
||||
import "bygdata/service"
|
||||
|
||||
type ApiGroup struct {
|
||||
DBApi
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/request"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
systemReq "byg-backend/model/system/request"
|
||||
systemRes "byg-backend/model/system/response"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/request"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
systemReq "bygdata/model/system/request"
|
||||
systemRes "bygdata/model/system/response"
|
||||
"bygdata/utils"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
sysReq "byg-backend/model/system/request"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
sysReq "bygdata/model/system/request"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
systemRes "byg-backend/model/system/response"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
systemRes "bygdata/model/system/response"
|
||||
"bygdata/utils"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system/request"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system/request"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/model/common"
|
||||
"bygdata/model/common"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -3,9 +3,9 @@ package system
|
||||
import (
|
||||
"time"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
systemRes "byg-backend/model/system/response"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
systemRes "bygdata/model/system/response"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/mojocn/base64Captcha"
|
||||
"go.uber.org/zap"
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system/request"
|
||||
systemRes "byg-backend/model/system/response"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system/request"
|
||||
systemRes "bygdata/model/system/response"
|
||||
"bygdata/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
"byg-backend/model/system/request"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
"bygdata/model/system/request"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -3,11 +3,11 @@ package system
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
"byg-backend/model/system/request"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
"bygdata/model/system/request"
|
||||
"bygdata/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
systemReq "byg-backend/model/system/request"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
systemReq "bygdata/model/system/request"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -7,13 +7,13 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/request"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
systemReq "byg-backend/model/system/request"
|
||||
"byg-backend/service"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/request"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
systemReq "bygdata/model/system/request"
|
||||
"bygdata/service"
|
||||
"bygdata/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system/request"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system/request"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
"bygdata/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/request"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
systemReq "byg-backend/model/system/request"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/request"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
systemReq "bygdata/model/system/request"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/request"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
systemReq "byg-backend/model/system/request"
|
||||
systemRes "byg-backend/model/system/response"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/request"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
systemReq "bygdata/model/system/request"
|
||||
systemRes "bygdata/model/system/response"
|
||||
"bygdata/utils"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/request"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
systemReq "byg-backend/model/system/request"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/request"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
systemReq "bygdata/model/system/request"
|
||||
"bygdata/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
systemReq "byg-backend/model/system/request"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
systemReq "bygdata/model/system/request"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system/request"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system/request"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
systemRes "byg-backend/model/system/response"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
systemRes "bygdata/model/system/response"
|
||||
"bygdata/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -4,14 +4,14 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common"
|
||||
"byg-backend/model/common/request"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
systemReq "byg-backend/model/system/request"
|
||||
systemRes "byg-backend/model/system/response"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common"
|
||||
"bygdata/model/common/request"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
systemReq "bygdata/model/system/request"
|
||||
systemRes "bygdata/model/system/response"
|
||||
"bygdata/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/redis/go-redis/v9"
|
||||
"go.uber.org/zap"
|
||||
|
||||
@ -8,12 +8,12 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/model/system"
|
||||
systemReq "byg-backend/model/system/request"
|
||||
systemRes "byg-backend/model/system/response"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/model/system"
|
||||
systemReq "bygdata/model/system/request"
|
||||
systemRes "bygdata/model/system/response"
|
||||
"bygdata/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# byg-backend Global Configuration
|
||||
# bygdata Global Configuration
|
||||
|
||||
# jwt configuration
|
||||
jwt:
|
||||
@ -10,7 +10,7 @@ jwt:
|
||||
zap:
|
||||
level: info
|
||||
format: console
|
||||
prefix: "[byg-backend]"
|
||||
prefix: "[bygdata]"
|
||||
director: log
|
||||
show-line: true
|
||||
encode-level: LowercaseColorLevelEncoder
|
||||
@ -183,7 +183,7 @@ autocode:
|
||||
web: web/src
|
||||
root: "" # root 自动适配项目根目录, 请不要手动配置,他会在项目加载的时候识别出根路径
|
||||
server: server
|
||||
module: 'byg-backend'
|
||||
module: 'bygdata'
|
||||
ai-path: "" # AI服务路径
|
||||
|
||||
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
|
||||
@ -222,7 +222,7 @@ tencent-cos:
|
||||
secret-id: your-secret-id
|
||||
secret-key: your-secret-key
|
||||
base-url: https://gin.vue.admin
|
||||
path-prefix: byg-backend
|
||||
path-prefix: bygdata
|
||||
|
||||
# aws s3 configuration (minio compatible)
|
||||
aws-s3:
|
||||
@ -234,7 +234,7 @@ aws-s3:
|
||||
secret-id: your-secret-id
|
||||
secret-key: your-secret-key
|
||||
base-url: https://gin.vue.admin
|
||||
path-prefix: byg-backend
|
||||
path-prefix: bygdata
|
||||
|
||||
# cloudflare r2 configuration
|
||||
cloudflare-r2:
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# byg-backend Global Configuration
|
||||
# bygdata Global Configuration
|
||||
|
||||
# jwt configuration
|
||||
jwt:
|
||||
@ -10,7 +10,7 @@ jwt:
|
||||
zap:
|
||||
level: info
|
||||
format: console
|
||||
prefix: "[byg-backend]"
|
||||
prefix: "[bygdata]"
|
||||
director: log
|
||||
show-line: true
|
||||
encode-level: LowercaseColorLevelEncoder
|
||||
@ -181,7 +181,7 @@ autocode:
|
||||
web: web/src
|
||||
root: "" # root 自动适配项目根目录, 请不要手动配置,他会在项目加载的时候识别出根路径
|
||||
server: server
|
||||
module: 'byg-backend'
|
||||
module: 'bygdata'
|
||||
ai-path: "" # AI服务路径
|
||||
|
||||
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
|
||||
@ -220,7 +220,7 @@ tencent-cos:
|
||||
secret-id: your-secret-id
|
||||
secret-key: your-secret-key
|
||||
base-url: https://gin.vue.admin
|
||||
path-prefix: byg-backend
|
||||
path-prefix: bygdata
|
||||
|
||||
# aws s3 configuration (minio compatible)
|
||||
aws-s3:
|
||||
@ -232,7 +232,7 @@ aws-s3:
|
||||
secret-id: your-secret-id
|
||||
secret-key: your-secret-key
|
||||
base-url: https://gin.vue.admin
|
||||
path-prefix: byg-backend
|
||||
path-prefix: bygdata
|
||||
|
||||
# cloudflare r2 configuration
|
||||
cloudflare-r2:
|
||||
|
||||
375
config.yaml
375
config.yaml
@ -1,293 +1,178 @@
|
||||
# byg-backend Global Configuration
|
||||
# bygdata Global Configuration
|
||||
|
||||
# jwt configuration
|
||||
jwt:
|
||||
signing-key: qmPlus
|
||||
expires-time: 7d
|
||||
buffer-time: 1d
|
||||
issuer: qmPlus
|
||||
signing-key: fdshflkds-fdds-fdskwor-rn23bk-4324njd
|
||||
expires-time: 7d
|
||||
buffer-time: 1d
|
||||
issuer: http://bygdata.bressx.la
|
||||
# zap logger configuration
|
||||
zap:
|
||||
level: info
|
||||
format: console
|
||||
prefix: "[byg-backend]"
|
||||
director: log
|
||||
show-line: true
|
||||
encode-level: LowercaseColorLevelEncoder
|
||||
stacktrace-key: stacktrace
|
||||
log-in-console: true
|
||||
retention-day: -1
|
||||
level: debug
|
||||
format: console
|
||||
prefix: "[bygdata]"
|
||||
director: log
|
||||
show-line: true
|
||||
encode-level: LowercaseColorLevelEncoder
|
||||
stacktrace-key: stacktrace
|
||||
log-in-console: true
|
||||
retention-day: -1
|
||||
|
||||
# redis configuration
|
||||
redis:
|
||||
#是否使用redis集群模式
|
||||
useCluster: false
|
||||
#使用集群模式addr和db默认无效
|
||||
addr: 127.0.0.1:6379
|
||||
password: ""
|
||||
db: 0
|
||||
clusterAddrs:
|
||||
- "172.21.0.3:7000"
|
||||
- "172.21.0.4:7001"
|
||||
- "172.21.0.2:7002"
|
||||
#是否使用redis集群模式
|
||||
useCluster: true
|
||||
#使用集群模式addr和db默认无效
|
||||
addr: 127.0.0.1:6379
|
||||
password: ""
|
||||
db: 0
|
||||
clusterAddrs:
|
||||
- "goder-test-latest.kqsmcz.clustercfg.memorydb.ap-southeast-1.amazonaws.com:6379"
|
||||
- "goder-test-latest-0001-001.kqsmcz.0001.memorydb.ap-southeast-1.amazonaws.com:6379"
|
||||
- "goder-test-latest-0001-002.kqsmcz.0001.memorydb.ap-southeast-1.amazonaws.com:6379"
|
||||
|
||||
# redis-list configuration
|
||||
redis-list:
|
||||
- name: cache # 数据库的名称,注意: name 需要在 redis-list 中唯一
|
||||
useCluster: false # 是否使用redis集群模式
|
||||
addr: 127.0.0.1:6379 # 使用集群模式addr和db默认无效
|
||||
password: ""
|
||||
db: 0
|
||||
clusterAddrs:
|
||||
- "172.21.0.3:7000"
|
||||
- "172.21.0.4:7001"
|
||||
- "172.21.0.2:7002"
|
||||
|
||||
# mongo configuration
|
||||
mongo:
|
||||
coll: ''
|
||||
options: ''
|
||||
database: ''
|
||||
username: ''
|
||||
password: ''
|
||||
auth-source: ''
|
||||
min-pool-size: 0
|
||||
max-pool-size: 100
|
||||
socket-timeout-ms: 0
|
||||
connect-timeout-ms: 0
|
||||
is-zap: false
|
||||
hosts:
|
||||
- host: ''
|
||||
port: ''
|
||||
|
||||
# email configuration
|
||||
email:
|
||||
to: xxx@qq.com
|
||||
port: 465
|
||||
from: xxx@163.com
|
||||
host: smtp.163.com
|
||||
is-ssl: true
|
||||
secret: xxx
|
||||
nickname: test
|
||||
- name: cache # 数据库的名称,注意: name 需要在 redis-list 中唯一
|
||||
useCluster: true # 是否使用redis集群模式
|
||||
addr: 127.0.0.1:6379 # 使用集群模式addr和db默认无效
|
||||
password: ""
|
||||
db: 0
|
||||
clusterAddrs:
|
||||
- "goder-test-latest.kqsmcz.clustercfg.memorydb.ap-southeast-1.amazonaws.com:6379"
|
||||
- "goder-test-latest-0001-001.kqsmcz.0001.memorydb.ap-southeast-1.amazonaws.com:6379"
|
||||
- "goder-test-latest-0001-002.kqsmcz.0001.memorydb.ap-southeast-1.amazonaws.com:6379"
|
||||
|
||||
# system configuration
|
||||
system:
|
||||
env: local # 修改为public可以关闭路由日志输出
|
||||
addr: 8888
|
||||
db-type: mysql
|
||||
oss-type: local # 控制oss选择走本地还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置
|
||||
use-redis: false # 使用redis
|
||||
use-mongo: false # 使用mongo
|
||||
use-multipoint: false
|
||||
# IP限制次数 一个小时15000次
|
||||
iplimit-count: 15000
|
||||
# IP限制一个小时
|
||||
iplimit-time: 3600
|
||||
# 路由全局前缀
|
||||
router-prefix: ""
|
||||
# 严格角色模式 打开后权限将会存在上下级关系
|
||||
use-strict-auth: false
|
||||
# 禁用自动迁移数据库表结构,生产环境建议设为true,手动迁移
|
||||
disable-auto-migrate: false
|
||||
env: local # 修改为public可以关闭路由日志输出
|
||||
addr: 8888
|
||||
db-type: mysql
|
||||
oss-type: local # 控制oss选择走本地还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置
|
||||
use-redis: false # 使用redis
|
||||
use-mongo: false # 使用mongo
|
||||
use-multipoint: false
|
||||
# IP限制次数 一个小时15000次
|
||||
iplimit-count: 15000
|
||||
# IP限制一个小时
|
||||
iplimit-time: 3600
|
||||
# 路由全局前缀
|
||||
router-prefix: ""
|
||||
# 严格角色模式 打开后权限将会存在上下级关系
|
||||
use-strict-auth: false
|
||||
# 禁用自动迁移数据库表结构,生产环境建议设为true,手动迁移
|
||||
disable-auto-migrate: false
|
||||
|
||||
# captcha configuration
|
||||
captcha:
|
||||
key-long: 6
|
||||
img-width: 240
|
||||
img-height: 80
|
||||
open-captcha: 0 # 0代表一直开启,大于0代表限制次数
|
||||
open-captcha-timeout: 3600 # open-captcha大于0时才生效
|
||||
key-long: 6
|
||||
img-width: 240
|
||||
img-height: 80
|
||||
open-captcha: 0 # 0代表一直开启,大于0代表限制次数
|
||||
open-captcha-timeout: 3600 # open-captcha大于0时才生效
|
||||
|
||||
# mysql connect configuration
|
||||
# 未初始化之前请勿手动修改数据库信息!!!如果一定要手动初始化请看(https://gin-vue-admin.com/docs/first_master)
|
||||
mysql:
|
||||
path: ""
|
||||
port: ""
|
||||
config: ""
|
||||
db-name: ""
|
||||
username: ""
|
||||
password: ""
|
||||
max-idle-conns: 10
|
||||
max-open-conns: 100
|
||||
log-mode: ""
|
||||
log-zap: false
|
||||
path: "goder2.cpccmm68qb1d.ap-southeast-1.rds.amazonaws.com"
|
||||
port: "3306"
|
||||
config: "charset=utf8mb4&parseTime=True&loc=Local"
|
||||
db-name: "byg_data"
|
||||
username: "admin"
|
||||
password: "vH2GkUxz2398GmDTy"
|
||||
max-idle-conns: 10
|
||||
max-open-conns: 100
|
||||
log-mode: ""
|
||||
log-zap: false
|
||||
|
||||
# pgsql connect configuration
|
||||
# 未初始化之前请勿手动修改数据库信息!!!如果一定要手动初始化请看(https://gin-vue-admin.com/docs/first_master)
|
||||
pgsql:
|
||||
path: ""
|
||||
port: ""
|
||||
config: ""
|
||||
db-name: ""
|
||||
username: ""
|
||||
password: ""
|
||||
max-idle-conns: 10
|
||||
max-open-conns: 100
|
||||
log-mode: ""
|
||||
log-zap: false
|
||||
oracle:
|
||||
path: ""
|
||||
port: ""
|
||||
config: ""
|
||||
db-name: ""
|
||||
username: ""
|
||||
password: ""
|
||||
max-idle-conns: 10
|
||||
max-open-conns: 100
|
||||
log-mode: ""
|
||||
log-zap: false
|
||||
mssql:
|
||||
path: ""
|
||||
port: ""
|
||||
config: ""
|
||||
db-name: ""
|
||||
username: ""
|
||||
password: ""
|
||||
max-idle-conns: 10
|
||||
max-open-conns: 100
|
||||
log-mode: ""
|
||||
log-zap: false
|
||||
sqlite:
|
||||
path: ""
|
||||
port: ""
|
||||
config: ""
|
||||
db-name: ""
|
||||
username: ""
|
||||
password: ""
|
||||
max-idle-conns: 10
|
||||
max-open-conns: 100
|
||||
log-mode: ""
|
||||
log-zap: false
|
||||
path: ""
|
||||
port: ""
|
||||
config: ""
|
||||
db-name: ""
|
||||
username: ""
|
||||
password: ""
|
||||
max-idle-conns: 10
|
||||
max-open-conns: 100
|
||||
log-mode: ""
|
||||
log-zap: false
|
||||
db-list:
|
||||
- disable: true # 是否禁用
|
||||
type: "" # 数据库的类型,目前支持mysql、pgsql、mssql、oracle
|
||||
alias-name: "" # 数据库的名称,注意: alias-name 需要在db-list中唯一
|
||||
path: ""
|
||||
port: ""
|
||||
config: ""
|
||||
db-name: ""
|
||||
username: ""
|
||||
password: ""
|
||||
max-idle-conns: 10
|
||||
max-open-conns: 100
|
||||
log-mode: ""
|
||||
log-zap: false
|
||||
- disable: false # 是否禁用
|
||||
type: "mysql" # 数据库的类型,目前支持mysql、pgsql、mssql、oracle
|
||||
alias-name: "byg_data" # 数据库的名称,注意: alias-name 需要在db-list中唯一
|
||||
path: "goder2.cpccmm68qb1d.ap-southeast-1.rds.amazonaws.com"
|
||||
port: "3306"
|
||||
config: "charset=utf8mb4&parseTime=True&loc=Local"
|
||||
db-name: "byg_data"
|
||||
username: "admin"
|
||||
password: "vH2GkUxz2398GmDTy"
|
||||
max-idle-conns: 10
|
||||
max-open-conns: 100
|
||||
log-mode: "debug"
|
||||
log-zap: false
|
||||
|
||||
# local configuration
|
||||
local:
|
||||
path: uploads/file
|
||||
store-path: uploads/file
|
||||
path: uploads/file
|
||||
store-path: uploads/file
|
||||
|
||||
# autocode configuration
|
||||
autocode:
|
||||
web: web/src
|
||||
root: "" # root 自动适配项目根目录, 请不要手动配置,他会在项目加载的时候识别出根路径
|
||||
server: server
|
||||
module: 'byg-backend'
|
||||
ai-path: "" # AI服务路径
|
||||
|
||||
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
|
||||
qiniu:
|
||||
zone: ZoneHuaDong
|
||||
bucket: ""
|
||||
img-path: ""
|
||||
use-https: false
|
||||
access-key: ""
|
||||
secret-key: ""
|
||||
use-cdn-domains: false
|
||||
|
||||
# minio oss configuration
|
||||
minio:
|
||||
endpoint: yourEndpoint
|
||||
access-key-id: yourAccessKeyId
|
||||
access-key-secret: yourAccessKeySecret
|
||||
bucket-name: yourBucketName
|
||||
use-ssl: false
|
||||
base-path: ""
|
||||
bucket-url: "http://host:9000/yourBucketName"
|
||||
|
||||
# aliyun oss configuration
|
||||
aliyun-oss:
|
||||
endpoint: yourEndpoint
|
||||
access-key-id: yourAccessKeyId
|
||||
access-key-secret: yourAccessKeySecret
|
||||
bucket-name: yourBucketName
|
||||
bucket-url: yourBucketUrl
|
||||
base-path: yourBasePath
|
||||
|
||||
# tencent cos configuration
|
||||
tencent-cos:
|
||||
bucket: xxxxx-10005608
|
||||
region: ap-shanghai
|
||||
secret-id: your-secret-id
|
||||
secret-key: your-secret-key
|
||||
base-url: https://gin.vue.admin
|
||||
path-prefix: byg-backend
|
||||
web: web/src
|
||||
root: "" # root 自动适配项目根目录, 请不要手动配置,他会在项目加载的时候识别出根路径
|
||||
server: server
|
||||
module: 'bygdata'
|
||||
ai-path: "" # AI服务路径
|
||||
|
||||
# aws s3 configuration (minio compatible)
|
||||
aws-s3:
|
||||
bucket: xxxxx-10005608
|
||||
region: ap-shanghai
|
||||
endpoint: ""
|
||||
s3-force-path-style: false
|
||||
disable-ssl: false
|
||||
secret-id: your-secret-id
|
||||
secret-key: your-secret-key
|
||||
base-url: https://gin.vue.admin
|
||||
path-prefix: byg-backend
|
||||
|
||||
# cloudflare r2 configuration
|
||||
cloudflare-r2:
|
||||
bucket: xxxx0bucket
|
||||
base-url: https://gin.vue.admin.com
|
||||
path: uploads
|
||||
account-id: xxx_account_id
|
||||
access-key-id: xxx_key_id
|
||||
secret-access-key: xxx_secret_key
|
||||
|
||||
# huawei obs configuration
|
||||
hua-wei-obs:
|
||||
path: you-path
|
||||
bucket: you-bucket
|
||||
endpoint: you-endpoint
|
||||
access-key: you-access-key
|
||||
secret-key: you-secret-key
|
||||
bucket: xxxxx-10005608
|
||||
region: ap-shanghai
|
||||
endpoint: ""
|
||||
s3-force-path-style: false
|
||||
disable-ssl: false
|
||||
secret-id: your-secret-id
|
||||
secret-key: your-secret-key
|
||||
base-url: https://gin.vue.admin
|
||||
path-prefix: bygdata
|
||||
|
||||
# excel configuration
|
||||
excel:
|
||||
dir: ./resource/excel/
|
||||
dir: ./resource/excel/
|
||||
|
||||
# disk usage configuration
|
||||
disk-list:
|
||||
- mount-point: "/"
|
||||
- mount-point: "/"
|
||||
|
||||
# 跨域配置
|
||||
# 需要配合 server/initialize/router.go -> `Router.Use(middleware.CorsByRules())` 使用
|
||||
cors:
|
||||
mode: strict-whitelist # 放行模式: allow-all, 放行全部; whitelist, 白名单模式, 来自白名单内域名的请求添加 cors 头; strict-whitelist 严格白名单模式, 白名单外的请求一律拒绝
|
||||
whitelist:
|
||||
- allow-origin: example1.com
|
||||
allow-headers: Content-Type,AccessToken,X-CSRF-Token, Authorization, Token,X-Token,X-User-Id
|
||||
allow-methods: POST, GET
|
||||
expose-headers: Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type
|
||||
allow-credentials: true # 布尔值
|
||||
- allow-origin: example2.com
|
||||
allow-headers: content-type
|
||||
allow-methods: GET, POST
|
||||
expose-headers: Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type
|
||||
allow-credentials: true # 布尔值
|
||||
mode: strict-whitelist # 放行模式: allow-all, 放行全部; whitelist, 白名单模式, 来自白名单内域名的请求添加 cors 头; strict-whitelist 严格白名单模式, 白名单外的请求一律拒绝
|
||||
whitelist:
|
||||
- allow-origin: example1.com
|
||||
allow-headers: Content-Type,AccessToken,X-CSRF-Token, Authorization, Token,X-Token,X-User-Id
|
||||
allow-methods: POST, GET
|
||||
expose-headers: Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type
|
||||
allow-credentials: true # 布尔值
|
||||
- allow-origin: example2.com
|
||||
allow-headers: content-type
|
||||
allow-methods: GET, POST
|
||||
expose-headers: Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type
|
||||
allow-credentials: true # 布尔值
|
||||
mcp:
|
||||
name: GVA_MCP
|
||||
version: v1.0.0
|
||||
sse_path: /sse
|
||||
message_path: /message
|
||||
url_prefix: ''
|
||||
addr: 8889
|
||||
separate: false
|
||||
name: GVA_MCP
|
||||
version: v1.0.0
|
||||
sse_path: /sse
|
||||
message_path: /message
|
||||
url_prefix: ''
|
||||
addr: 8889
|
||||
separate: false
|
||||
|
||||
aws:
|
||||
aws-sqs-url: https://sqs.ap-east-1.amazonaws.com/322814420330/boyingle.fifo
|
||||
push-aws-sqs-url: https://sqs.ap-east-1.amazonaws.com/322814420330/boyingle.fifo
|
||||
aws-sqs-access-key: AKIAUWKJ5EVVM2APLKGR
|
||||
aws-sqs-secret-key: JYJRe2S1vpQvbrzy8gVp5OABXoJVZXePnwvCbhKe
|
||||
sqs-region: ""
|
||||
aws-sqs-url: https://sqs.ap-east-1.amazonaws.com/322814420330/boyingle.fifo
|
||||
push-aws-sqs-url: https://sqs.ap-east-1.amazonaws.com/322814420330/boyingle.fifo
|
||||
aws-sqs-access-key: AKIAUWKJ5EVVM2APLKGR
|
||||
aws-sqs-secret-key: JYJRe2S1vpQvbrzy8gVp5OABXoJVZXePnwvCbhKe
|
||||
sqs-region: ""
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/system"
|
||||
"byg-backend/service"
|
||||
astutil "byg-backend/utils/ast"
|
||||
"byg-backend/utils/stacktrace"
|
||||
"bygdata/global"
|
||||
"bygdata/model/system"
|
||||
"bygdata/service"
|
||||
astutil "bygdata/utils/ast"
|
||||
"bygdata/utils/stacktrace"
|
||||
"context"
|
||||
"fmt"
|
||||
"go.uber.org/zap"
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/initialize"
|
||||
"byg-backend/service/system"
|
||||
"bygdata/global"
|
||||
"bygdata/initialize"
|
||||
"bygdata/service/system"
|
||||
"fmt"
|
||||
"go.uber.org/zap"
|
||||
"time"
|
||||
|
||||
@ -6,8 +6,8 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"byg-backend/core/internal"
|
||||
"byg-backend/global"
|
||||
"bygdata/core/internal"
|
||||
"bygdata/global"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"byg-backend/core/internal"
|
||||
"byg-backend/global"
|
||||
"byg-backend/utils"
|
||||
"bygdata/core/internal"
|
||||
"bygdata/global"
|
||||
"bygdata/utils"
|
||||
"fmt"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
package docs
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"bygdata/global"
|
||||
"github.com/swaggo/swag"
|
||||
)
|
||||
|
||||
|
||||
@ -8,14 +8,14 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/qiniu/qmgo"
|
||||
|
||||
"byg-backend/utils/timer"
|
||||
"bygdata/utils/timer"
|
||||
"github.com/songzhibin97/gkit/cache/local_cache"
|
||||
|
||||
"golang.org/x/sync/singleflight"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"byg-backend/config"
|
||||
"bygdata/config"
|
||||
|
||||
"github.com/redis/go-redis/v9"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/config"
|
||||
"byg-backend/global"
|
||||
"bygdata/config"
|
||||
"bygdata/global"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/model/example"
|
||||
sysModel "byg-backend/model/system"
|
||||
"byg-backend/plugin/announcement/model"
|
||||
"byg-backend/service/system"
|
||||
"bygdata/model/example"
|
||||
sysModel "bygdata/model/system"
|
||||
"bygdata/plugin/announcement/model"
|
||||
"bygdata/service/system"
|
||||
"context"
|
||||
adapter "github.com/casbin/gorm-adapter/v3"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@ -3,9 +3,9 @@ package initialize
|
||||
import (
|
||||
"os"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/example"
|
||||
"byg-backend/model/system"
|
||||
"bygdata/global"
|
||||
"bygdata/model/example"
|
||||
"bygdata/model/system"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"bygdata/global"
|
||||
)
|
||||
|
||||
func bizModel() error {
|
||||
|
||||
@ -10,9 +10,9 @@ package initialize
|
||||
*/
|
||||
|
||||
import (
|
||||
"byg-backend/config"
|
||||
"byg-backend/global"
|
||||
"byg-backend/initialize/internal"
|
||||
"bygdata/config"
|
||||
"bygdata/global"
|
||||
"bygdata/initialize/internal"
|
||||
"gorm.io/driver/sqlserver"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/config"
|
||||
"byg-backend/global"
|
||||
"byg-backend/initialize/internal"
|
||||
"bygdata/config"
|
||||
"bygdata/global"
|
||||
"bygdata/initialize/internal"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/config"
|
||||
"byg-backend/global"
|
||||
"byg-backend/initialize/internal"
|
||||
"bygdata/config"
|
||||
"bygdata/global"
|
||||
"bygdata/initialize/internal"
|
||||
oracle "github.com/dzwvip/gorm-oracle"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/config"
|
||||
"byg-backend/global"
|
||||
"byg-backend/initialize/internal"
|
||||
"bygdata/config"
|
||||
"bygdata/global"
|
||||
"bygdata/initialize/internal"
|
||||
"gorm.io/driver/postgres"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/config"
|
||||
"byg-backend/global"
|
||||
"byg-backend/initialize/internal"
|
||||
"bygdata/config"
|
||||
"bygdata/global"
|
||||
"bygdata/initialize/internal"
|
||||
"github.com/glebarez/sqlite"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/utils"
|
||||
"bygdata/utils"
|
||||
)
|
||||
|
||||
// 初始化全局函数
|
||||
|
||||
@ -3,7 +3,7 @@ package internal
|
||||
import (
|
||||
"time"
|
||||
|
||||
"byg-backend/config"
|
||||
"bygdata/config"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/logger"
|
||||
"gorm.io/gorm/schema"
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"byg-backend/config"
|
||||
"byg-backend/global"
|
||||
"bygdata/config"
|
||||
"bygdata/global"
|
||||
"fmt"
|
||||
"gorm.io/gorm/logger"
|
||||
)
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
mcpTool "byg-backend/mcp"
|
||||
"bygdata/global"
|
||||
mcpTool "bygdata/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
)
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/initialize/internal"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/initialize/internal"
|
||||
"bygdata/utils"
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
@ -6,8 +6,8 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/utils"
|
||||
)
|
||||
|
||||
func OtherInit() {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"bygdata/global"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
|
||||
@ -3,9 +3,9 @@ package initialize
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/plugin/email"
|
||||
"byg-backend/utils/plugin"
|
||||
"bygdata/global"
|
||||
"bygdata/plugin/email"
|
||||
"bygdata/utils/plugin"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
_ "byg-backend/plugin"
|
||||
"byg-backend/utils/plugin/v2"
|
||||
_ "bygdata/plugin"
|
||||
"bygdata/utils/plugin/v2"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
|
||||
@ -3,8 +3,8 @@ package initialize
|
||||
import (
|
||||
"context"
|
||||
|
||||
"byg-backend/config"
|
||||
"byg-backend/global"
|
||||
"bygdata/config"
|
||||
"bygdata/global"
|
||||
|
||||
"github.com/redis/go-redis/v9"
|
||||
"go.uber.org/zap"
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
_ "byg-backend/source/example"
|
||||
_ "byg-backend/source/system"
|
||||
_ "bygdata/source/example"
|
||||
_ "bygdata/source/system"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"bygdata/global"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
||||
@ -4,10 +4,10 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"byg-backend/docs"
|
||||
"byg-backend/global"
|
||||
"byg-backend/middleware"
|
||||
"byg-backend/router"
|
||||
"bygdata/docs"
|
||||
"bygdata/global"
|
||||
"bygdata/middleware"
|
||||
"bygdata/router"
|
||||
"github.com/gin-gonic/gin"
|
||||
swaggerFiles "github.com/swaggo/files"
|
||||
ginSwagger "github.com/swaggo/gin-swagger"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/router"
|
||||
"bygdata/router"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"byg-backend/task"
|
||||
"bygdata/task"
|
||||
"fmt"
|
||||
|
||||
"github.com/robfig/cron/v3"
|
||||
|
||||
"byg-backend/global"
|
||||
"bygdata/global"
|
||||
)
|
||||
|
||||
func Timer() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package initialize
|
||||
|
||||
import "byg-backend/utils"
|
||||
import "bygdata/utils"
|
||||
|
||||
func init() {
|
||||
_ = utils.RegisterRule("PageVerify",
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
[byg-backend]2026-02-02 16:39:03.554 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/initialize/router.go:75 register swagger handler
|
||||
[byg-backend]2026-02-02 16:39:03.584 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/initialize/plugin.go:10 项目暂未初始化,无法安装插件,初始化后重启项目即可完成插件安装
|
||||
[byg-backend]2026-02-02 16:39:03.585 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/initialize/router.go:129 router register success
|
||||
[byg-backend]2026-02-02 16:40:18.841 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/core/server_run.go:48 关闭WEB服务...
|
||||
[byg-backend]2026-02-02 16:40:18.843 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/core/server_run.go:59 WEB服务已关闭
|
||||
[byg-backend]2026-02-02 16:40:25.142 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/initialize/router.go:75 register swagger handler
|
||||
[byg-backend]2026-02-02 16:40:25.171 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/initialize/plugin.go:10 项目暂未初始化,无法安装插件,初始化后重启项目即可完成插件安装
|
||||
[byg-backend]2026-02-02 16:40:25.171 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/initialize/router.go:129 router register success
|
||||
[byg-backend]2026-02-02 16:40:44.437 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/core/server_run.go:48 关闭WEB服务...
|
||||
[byg-backend]2026-02-02 16:40:44.438 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/core/server_run.go:59 WEB服务已关闭
|
||||
[byg-backend]2026-02-02 16:40:50.523 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/initialize/router.go:75 register swagger handler
|
||||
[byg-backend]2026-02-02 16:40:50.557 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/initialize/plugin.go:10 项目暂未初始化,无法安装插件,初始化后重启项目即可完成插件安装
|
||||
[byg-backend]2026-02-02 16:40:50.559 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/initialize/router.go:129 router register success
|
||||
[byg-backend]2026-02-02 16:41:00.505 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/core/server_run.go:48 关闭WEB服务...
|
||||
[byg-backend]2026-02-02 16:41:00.506 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/byg-backend/core/server_run.go:59 WEB服务已关闭
|
||||
[bygdata]2026-02-02 16:39:03.554 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/initialize/router.go:75 register swagger handler
|
||||
[bygdata]2026-02-02 16:39:03.584 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/initialize/plugin.go:10 项目暂未初始化,无法安装插件,初始化后重启项目即可完成插件安装
|
||||
[bygdata]2026-02-02 16:39:03.585 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/initialize/router.go:129 router register success
|
||||
[bygdata]2026-02-02 16:40:18.841 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/core/server_run.go:48 关闭WEB服务...
|
||||
[bygdata]2026-02-02 16:40:18.843 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/core/server_run.go:59 WEB服务已关闭
|
||||
[bygdata]2026-02-02 16:40:25.142 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/initialize/router.go:75 register swagger handler
|
||||
[bygdata]2026-02-02 16:40:25.171 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/initialize/plugin.go:10 项目暂未初始化,无法安装插件,初始化后重启项目即可完成插件安装
|
||||
[bygdata]2026-02-02 16:40:25.171 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/initialize/router.go:129 router register success
|
||||
[bygdata]2026-02-02 16:40:44.437 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/core/server_run.go:48 关闭WEB服务...
|
||||
[bygdata]2026-02-02 16:40:44.438 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/core/server_run.go:59 WEB服务已关闭
|
||||
[bygdata]2026-02-02 16:40:50.523 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/initialize/router.go:75 register swagger handler
|
||||
[bygdata]2026-02-02 16:40:50.557 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/initialize/plugin.go:10 项目暂未初始化,无法安装插件,初始化后重启项目即可完成插件安装
|
||||
[bygdata]2026-02-02 16:40:50.559 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/initialize/router.go:129 router register success
|
||||
[bygdata]2026-02-02 16:41:00.505 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/core/server_run.go:48 关闭WEB服务...
|
||||
[bygdata]2026-02-02 16:41:00.506 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/core/server_run.go:59 WEB服务已关闭
|
||||
|
||||
21
log/2026-02-04/error.log
Normal file
21
log/2026-02-04/error.log
Normal file
@ -0,0 +1,21 @@
|
||||
[bygdata]2026-02-04 01:21:03.111 [31merror[0m /home/ubuntu/workspace/bygdata/api/v1/system/sys_user.go:68 登陆失败! 用户名不存在或者密码错误! {"error": "record not found"}
|
||||
bygdata/api/v1/system.(*BaseApi).Login
|
||||
/home/ubuntu/workspace/bygdata/api/v1/system/sys_user.go:68
|
||||
github.com/gin-gonic/gin.(*Context).Next
|
||||
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185
|
||||
github.com/gin-gonic/gin.LoggerWithConfig.func1
|
||||
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249
|
||||
github.com/gin-gonic/gin.(*Context).Next
|
||||
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185
|
||||
bygdata/initialize.Routers.GinRecovery.func4
|
||||
/home/ubuntu/workspace/bygdata/middleware/error.go:78
|
||||
github.com/gin-gonic/gin.(*Context).Next
|
||||
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185
|
||||
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
|
||||
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633
|
||||
github.com/gin-gonic/gin.(*Engine).ServeHTTP
|
||||
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589
|
||||
net/http.serverHandler.ServeHTTP
|
||||
/home/ubuntu/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.linux-amd64/src/net/http/server.go:3301
|
||||
net/http.(*conn).serve
|
||||
/home/ubuntu/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.linux-amd64/src/net/http/server.go:2102
|
||||
11
log/2026-02-04/info.log
Normal file
11
log/2026-02-04/info.log
Normal file
@ -0,0 +1,11 @@
|
||||
[bygdata]2026-02-04 01:07:34.733 [34minfo[0m /home/ubuntu/workspace/bygdata/initialize/gorm.go:84 register table success
|
||||
[bygdata]2026-02-04 01:07:34.735 [34minfo[0m /home/ubuntu/workspace/bygdata/initialize/router.go:75 register swagger handler
|
||||
[bygdata]2026-02-04 01:07:34.831 [34minfo[0m /home/ubuntu/workspace/bygdata/initialize/router.go:129 router register success
|
||||
[bygdata]2026-02-04 01:20:14.169 [34minfo[0m /home/ubuntu/workspace/bygdata/core/server_run.go:48 关闭WEB服务...
|
||||
[bygdata]2026-02-04 01:20:14.172 [34minfo[0m /home/ubuntu/workspace/bygdata/core/server_run.go:59 WEB服务已关闭
|
||||
[bygdata]2026-02-04 01:20:41.867 [34minfo[0m /home/ubuntu/workspace/bygdata/initialize/gorm.go:84 register table success
|
||||
[bygdata]2026-02-04 01:20:41.868 [34minfo[0m /home/ubuntu/workspace/bygdata/initialize/router.go:75 register swagger handler
|
||||
[bygdata]2026-02-04 01:20:41.897 [34minfo[0m /home/ubuntu/workspace/bygdata/initialize/router.go:129 router register success
|
||||
[bygdata]2026-02-04 01:21:05.419 [34minfo[0m /home/ubuntu/workspace/bygdata/api/v1/system/sys_initdb.go:57 数据库无需初始化
|
||||
[bygdata]2026-02-04 01:23:12.576 [34minfo[0m /home/ubuntu/workspace/bygdata/core/server_run.go:48 关闭WEB服务...
|
||||
[bygdata]2026-02-04 01:23:12.577 [34minfo[0m /home/ubuntu/workspace/bygdata/core/server_run.go:59 WEB服务已关闭
|
||||
21
log/2026-02-05/error.log
Normal file
21
log/2026-02-05/error.log
Normal file
@ -0,0 +1,21 @@
|
||||
[bygdata]2026-02-05 05:11:15.206 [31merror[0m /home/ubuntu/workspace/bygdata/api/v1/system/sys_user.go:68 登陆失败! 用户名不存在或者密码错误! {"error": "record not found"}
|
||||
bygdata/api/v1/system.(*BaseApi).Login
|
||||
/home/ubuntu/workspace/bygdata/api/v1/system/sys_user.go:68
|
||||
github.com/gin-gonic/gin.(*Context).Next
|
||||
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185
|
||||
github.com/gin-gonic/gin.LoggerWithConfig.func1
|
||||
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249
|
||||
github.com/gin-gonic/gin.(*Context).Next
|
||||
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185
|
||||
bygdata/initialize.Routers.GinRecovery.func4
|
||||
/home/ubuntu/workspace/bygdata/middleware/error.go:78
|
||||
github.com/gin-gonic/gin.(*Context).Next
|
||||
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185
|
||||
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
|
||||
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633
|
||||
github.com/gin-gonic/gin.(*Engine).ServeHTTP
|
||||
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589
|
||||
net/http.serverHandler.ServeHTTP
|
||||
/home/ubuntu/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.linux-amd64/src/net/http/server.go:3301
|
||||
net/http.(*conn).serve
|
||||
/home/ubuntu/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.linux-amd64/src/net/http/server.go:2102
|
||||
5
log/2026-02-05/info.log
Normal file
5
log/2026-02-05/info.log
Normal file
@ -0,0 +1,5 @@
|
||||
[bygdata]2026-02-05 05:10:14.085 [34minfo[0m /home/ubuntu/workspace/bygdata/initialize/gorm.go:84 register table success
|
||||
[bygdata]2026-02-05 05:10:14.086 [34minfo[0m /home/ubuntu/workspace/bygdata/initialize/router.go:75 register swagger handler
|
||||
[bygdata]2026-02-05 05:10:14.114 [34minfo[0m /home/ubuntu/workspace/bygdata/initialize/router.go:129 router register success
|
||||
[bygdata]2026-02-05 05:12:54.297 [34minfo[0m /home/ubuntu/workspace/bygdata/core/server_run.go:48 关闭WEB服务...
|
||||
[bygdata]2026-02-05 05:12:54.297 [34minfo[0m /home/ubuntu/workspace/bygdata/core/server_run.go:59 WEB服务已关闭
|
||||
10
main.go
10
main.go
@ -1,10 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"byg-backend/api/v1/sqs"
|
||||
"byg-backend/core"
|
||||
"byg-backend/global"
|
||||
"byg-backend/initialize"
|
||||
"bygdata/core"
|
||||
"bygdata/global"
|
||||
"bygdata/initialize"
|
||||
|
||||
_ "go.uber.org/automaxprocs"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
@ -47,7 +47,7 @@ func initializeSystem() {
|
||||
initialize.DBList()
|
||||
initialize.SetupHandlers() // 注册全局函数
|
||||
|
||||
sqs.ProcessSqsMessage() // 消息队列
|
||||
//sqs.ProcessSqsMessage() // 消息队列
|
||||
|
||||
if global.GVA_DB != nil {
|
||||
initialize.RegisterTables() // 初始化表
|
||||
|
||||
@ -6,9 +6,9 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/system"
|
||||
"byg-backend/service"
|
||||
"bygdata/global"
|
||||
"bygdata/model/system"
|
||||
"bygdata/service"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/system"
|
||||
"bygdata/global"
|
||||
"bygdata/model/system"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -6,9 +6,9 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/system"
|
||||
"byg-backend/service"
|
||||
"bygdata/global"
|
||||
"bygdata/model/system"
|
||||
"bygdata/service"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@ -5,9 +5,9 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/system"
|
||||
"byg-backend/service"
|
||||
"bygdata/global"
|
||||
"bygdata/model/system"
|
||||
"bygdata/service"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package mcpTool
|
||||
|
||||
import (
|
||||
model "byg-backend/model/system"
|
||||
model "bygdata/model/system"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"byg-backend/global"
|
||||
"bygdata/global"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
)
|
||||
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
package mcpTool
|
||||
|
||||
import (
|
||||
model "byg-backend/model/system"
|
||||
"byg-backend/utils"
|
||||
model "bygdata/model/system"
|
||||
"bygdata/utils"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/system/request"
|
||||
"bygdata/global"
|
||||
"bygdata/model/system/request"
|
||||
|
||||
"byg-backend/service"
|
||||
"bygdata/service"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -6,9 +6,9 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/system"
|
||||
"byg-backend/service"
|
||||
"bygdata/global"
|
||||
"bygdata/model/system"
|
||||
"bygdata/service"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/system"
|
||||
"bygdata/global"
|
||||
"bygdata/model/system"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"bygdata/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"byg-backend/config"
|
||||
"byg-backend/global"
|
||||
"bygdata/config"
|
||||
"bygdata/global"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@ -6,11 +6,11 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"byg-backend/plugin/email/utils"
|
||||
utils2 "byg-backend/utils"
|
||||
"bygdata/plugin/email/utils"
|
||||
utils2 "bygdata/utils"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/system"
|
||||
"bygdata/global"
|
||||
"bygdata/model/system"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -10,9 +10,9 @@ import (
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/system"
|
||||
"byg-backend/service"
|
||||
"bygdata/global"
|
||||
"bygdata/model/system"
|
||||
"bygdata/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -5,11 +5,11 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/utils"
|
||||
"bygdata/global"
|
||||
"bygdata/utils"
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
|
||||
"byg-backend/model/common/response"
|
||||
"bygdata/model/common/response"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
|
||||
@ -8,8 +8,8 @@ import (
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/common/response"
|
||||
"bygdata/global"
|
||||
"bygdata/model/common/response"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
|
||||
@ -11,10 +11,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"byg-backend/utils"
|
||||
"bygdata/utils"
|
||||
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/system"
|
||||
"bygdata/global"
|
||||
"bygdata/model/system"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"bygdata/global"
|
||||
)
|
||||
|
||||
type ExaAttachmentCategory struct {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"bygdata/global"
|
||||
)
|
||||
|
||||
// file struct, 文件结构体
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"byg-backend/model/system"
|
||||
"bygdata/global"
|
||||
"bygdata/model/system"
|
||||
)
|
||||
|
||||
type ExaCustomer struct {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"byg-backend/global"
|
||||
"bygdata/global"
|
||||
)
|
||||
|
||||
type ExaFileUploadAndDownload struct {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"byg-backend/model/common/request"
|
||||
"bygdata/model/common/request"
|
||||
)
|
||||
|
||||
type ExaAttachmentCategorySearch struct {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package response
|
||||
|
||||
import "byg-backend/model/example"
|
||||
import "bygdata/model/example"
|
||||
|
||||
type FilePathResponse struct {
|
||||
FilePath string `json:"filePath"`
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package response
|
||||
|
||||
import "byg-backend/model/example"
|
||||
import "bygdata/model/example"
|
||||
|
||||
type ExaCustomerResponse struct {
|
||||
Customer example.ExaCustomer `json:"customer"`
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package response
|
||||
|
||||
import "byg-backend/model/example"
|
||||
import "bygdata/model/example"
|
||||
|
||||
type ExaFileResponse struct {
|
||||
File example.ExaFileUploadAndDownload `json:"file"`
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"byg-backend/model/common/request"
|
||||
"byg-backend/model/system"
|
||||
"bygdata/model/common/request"
|
||||
"bygdata/model/system"
|
||||
)
|
||||
|
||||
// api分页条件查询及排序结构体
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user