first
This commit is contained in:
parent
e57ec346ea
commit
91a5668ff0
14
Dockerfile
14
Dockerfile
@ -1,6 +1,6 @@
|
|||||||
FROM golang:alpine as builder
|
FROM golang:alpine as builder
|
||||||
|
|
||||||
WORKDIR /go/src/byg-backend
|
WORKDIR /go/src/bygdata
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN go env -w GO111MODULE=on \
|
RUN go env -w GO111MODULE=on \
|
||||||
@ -18,14 +18,14 @@ ENV TZ=Asia/Shanghai
|
|||||||
RUN apk update && apk add --no-cache tzdata openntpd \
|
RUN apk update && apk add --no-cache tzdata openntpd \
|
||||||
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
&& 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/bygdata/server ./
|
||||||
COPY --from=0 /go/src/byg-backend/resource ./resource/
|
COPY --from=0 /go/src/bygdata/resource ./resource/
|
||||||
COPY --from=0 /go/src/byg-backend/config.docker.yaml ./
|
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
|
# 挂载目录:如果使用了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/byg-backend"]
|
# VOLUME ["/go/src/bygdata"]
|
||||||
|
|
||||||
EXPOSE 8888
|
EXPOSE 8888
|
||||||
ENTRYPOINT ./server -c config.docker.yaml
|
ENTRYPOINT ./server -c config.docker.yaml
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/api/v1/example"
|
"bygdata/api/v1/example"
|
||||||
"byg-backend/api/v1/system"
|
"bygdata/api/v1/system"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ApiGroupApp = new(ApiGroup)
|
var ApiGroupApp = new(ApiGroup)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package example
|
package example
|
||||||
|
|
||||||
import "byg-backend/service"
|
import "bygdata/service"
|
||||||
|
|
||||||
type ApiGroup struct {
|
type ApiGroup struct {
|
||||||
CustomerApi
|
CustomerApi
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package example
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
common "byg-backend/model/common/request"
|
common "bygdata/model/common/request"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/example"
|
"bygdata/model/example"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -7,12 +7,12 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"byg-backend/model/example"
|
"bygdata/model/example"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
exampleRes "byg-backend/model/example/response"
|
exampleRes "bygdata/model/example/response"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
package example
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/request"
|
"bygdata/model/common/request"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/example"
|
"bygdata/model/example"
|
||||||
exampleRes "byg-backend/model/example/response"
|
exampleRes "bygdata/model/example/response"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
package example
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/example"
|
"bygdata/model/example"
|
||||||
"byg-backend/model/example/request"
|
"bygdata/model/example/request"
|
||||||
exampleRes "byg-backend/model/example/response"
|
exampleRes "bygdata/model/example/response"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package sqs
|
package sqs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/awssqs"
|
"bygdata/model/awssqs"
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
common "byg-backend/model/common/request"
|
common "bygdata/model/common/request"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
request "byg-backend/model/system/request"
|
request "bygdata/model/system/request"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/mcp/client"
|
"bygdata/mcp/client"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system/request"
|
"bygdata/model/system/request"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/mark3labs/mcp-go/mcp"
|
"github.com/mark3labs/mcp-go/mcp"
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
common "byg-backend/model/common/request"
|
common "bygdata/model/common/request"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system/request"
|
"bygdata/model/system/request"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"strings"
|
"strings"
|
||||||
|
|||||||
@ -5,11 +5,11 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system/request"
|
"bygdata/model/system/request"
|
||||||
systemRes "byg-backend/model/system/response"
|
systemRes "bygdata/model/system/response"
|
||||||
"byg-backend/plugin/plugin-tool/utils"
|
"bygdata/plugin/plugin-tool/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system/request"
|
"bygdata/model/system/request"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import "byg-backend/service"
|
import "bygdata/service"
|
||||||
|
|
||||||
type ApiGroup struct {
|
type ApiGroup struct {
|
||||||
DBApi
|
DBApi
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/request"
|
"bygdata/model/common/request"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
systemReq "byg-backend/model/system/request"
|
systemReq "bygdata/model/system/request"
|
||||||
systemRes "byg-backend/model/system/response"
|
systemRes "bygdata/model/system/response"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
sysReq "byg-backend/model/system/request"
|
sysReq "bygdata/model/system/request"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
systemRes "byg-backend/model/system/response"
|
systemRes "bygdata/model/system/response"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system/request"
|
"bygdata/model/system/request"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/model/common"
|
"bygdata/model/common"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -3,9 +3,9 @@ package system
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
systemRes "byg-backend/model/system/response"
|
systemRes "bygdata/model/system/response"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/mojocn/base64Captcha"
|
"github.com/mojocn/base64Captcha"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system/request"
|
"bygdata/model/system/request"
|
||||||
systemRes "byg-backend/model/system/response"
|
systemRes "bygdata/model/system/response"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
"byg-backend/model/system/request"
|
"bygdata/model/system/request"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -3,11 +3,11 @@ package system
|
|||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
"byg-backend/model/system/request"
|
"bygdata/model/system/request"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
systemReq "byg-backend/model/system/request"
|
systemReq "bygdata/model/system/request"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -7,13 +7,13 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/request"
|
"bygdata/model/common/request"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
systemReq "byg-backend/model/system/request"
|
systemReq "bygdata/model/system/request"
|
||||||
"byg-backend/service"
|
"bygdata/service"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system/request"
|
"bygdata/model/system/request"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/request"
|
"bygdata/model/common/request"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
systemReq "byg-backend/model/system/request"
|
systemReq "bygdata/model/system/request"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/request"
|
"bygdata/model/common/request"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
systemReq "byg-backend/model/system/request"
|
systemReq "bygdata/model/system/request"
|
||||||
systemRes "byg-backend/model/system/response"
|
systemRes "bygdata/model/system/response"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/request"
|
"bygdata/model/common/request"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
systemReq "byg-backend/model/system/request"
|
systemReq "bygdata/model/system/request"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
systemReq "byg-backend/model/system/request"
|
systemReq "bygdata/model/system/request"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system/request"
|
"bygdata/model/system/request"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
systemRes "byg-backend/model/system/response"
|
systemRes "bygdata/model/system/response"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -4,14 +4,14 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common"
|
"bygdata/model/common"
|
||||||
"byg-backend/model/common/request"
|
"bygdata/model/common/request"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
systemReq "byg-backend/model/system/request"
|
systemReq "bygdata/model/system/request"
|
||||||
systemRes "byg-backend/model/system/response"
|
systemRes "bygdata/model/system/response"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/redis/go-redis/v9"
|
"github.com/redis/go-redis/v9"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|||||||
@ -8,12 +8,12 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
systemReq "byg-backend/model/system/request"
|
systemReq "bygdata/model/system/request"
|
||||||
systemRes "byg-backend/model/system/response"
|
systemRes "bygdata/model/system/response"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# byg-backend Global Configuration
|
# bygdata Global Configuration
|
||||||
|
|
||||||
# jwt configuration
|
# jwt configuration
|
||||||
jwt:
|
jwt:
|
||||||
@ -10,7 +10,7 @@ jwt:
|
|||||||
zap:
|
zap:
|
||||||
level: info
|
level: info
|
||||||
format: console
|
format: console
|
||||||
prefix: "[byg-backend]"
|
prefix: "[bygdata]"
|
||||||
director: log
|
director: log
|
||||||
show-line: true
|
show-line: true
|
||||||
encode-level: LowercaseColorLevelEncoder
|
encode-level: LowercaseColorLevelEncoder
|
||||||
@ -183,7 +183,7 @@ autocode:
|
|||||||
web: web/src
|
web: web/src
|
||||||
root: "" # root 自动适配项目根目录, 请不要手动配置,他会在项目加载的时候识别出根路径
|
root: "" # root 自动适配项目根目录, 请不要手动配置,他会在项目加载的时候识别出根路径
|
||||||
server: server
|
server: server
|
||||||
module: 'byg-backend'
|
module: 'bygdata'
|
||||||
ai-path: "" # AI服务路径
|
ai-path: "" # AI服务路径
|
||||||
|
|
||||||
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
|
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
|
||||||
@ -222,7 +222,7 @@ tencent-cos:
|
|||||||
secret-id: your-secret-id
|
secret-id: your-secret-id
|
||||||
secret-key: your-secret-key
|
secret-key: your-secret-key
|
||||||
base-url: https://gin.vue.admin
|
base-url: https://gin.vue.admin
|
||||||
path-prefix: byg-backend
|
path-prefix: bygdata
|
||||||
|
|
||||||
# aws s3 configuration (minio compatible)
|
# aws s3 configuration (minio compatible)
|
||||||
aws-s3:
|
aws-s3:
|
||||||
@ -234,7 +234,7 @@ aws-s3:
|
|||||||
secret-id: your-secret-id
|
secret-id: your-secret-id
|
||||||
secret-key: your-secret-key
|
secret-key: your-secret-key
|
||||||
base-url: https://gin.vue.admin
|
base-url: https://gin.vue.admin
|
||||||
path-prefix: byg-backend
|
path-prefix: bygdata
|
||||||
|
|
||||||
# cloudflare r2 configuration
|
# cloudflare r2 configuration
|
||||||
cloudflare-r2:
|
cloudflare-r2:
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# byg-backend Global Configuration
|
# bygdata Global Configuration
|
||||||
|
|
||||||
# jwt configuration
|
# jwt configuration
|
||||||
jwt:
|
jwt:
|
||||||
@ -10,7 +10,7 @@ jwt:
|
|||||||
zap:
|
zap:
|
||||||
level: info
|
level: info
|
||||||
format: console
|
format: console
|
||||||
prefix: "[byg-backend]"
|
prefix: "[bygdata]"
|
||||||
director: log
|
director: log
|
||||||
show-line: true
|
show-line: true
|
||||||
encode-level: LowercaseColorLevelEncoder
|
encode-level: LowercaseColorLevelEncoder
|
||||||
@ -181,7 +181,7 @@ autocode:
|
|||||||
web: web/src
|
web: web/src
|
||||||
root: "" # root 自动适配项目根目录, 请不要手动配置,他会在项目加载的时候识别出根路径
|
root: "" # root 自动适配项目根目录, 请不要手动配置,他会在项目加载的时候识别出根路径
|
||||||
server: server
|
server: server
|
||||||
module: 'byg-backend'
|
module: 'bygdata'
|
||||||
ai-path: "" # AI服务路径
|
ai-path: "" # AI服务路径
|
||||||
|
|
||||||
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
|
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
|
||||||
@ -220,7 +220,7 @@ tencent-cos:
|
|||||||
secret-id: your-secret-id
|
secret-id: your-secret-id
|
||||||
secret-key: your-secret-key
|
secret-key: your-secret-key
|
||||||
base-url: https://gin.vue.admin
|
base-url: https://gin.vue.admin
|
||||||
path-prefix: byg-backend
|
path-prefix: bygdata
|
||||||
|
|
||||||
# aws s3 configuration (minio compatible)
|
# aws s3 configuration (minio compatible)
|
||||||
aws-s3:
|
aws-s3:
|
||||||
@ -232,7 +232,7 @@ aws-s3:
|
|||||||
secret-id: your-secret-id
|
secret-id: your-secret-id
|
||||||
secret-key: your-secret-key
|
secret-key: your-secret-key
|
||||||
base-url: https://gin.vue.admin
|
base-url: https://gin.vue.admin
|
||||||
path-prefix: byg-backend
|
path-prefix: bygdata
|
||||||
|
|
||||||
# cloudflare r2 configuration
|
# cloudflare r2 configuration
|
||||||
cloudflare-r2:
|
cloudflare-r2:
|
||||||
|
|||||||
177
config.yaml
177
config.yaml
@ -1,16 +1,16 @@
|
|||||||
# byg-backend Global Configuration
|
# bygdata Global Configuration
|
||||||
|
|
||||||
# jwt configuration
|
# jwt configuration
|
||||||
jwt:
|
jwt:
|
||||||
signing-key: qmPlus
|
signing-key: fdshflkds-fdds-fdskwor-rn23bk-4324njd
|
||||||
expires-time: 7d
|
expires-time: 7d
|
||||||
buffer-time: 1d
|
buffer-time: 1d
|
||||||
issuer: qmPlus
|
issuer: http://bygdata.bressx.la
|
||||||
# zap logger configuration
|
# zap logger configuration
|
||||||
zap:
|
zap:
|
||||||
level: info
|
level: debug
|
||||||
format: console
|
format: console
|
||||||
prefix: "[byg-backend]"
|
prefix: "[bygdata]"
|
||||||
director: log
|
director: log
|
||||||
show-line: true
|
show-line: true
|
||||||
encode-level: LowercaseColorLevelEncoder
|
encode-level: LowercaseColorLevelEncoder
|
||||||
@ -21,54 +21,27 @@ zap:
|
|||||||
# redis configuration
|
# redis configuration
|
||||||
redis:
|
redis:
|
||||||
#是否使用redis集群模式
|
#是否使用redis集群模式
|
||||||
useCluster: false
|
useCluster: true
|
||||||
#使用集群模式addr和db默认无效
|
#使用集群模式addr和db默认无效
|
||||||
addr: 127.0.0.1:6379
|
addr: 127.0.0.1:6379
|
||||||
password: ""
|
password: ""
|
||||||
db: 0
|
db: 0
|
||||||
clusterAddrs:
|
clusterAddrs:
|
||||||
- "172.21.0.3:7000"
|
- "goder-test-latest.kqsmcz.clustercfg.memorydb.ap-southeast-1.amazonaws.com:6379"
|
||||||
- "172.21.0.4:7001"
|
- "goder-test-latest-0001-001.kqsmcz.0001.memorydb.ap-southeast-1.amazonaws.com:6379"
|
||||||
- "172.21.0.2:7002"
|
- "goder-test-latest-0001-002.kqsmcz.0001.memorydb.ap-southeast-1.amazonaws.com:6379"
|
||||||
|
|
||||||
# redis-list configuration
|
# redis-list configuration
|
||||||
redis-list:
|
redis-list:
|
||||||
- name: cache # 数据库的名称,注意: name 需要在 redis-list 中唯一
|
- name: cache # 数据库的名称,注意: name 需要在 redis-list 中唯一
|
||||||
useCluster: false # 是否使用redis集群模式
|
useCluster: true # 是否使用redis集群模式
|
||||||
addr: 127.0.0.1:6379 # 使用集群模式addr和db默认无效
|
addr: 127.0.0.1:6379 # 使用集群模式addr和db默认无效
|
||||||
password: ""
|
password: ""
|
||||||
db: 0
|
db: 0
|
||||||
clusterAddrs:
|
clusterAddrs:
|
||||||
- "172.21.0.3:7000"
|
- "goder-test-latest.kqsmcz.clustercfg.memorydb.ap-southeast-1.amazonaws.com:6379"
|
||||||
- "172.21.0.4:7001"
|
- "goder-test-latest-0001-001.kqsmcz.0001.memorydb.ap-southeast-1.amazonaws.com:6379"
|
||||||
- "172.21.0.2:7002"
|
- "goder-test-latest-0001-002.kqsmcz.0001.memorydb.ap-southeast-1.amazonaws.com:6379"
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# system configuration
|
# system configuration
|
||||||
system:
|
system:
|
||||||
@ -101,12 +74,12 @@ captcha:
|
|||||||
# mysql connect configuration
|
# mysql connect configuration
|
||||||
# 未初始化之前请勿手动修改数据库信息!!!如果一定要手动初始化请看(https://gin-vue-admin.com/docs/first_master)
|
# 未初始化之前请勿手动修改数据库信息!!!如果一定要手动初始化请看(https://gin-vue-admin.com/docs/first_master)
|
||||||
mysql:
|
mysql:
|
||||||
path: ""
|
path: "goder2.cpccmm68qb1d.ap-southeast-1.rds.amazonaws.com"
|
||||||
port: ""
|
port: "3306"
|
||||||
config: ""
|
config: "charset=utf8mb4&parseTime=True&loc=Local"
|
||||||
db-name: ""
|
db-name: "byg_data"
|
||||||
username: ""
|
username: "admin"
|
||||||
password: ""
|
password: "vH2GkUxz2398GmDTy"
|
||||||
max-idle-conns: 10
|
max-idle-conns: 10
|
||||||
max-open-conns: 100
|
max-open-conns: 100
|
||||||
log-mode: ""
|
log-mode: ""
|
||||||
@ -125,52 +98,19 @@ pgsql:
|
|||||||
max-open-conns: 100
|
max-open-conns: 100
|
||||||
log-mode: ""
|
log-mode: ""
|
||||||
log-zap: false
|
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
|
|
||||||
db-list:
|
db-list:
|
||||||
- disable: true # 是否禁用
|
- disable: false # 是否禁用
|
||||||
type: "" # 数据库的类型,目前支持mysql、pgsql、mssql、oracle
|
type: "mysql" # 数据库的类型,目前支持mysql、pgsql、mssql、oracle
|
||||||
alias-name: "" # 数据库的名称,注意: alias-name 需要在db-list中唯一
|
alias-name: "byg_data" # 数据库的名称,注意: alias-name 需要在db-list中唯一
|
||||||
path: ""
|
path: "goder2.cpccmm68qb1d.ap-southeast-1.rds.amazonaws.com"
|
||||||
port: ""
|
port: "3306"
|
||||||
config: ""
|
config: "charset=utf8mb4&parseTime=True&loc=Local"
|
||||||
db-name: ""
|
db-name: "byg_data"
|
||||||
username: ""
|
username: "admin"
|
||||||
password: ""
|
password: "vH2GkUxz2398GmDTy"
|
||||||
max-idle-conns: 10
|
max-idle-conns: 10
|
||||||
max-open-conns: 100
|
max-open-conns: 100
|
||||||
log-mode: ""
|
log-mode: "debug"
|
||||||
log-zap: false
|
log-zap: false
|
||||||
|
|
||||||
# local configuration
|
# local configuration
|
||||||
@ -183,47 +123,9 @@ autocode:
|
|||||||
web: web/src
|
web: web/src
|
||||||
root: "" # root 自动适配项目根目录, 请不要手动配置,他会在项目加载的时候识别出根路径
|
root: "" # root 自动适配项目根目录, 请不要手动配置,他会在项目加载的时候识别出根路径
|
||||||
server: server
|
server: server
|
||||||
module: 'byg-backend'
|
module: 'bygdata'
|
||||||
ai-path: "" # AI服务路径
|
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
|
|
||||||
|
|
||||||
# aws s3 configuration (minio compatible)
|
# aws s3 configuration (minio compatible)
|
||||||
aws-s3:
|
aws-s3:
|
||||||
bucket: xxxxx-10005608
|
bucket: xxxxx-10005608
|
||||||
@ -234,24 +136,7 @@ aws-s3:
|
|||||||
secret-id: your-secret-id
|
secret-id: your-secret-id
|
||||||
secret-key: your-secret-key
|
secret-key: your-secret-key
|
||||||
base-url: https://gin.vue.admin
|
base-url: https://gin.vue.admin
|
||||||
path-prefix: byg-backend
|
path-prefix: bygdata
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# excel configuration
|
# excel configuration
|
||||||
excel:
|
excel:
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
package internal
|
package internal
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
"byg-backend/service"
|
"bygdata/service"
|
||||||
astutil "byg-backend/utils/ast"
|
astutil "bygdata/utils/ast"
|
||||||
"byg-backend/utils/stacktrace"
|
"bygdata/utils/stacktrace"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package core
|
package core
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/initialize"
|
"bygdata/initialize"
|
||||||
"byg-backend/service/system"
|
"bygdata/service/system"
|
||||||
"fmt"
|
"fmt"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"time"
|
"time"
|
||||||
|
|||||||
@ -6,8 +6,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"byg-backend/core/internal"
|
"bygdata/core/internal"
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"github.com/fsnotify/fsnotify"
|
"github.com/fsnotify/fsnotify"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package core
|
package core
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/core/internal"
|
"bygdata/core/internal"
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"fmt"
|
"fmt"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"go.uber.org/zap/zapcore"
|
"go.uber.org/zap/zapcore"
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
package docs
|
package docs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"github.com/swaggo/swag"
|
"github.com/swaggo/swag"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -8,14 +8,14 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/qiniu/qmgo"
|
"github.com/qiniu/qmgo"
|
||||||
|
|
||||||
"byg-backend/utils/timer"
|
"bygdata/utils/timer"
|
||||||
"github.com/songzhibin97/gkit/cache/local_cache"
|
"github.com/songzhibin97/gkit/cache/local_cache"
|
||||||
|
|
||||||
"golang.org/x/sync/singleflight"
|
"golang.org/x/sync/singleflight"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
||||||
"byg-backend/config"
|
"bygdata/config"
|
||||||
|
|
||||||
"github.com/redis/go-redis/v9"
|
"github.com/redis/go-redis/v9"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/config"
|
"bygdata/config"
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/model/example"
|
"bygdata/model/example"
|
||||||
sysModel "byg-backend/model/system"
|
sysModel "bygdata/model/system"
|
||||||
"byg-backend/plugin/announcement/model"
|
"bygdata/plugin/announcement/model"
|
||||||
"byg-backend/service/system"
|
"bygdata/service/system"
|
||||||
"context"
|
"context"
|
||||||
adapter "github.com/casbin/gorm-adapter/v3"
|
adapter "github.com/casbin/gorm-adapter/v3"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|||||||
@ -3,9 +3,9 @@ package initialize
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/example"
|
"bygdata/model/example"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
)
|
)
|
||||||
|
|
||||||
func bizModel() error {
|
func bizModel() error {
|
||||||
|
|||||||
@ -10,9 +10,9 @@ package initialize
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/config"
|
"bygdata/config"
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/initialize/internal"
|
"bygdata/initialize/internal"
|
||||||
"gorm.io/driver/sqlserver"
|
"gorm.io/driver/sqlserver"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/config"
|
"bygdata/config"
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/initialize/internal"
|
"bygdata/initialize/internal"
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
"gorm.io/driver/mysql"
|
"gorm.io/driver/mysql"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/config"
|
"bygdata/config"
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/initialize/internal"
|
"bygdata/initialize/internal"
|
||||||
oracle "github.com/dzwvip/gorm-oracle"
|
oracle "github.com/dzwvip/gorm-oracle"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/config"
|
"bygdata/config"
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/initialize/internal"
|
"bygdata/initialize/internal"
|
||||||
"gorm.io/driver/postgres"
|
"gorm.io/driver/postgres"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/config"
|
"bygdata/config"
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/initialize/internal"
|
"bygdata/initialize/internal"
|
||||||
"github.com/glebarez/sqlite"
|
"github.com/glebarez/sqlite"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 初始化全局函数
|
// 初始化全局函数
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package internal
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"byg-backend/config"
|
"bygdata/config"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"gorm.io/gorm/logger"
|
"gorm.io/gorm/logger"
|
||||||
"gorm.io/gorm/schema"
|
"gorm.io/gorm/schema"
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package internal
|
package internal
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/config"
|
"bygdata/config"
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"fmt"
|
"fmt"
|
||||||
"gorm.io/gorm/logger"
|
"gorm.io/gorm/logger"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
mcpTool "byg-backend/mcp"
|
mcpTool "bygdata/mcp"
|
||||||
"github.com/mark3labs/mcp-go/server"
|
"github.com/mark3labs/mcp-go/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/initialize/internal"
|
"bygdata/initialize/internal"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|||||||
@ -6,8 +6,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func OtherInit() {
|
func OtherInit() {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -3,9 +3,9 @@ package initialize
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/plugin/email"
|
"bygdata/plugin/email"
|
||||||
"byg-backend/utils/plugin"
|
"bygdata/utils/plugin"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
_ "byg-backend/plugin"
|
_ "bygdata/plugin"
|
||||||
"byg-backend/utils/plugin/v2"
|
"bygdata/utils/plugin/v2"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@ package initialize
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"byg-backend/config"
|
"bygdata/config"
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
|
|
||||||
"github.com/redis/go-redis/v9"
|
"github.com/redis/go-redis/v9"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
_ "byg-backend/source/example"
|
_ "bygdata/source/example"
|
||||||
_ "byg-backend/source/system"
|
_ "bygdata/source/system"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -4,10 +4,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"byg-backend/docs"
|
"bygdata/docs"
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/middleware"
|
"bygdata/middleware"
|
||||||
"byg-backend/router"
|
"bygdata/router"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
swaggerFiles "github.com/swaggo/files"
|
swaggerFiles "github.com/swaggo/files"
|
||||||
ginSwagger "github.com/swaggo/gin-swagger"
|
ginSwagger "github.com/swaggo/gin-swagger"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/router"
|
"bygdata/router"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/task"
|
"bygdata/task"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/robfig/cron/v3"
|
"github.com/robfig/cron/v3"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Timer() {
|
func Timer() {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package initialize
|
package initialize
|
||||||
|
|
||||||
import "byg-backend/utils"
|
import "bygdata/utils"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
_ = utils.RegisterRule("PageVerify",
|
_ = 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
|
[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
|
||||||
[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 项目暂未初始化,无法安装插件,初始化后重启项目即可完成插件安装
|
[bygdata]2026-02-02 16:39:03.584 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/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
|
[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
|
||||||
[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服务...
|
[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服务...
|
||||||
[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服务已关闭
|
[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服务已关闭
|
||||||
[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
|
[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
|
||||||
[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 项目暂未初始化,无法安装插件,初始化后重启项目即可完成插件安装
|
[bygdata]2026-02-02 16:40:25.171 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/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
|
[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
|
||||||
[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服务...
|
[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服务...
|
||||||
[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服务已关闭
|
[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服务已关闭
|
||||||
[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
|
[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
|
||||||
[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 项目暂未初始化,无法安装插件,初始化后重启项目即可完成插件安装
|
[bygdata]2026-02-02 16:40:50.557 [34minfo[0m /Users/liuzhiwang/go-project/src/gitlab.xunlei.cn/xacc/bygdata/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
|
[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
|
||||||
[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服务...
|
[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服务...
|
||||||
[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: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
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/api/v1/sqs"
|
"bygdata/core"
|
||||||
"byg-backend/core"
|
"bygdata/global"
|
||||||
"byg-backend/global"
|
"bygdata/initialize"
|
||||||
"byg-backend/initialize"
|
|
||||||
_ "go.uber.org/automaxprocs"
|
_ "go.uber.org/automaxprocs"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
@ -47,7 +47,7 @@ func initializeSystem() {
|
|||||||
initialize.DBList()
|
initialize.DBList()
|
||||||
initialize.SetupHandlers() // 注册全局函数
|
initialize.SetupHandlers() // 注册全局函数
|
||||||
|
|
||||||
sqs.ProcessSqsMessage() // 消息队列
|
//sqs.ProcessSqsMessage() // 消息队列
|
||||||
|
|
||||||
if global.GVA_DB != nil {
|
if global.GVA_DB != nil {
|
||||||
initialize.RegisterTables() // 初始化表
|
initialize.RegisterTables() // 初始化表
|
||||||
|
|||||||
@ -6,9 +6,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
"byg-backend/service"
|
"bygdata/service"
|
||||||
"github.com/mark3labs/mcp-go/mcp"
|
"github.com/mark3labs/mcp-go/mcp"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
"github.com/mark3labs/mcp-go/mcp"
|
"github.com/mark3labs/mcp-go/mcp"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -6,9 +6,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
"byg-backend/service"
|
"bygdata/service"
|
||||||
"github.com/mark3labs/mcp-go/mcp"
|
"github.com/mark3labs/mcp-go/mcp"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|||||||
@ -5,9 +5,9 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
"byg-backend/service"
|
"bygdata/service"
|
||||||
"github.com/mark3labs/mcp-go/mcp"
|
"github.com/mark3labs/mcp-go/mcp"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package mcpTool
|
package mcpTool
|
||||||
|
|
||||||
import (
|
import (
|
||||||
model "byg-backend/model/system"
|
model "bygdata/model/system"
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
@ -10,7 +10,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"github.com/mark3labs/mcp-go/mcp"
|
"github.com/mark3labs/mcp-go/mcp"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,18 +1,18 @@
|
|||||||
package mcpTool
|
package mcpTool
|
||||||
|
|
||||||
import (
|
import (
|
||||||
model "byg-backend/model/system"
|
model "bygdata/model/system"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/system/request"
|
"bygdata/model/system/request"
|
||||||
|
|
||||||
"byg-backend/service"
|
"bygdata/service"
|
||||||
"github.com/mark3labs/mcp-go/mcp"
|
"github.com/mark3labs/mcp-go/mcp"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -6,9 +6,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
"byg-backend/service"
|
"bygdata/service"
|
||||||
"github.com/mark3labs/mcp-go/mcp"
|
"github.com/mark3labs/mcp-go/mcp"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
"github.com/mark3labs/mcp-go/mcp"
|
"github.com/mark3labs/mcp-go/mcp"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package middleware
|
package middleware
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package middleware
|
package middleware
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/config"
|
"bygdata/config"
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -6,11 +6,11 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"byg-backend/plugin/email/utils"
|
"bygdata/plugin/email/utils"
|
||||||
utils2 "byg-backend/utils"
|
utils2 "bygdata/utils"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -10,9 +10,9 @@ import (
|
|||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
"byg-backend/service"
|
"bygdata/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -5,11 +5,11 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
"github.com/golang-jwt/jwt/v5"
|
"github.com/golang-jwt/jwt/v5"
|
||||||
|
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -8,8 +8,8 @@ import (
|
|||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/common/response"
|
"bygdata/model/common/response"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -11,10 +11,10 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"byg-backend/utils"
|
"bygdata/utils"
|
||||||
|
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package example
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ExaAttachmentCategory struct {
|
type ExaAttachmentCategory struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package example
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
)
|
)
|
||||||
|
|
||||||
// file struct, 文件结构体
|
// file struct, 文件结构体
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package example
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ExaCustomer struct {
|
type ExaCustomer struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package example
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/global"
|
"bygdata/global"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ExaFileUploadAndDownload struct {
|
type ExaFileUploadAndDownload struct {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/model/common/request"
|
"bygdata/model/common/request"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ExaAttachmentCategorySearch struct {
|
type ExaAttachmentCategorySearch struct {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import "byg-backend/model/example"
|
import "bygdata/model/example"
|
||||||
|
|
||||||
type FilePathResponse struct {
|
type FilePathResponse struct {
|
||||||
FilePath string `json:"filePath"`
|
FilePath string `json:"filePath"`
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import "byg-backend/model/example"
|
import "bygdata/model/example"
|
||||||
|
|
||||||
type ExaCustomerResponse struct {
|
type ExaCustomerResponse struct {
|
||||||
Customer example.ExaCustomer `json:"customer"`
|
Customer example.ExaCustomer `json:"customer"`
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import "byg-backend/model/example"
|
import "bygdata/model/example"
|
||||||
|
|
||||||
type ExaFileResponse struct {
|
type ExaFileResponse struct {
|
||||||
File example.ExaFileUploadAndDownload `json:"file"`
|
File example.ExaFileUploadAndDownload `json:"file"`
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package request
|
package request
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"byg-backend/model/common/request"
|
"bygdata/model/common/request"
|
||||||
"byg-backend/model/system"
|
"bygdata/model/system"
|
||||||
)
|
)
|
||||||
|
|
||||||
// api分页条件查询及排序结构体
|
// 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