From 33b53869bd823e1d9978dc1f7ba48a161bac4179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Wed, 30 Apr 2025 15:40:19 +0800 Subject: [PATCH] =?UTF-8?q?:refactor:=20=E6=9B=B4=E6=96=B0=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E8=B7=AF=E5=BE=84=EF=BC=8C=E5=B0=86xybot=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E6=9B=B4=E6=94=B9=E4=B8=BAwechat-client/xybot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configs/config.dev.yaml | 6 +++--- go.mod | 6 +++--- go.sum | 6 ++---- internal/handler/api_login.go | 2 +- internal/handler/robot.go | 2 +- internal/tasks/contract.go | 4 ++-- internal/tasks/message.go | 2 +- internal/tasks/tasks.go | 2 +- pkg/message/emoticon.go | 2 +- pkg/message/handler.go | 2 +- pkg/message/media.go | 2 +- pkg/message/vioce.go | 2 +- 12 files changed, 18 insertions(+), 20 deletions(-) diff --git a/configs/config.dev.yaml b/configs/config.dev.yaml index bba612d..127e405 100644 --- a/configs/config.dev.yaml +++ b/configs/config.dev.yaml @@ -33,9 +33,9 @@ auth: adminToken: "admin-token-change-me" # 密码 tokenExpiry: 24 # 登录有效期(小时) logto: - endpoint: "" - appId: "" - appSecret: "" + endpoint: "https://logto.wjg95.cn/" + appId: "ib3tgt6nitenckuzuw1ck" + appSecret: "9iMwD6ndtGjh9bFg3ABVHYkj5ZGXdFZM" logger: level: "debug" diff --git a/go.mod b/go.mod index 430dfe4..ef84e46 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,10 @@ module gitee.ltd/lxh/wechat-robot go 1.24.0 require ( - gitee.ltd/lxh/xybot v0.0.6 + gitee.ltd/wechat-client/xybot v0.0.1 github.com/docker/docker v28.1.1+incompatible github.com/docker/go-connections v0.5.0 + github.com/fsnotify/fsnotify v1.9.0 github.com/go-co-op/gocron/v2 v2.16.1 github.com/goccy/go-json v0.10.5 github.com/gofiber/fiber/v2 v2.52.6 @@ -15,6 +16,7 @@ require ( github.com/google/uuid v1.6.0 github.com/logto-io/go/v2 v2.0.0 github.com/minio/minio-go/v7 v7.0.91 + github.com/redis/go-redis/v9 v9.7.3 github.com/spf13/viper v1.20.1 github.com/valyala/fasthttp v1.60.0 gorm.io/driver/mysql v1.5.7 @@ -36,7 +38,6 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/fasthttp/websocket v1.5.3 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/go-ini/ini v1.67.0 // indirect github.com/go-jose/go-jose/v4 v4.0.4 // indirect github.com/go-logr/logr v1.4.2 // indirect @@ -70,7 +71,6 @@ require ( github.com/opencontainers/image-spec v1.1.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/redis/go-redis/v9 v9.7.3 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect github.com/rs/xid v1.6.0 // indirect diff --git a/go.sum b/go.sum index 6d9ccc0..34e6d18 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,7 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -gitee.ltd/lxh/xybot v0.0.5 h1:kgwJktO/p7WbywUuAGTPH2V4VOta6dnYs1CXz6qVvZU= -gitee.ltd/lxh/xybot v0.0.5/go.mod h1:jYfEAQ3WPsST/PY4fEEVFjU6KtMocxn3sQi78I+vdxc= -gitee.ltd/lxh/xybot v0.0.6 h1:wgNz0gtA3rwQsdkDcgKS7tJZ33f96oxLbXSn+0wlfdY= -gitee.ltd/lxh/xybot v0.0.6/go.mod h1:jYfEAQ3WPsST/PY4fEEVFjU6KtMocxn3sQi78I+vdxc= +gitee.ltd/wechat-client/xybot v0.0.1 h1:aB1bzHLZkm8soierTsNsZ7h9WA1mx4bsYXNhrIAM0qg= +gitee.ltd/wechat-client/xybot v0.0.1/go.mod h1:YbAKeAvZqDe99hmwB/RXksrHl1ij5BvtSyVul7cak1E= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= diff --git a/internal/handler/api_login.go b/internal/handler/api_login.go index 85d2225..27e28f0 100644 --- a/internal/handler/api_login.go +++ b/internal/handler/api_login.go @@ -5,7 +5,7 @@ import ( "errors" "gitee.ltd/lxh/wechat-robot/internal/config" "gitee.ltd/lxh/wechat-robot/internal/tasks" - "gitee.ltd/lxh/xybot" + "gitee.ltd/wechat-client/xybot" "github.com/gofiber/fiber/v2/log" "strconv" "time" diff --git a/internal/handler/robot.go b/internal/handler/robot.go index 19898cd..61879fa 100644 --- a/internal/handler/robot.go +++ b/internal/handler/robot.go @@ -3,7 +3,7 @@ package handler import ( "context" "errors" - "gitee.ltd/lxh/xybot" + "gitee.ltd/wechat-client/xybot" "github.com/gofiber/fiber/v2/log" "strconv" "strings" diff --git a/internal/tasks/contract.go b/internal/tasks/contract.go index 4bd5054..32d729e 100644 --- a/internal/tasks/contract.go +++ b/internal/tasks/contract.go @@ -2,8 +2,8 @@ package tasks import ( "gitee.ltd/lxh/wechat-robot/internal/model" - "gitee.ltd/lxh/xybot" - "gitee.ltd/lxh/xybot/friend" + "gitee.ltd/wechat-client/xybot" + "gitee.ltd/wechat-client/xybot/friend" "github.com/gofiber/fiber/v2/log" "slices" "strings" diff --git a/internal/tasks/message.go b/internal/tasks/message.go index 7e943e2..000ab63 100644 --- a/internal/tasks/message.go +++ b/internal/tasks/message.go @@ -4,7 +4,7 @@ import ( "gitee.ltd/lxh/wechat-robot/internal/model" "gitee.ltd/lxh/wechat-robot/internal/types" messageHandler "gitee.ltd/lxh/wechat-robot/pkg/message" - "gitee.ltd/lxh/xybot" + "gitee.ltd/wechat-client/xybot" "strings" "time" ) diff --git a/internal/tasks/tasks.go b/internal/tasks/tasks.go index e0a61e7..9fffaa7 100644 --- a/internal/tasks/tasks.go +++ b/internal/tasks/tasks.go @@ -2,7 +2,7 @@ package tasks import ( "gitee.ltd/lxh/wechat-robot/internal/model" - "gitee.ltd/lxh/xybot" + "gitee.ltd/wechat-client/xybot" "github.com/go-co-op/gocron/v2" "github.com/gofiber/fiber/v2/log" "github.com/google/uuid" diff --git a/pkg/message/emoticon.go b/pkg/message/emoticon.go index 3ec9b84..54fe89b 100644 --- a/pkg/message/emoticon.go +++ b/pkg/message/emoticon.go @@ -6,7 +6,7 @@ import ( "gitee.ltd/lxh/wechat-robot/internal/model" "gitee.ltd/lxh/wechat-robot/internal/utils" "gitee.ltd/lxh/wechat-robot/internal/wechat" - "gitee.ltd/lxh/xybot" + "gitee.ltd/wechat-client/xybot" "github.com/gofiber/fiber/v2/log" "net/url" "slices" diff --git a/pkg/message/handler.go b/pkg/message/handler.go index 2cf58c7..8ed2bf7 100644 --- a/pkg/message/handler.go +++ b/pkg/message/handler.go @@ -3,7 +3,7 @@ package message import ( "gitee.ltd/lxh/wechat-robot/internal/model" "gitee.ltd/lxh/wechat-robot/internal/types" - "gitee.ltd/lxh/xybot" + "gitee.ltd/wechat-client/xybot" ) // Handler diff --git a/pkg/message/media.go b/pkg/message/media.go index 3a480d3..37b9e23 100644 --- a/pkg/message/media.go +++ b/pkg/message/media.go @@ -6,7 +6,7 @@ import ( "gitee.ltd/lxh/wechat-robot/internal/model" "gitee.ltd/lxh/wechat-robot/internal/types" "gitee.ltd/lxh/wechat-robot/internal/wechat" - "gitee.ltd/lxh/xybot" + "gitee.ltd/wechat-client/xybot" "github.com/gofiber/fiber/v2/log" ) diff --git a/pkg/message/vioce.go b/pkg/message/vioce.go index a743dd5..43ed65b 100644 --- a/pkg/message/vioce.go +++ b/pkg/message/vioce.go @@ -5,7 +5,7 @@ import ( "gitee.ltd/lxh/wechat-robot/internal/minio" "gitee.ltd/lxh/wechat-robot/internal/model" "gitee.ltd/lxh/wechat-robot/internal/wechat" - "gitee.ltd/lxh/xybot" + "gitee.ltd/wechat-client/xybot" "github.com/gofiber/fiber/v2/log" "strconv" )