Compare commits

...

171 Commits

Author SHA1 Message Date
ayflying
ba3c561c4c 服务增加不同架构的编译代码,区分windows与linux的相同方法进行交叉编译 2025-10-16 18:11:54 +08:00
27fed91922 替换值 2025-10-14 10:45:42 +08:00
19585af99f 新增onlyword字段设置 2025-10-14 10:45:23 +08:00
a752ef543c 正则修改 2025-10-13 11:00:04 +08:00
5614f678bd 替换转义字符 2025-10-11 16:07:27 +08:00
b10eaf5133 新增过滤字符 2025-10-11 16:02:14 +08:00
4c2435b14c 导出和记录属性的时候,替换特殊字符串 2025-10-11 10:07:52 +08:00
3d963e19e2 导出string类型错误修复 2025-10-09 11:22:09 +08:00
5148627d2d 新增一个导出相关的函数 2025-09-26 18:27:43 +08:00
da1e982ab5 新增日志传输存储类型 2025-09-26 17:34:01 +08:00
liaoyulong
5a12750f11 新增通用方法 2025-09-24 15:40:06 +08:00
ayflying
6139b4f722 修改更新文件 2025-09-22 10:21:38 +08:00
ayflying
9b85ae821a 支持查看ipv6了 2025-09-18 17:54:11 +08:00
ayflying
92e48bc613 ip库只配置ipv4 2025-09-18 11:18:28 +08:00
ayflying
0b6ec56511 更新依赖 2025-09-18 11:14:50 +08:00
ayflying
6f3555a14f 增加casdoor的接口 2025-09-18 11:04:27 +08:00
70a5b3db89 新增自定义时间记录 2025-09-17 17:40:31 +08:00
40bd9bb254 游戏日志方法封装 2025-09-12 18:47:14 +08:00
ayflying
4473003a36 荣耀消耗后打印更多日志 2025-09-10 12:15:25 +08:00
ayflying
e5e6068337 修改荣耀消耗使用ClientSecret 2025-09-09 15:56:46 +08:00
ayflying
1355634c22 返回荣耀消耗的错误类型 2025-09-09 14:51:26 +08:00
ayflying
2709af041b 新增写失败也会跳过,下次再执行 2025-09-03 14:37:05 +08:00
ayflying
33c8712c72 去掉更新日志 2025-09-03 13:46:39 +08:00
ayflying
26763c04e3 修改act持久化通道安全 2025-09-03 12:19:35 +08:00
ayflying
8c60a1f6c7 执行通道进入协程,预防拥堵 2025-09-03 11:14:32 +08:00
ayflying
62b0e429b3 如果检测到当前正在活跃,不删除缓存key 2025-09-03 10:02:34 +08:00
ayflying
e1f1bea0e7 增加有优雅的持久化管道,提高上传速度与抗打断机制 2025-09-02 18:16:55 +08:00
ayflying
299ba0b93e 补充漏掉更新统计 2025-09-02 17:08:37 +08:00
ayflying
c12c49477c 优化持久化因为活动太多造成的速度太慢 2025-09-02 16:51:41 +08:00
ayflying
b052754a30 删除多余的日志 2025-09-02 15:12:43 +08:00
ayflying
aa1dc0896d 修复计划任务打断造成协程内上下文执行停止的问题 2025-09-02 12:25:30 +08:00
ayflying
8210ac24db 去掉启动的缓存key 2025-09-02 10:14:01 +08:00
ayflying
cd3de96761 提高kv持久化安全性,按需删除用户缓存 2025-09-01 18:35:43 +08:00
ayflying
ce8ae4d26a 按照执行中的状态进行删除 2025-09-01 18:32:02 +08:00
ayflying
50cfc23ad2 计划任务修改,act与kv使用协程方式执行,不影响其他任务 2025-09-01 18:12:58 +08:00
ayflying
95539038c0 去掉无用配置 2025-08-28 21:43:24 +08:00
ayflying
4b08a9ce84 s3增加方法,允许查看文件的元数据 2025-08-28 18:35:01 +08:00
ayflying
6efdac7bab redis刷新列表,允许打断,防止过长的日志 2025-08-28 18:16:47 +08:00
ayflying
788cb2e6d4 持久化失败会提前结束任务进行抛错 2025-08-27 10:31:48 +08:00
ayflying
dd8c05b344 更新持久化act更新语法 2025-08-27 09:57:45 +08:00
ayflying
e781e132ed 保存计划任务调整 2025-08-22 17:50:37 +08:00
ayflying
862a6c8410 修改参数名 2025-08-22 14:31:57 +08:00
ayflying
42535d0023 修改描述,预防误导 2025-08-22 14:29:38 +08:00
ayflying
dd999cacf9 区分唯一计划任务,判断当前服务器是否关闭计划任务 2025-08-22 14:16:52 +08:00
ayflying
30d30bb8c6 增加唯一执行的参数 2025-08-22 12:04:26 +08:00
ayflying
f1c22dc9e6 执行持久化的计划任务,有一个打断机制 2025-08-22 11:46:24 +08:00
14cf759ce1 Merge branch 'fixmapsync' into 'master'
修一个map的并发

See merge request public_project/utility_go!2
2025-08-21 08:41:14 +00:00
19a19c1ff1 修一个map的并发 2025-08-21 16:39:47 +08:00
183d6d8b10 Merge branch 'bisdk' into 'master'
Bisdk

See merge request public_project/utility_go!1
2025-08-21 08:15:26 +00:00
d0cad61028 一些err接受问题 2025-08-21 16:09:10 +08:00
efb34e0c5b sdk和测试代码 2025-08-21 15:52:58 +08:00
liaoyulong
8190e9f6b7 批量导入elk后接收返回信息判断是否全部导入成功 2025-08-21 10:56:51 +08:00
ayflying
27435b57b7 修改缓存驱动,第二个参数支持选择不同的缓存配置 2025-08-21 10:30:43 +08:00
ayflying
0628882533 缓存key删除失败不报错 2025-08-20 15:13:01 +08:00
ayflying
f68655eee6 修改持久化act的异常报错 2025-08-14 14:11:26 +08:00
ayflying
d8491f0aba 修复ip库无法显示的问题 2025-08-07 11:17:04 +08:00
ayflying
999f1f6a84 完成华为支付的验单 2025-08-06 10:26:08 +08:00
ayflying
039acea0af 增加华为支付模块 2025-08-05 18:19:42 +08:00
ayflying
d54de73e11 增加虫虫助手支付 2025-07-31 19:11:19 +08:00
ayflying
61d69159ea 下载ip库地址修改 2025-07-29 12:23:08 +08:00
ayflying
fa659d87ae 调整oppo支付,不引用外部包 2025-07-29 11:19:43 +08:00
ayflying
ccc50a7dd0 荣耀支付增加验单 2025-07-29 10:51:42 +08:00
ayflying
d1a7ba8119 增加荣耀支付 2025-07-29 10:15:57 +08:00
ayflying
7c19a66cb5 修改vivo支付接口 2025-07-24 18:33:54 +08:00
ayflying
90b72129a5 增加vivo支付与登录接口 2025-07-23 17:37:17 +08:00
ayflying
58bea0c09a 晚上oppo支付回调与登录回调 2025-07-23 15:43:15 +08:00
ayflying
50fe34e1c1 增加s3文件重命名方法 2025-07-22 10:38:08 +08:00
ayflying
25c00d5072 gameact持久化保存区分跟新与添加 2025-07-21 19:20:46 +08:00
ayflying
ee32c8b83d 更新支持配置代理地址配置 2025-07-11 14:07:56 +08:00
ayflying
12a193fdee 增加oppo支付回调库 2025-07-09 11:01:38 +08:00
ayflying
ca55880beb 小米支付的回调结构体放入库 2025-07-09 10:58:27 +08:00
ayflying
ee9e399a81 分离小米支付与taptap支付到库里面 2025-07-08 16:30:44 +08:00
ayflying
ed9b0dd248 日志上传批量上传接口修改 2025-07-02 14:52:57 +08:00
ayflying
02edbdae8d 修改config模板的导入方法 2025-06-13 11:14:30 +08:00
ayflying
5e75094c16 s3使用自动模式 2025-06-11 19:11:50 +08:00
ayflying
140317e2df 判断s3服务器提供商 2025-06-11 12:17:01 +08:00
ayflying
8e2301eb34 为了兼容七牛云接口,s3强制使用路径风格 2025-06-11 11:02:21 +08:00
ayflying
c673da89cf taptap支付回调接口 2025-05-29 19:19:38 +08:00
ayflying
005cf11b2a 增加taptap支付 2025-05-29 11:25:06 +08:00
ayflying
8195d633a1 修改文件缓存的缓存文件清理 2025-05-23 10:38:26 +08:00
ayflying
4741a0bd93 增加file驱动 2025-05-22 18:11:26 +08:00
ayflying
f22c9df605 分离websocket模块 2025-05-20 10:43:10 +08:00
ayflying
82cffdfe29 没有配置数据库,不执行计划任务,预防报错 2025-05-19 11:31:39 +08:00
ayflying
9da1a3bf25 读取配置有问题 2025-05-14 17:52:41 +08:00
ayflying
2cb005e8ed 未读取到配置报错提示 2025-05-14 16:41:53 +08:00
ayflying
374fdac477 进行主机查找配置文件,最高5级目录 2025-05-14 16:22:07 +08:00
ayflying
595ababfde 更新路径拼接 2025-05-14 16:17:00 +08:00
ayflying
a62c359fd7 支持从当前目录返回上级目录进行配置读取 2025-05-14 16:13:49 +08:00
ayflying
b45242dfeb 修改名字预防歧义 2025-05-07 12:17:52 +08:00
ayflying
a2763676b1 修复excel转格式的错误 2025-04-30 10:48:42 +08:00
ayflying
bd64ef06a9 更新excel库 2025-04-30 10:27:07 +08:00
ayflying
abc1adb916 更新库,支持更好的excel 2025-04-29 18:21:18 +08:00
ayflying
9ca1c43409 Revert "修改act数据取出的时候进行泛型复制而不是转格式"
This reverts commit e9962f1b74.
2025-04-29 17:28:47 +08:00
ayflying
504836d165 绑定用户凭证 2025-04-29 10:16:25 +08:00
ayflying
e9962f1b74 修改act数据取出的时候进行泛型复制而不是转格式 2025-04-25 11:28:18 +08:00
ayflying
1153313384 修改计划任务的持久化,act与kv的缓存逻辑,预防多服务器重复持久化 2025-04-24 17:44:39 +08:00
ayflying
750d5c56ce 更新注释 2025-04-24 15:25:46 +08:00
ayflying
c24ac78b91 修改房间编号为string 2025-04-23 18:22:38 +08:00
ayflying
569937c67f 增加计划任务的打断机制 2025-04-22 12:15:53 +08:00
ayflying
d6bfe1c2fb 计划任务定时器修改,改为通道顺序执行 2025-04-22 11:15:51 +08:00
ayflying
16da554a60 完善weboscket的启动 2025-04-21 14:35:24 +08:00
ayflying
7f6635fb91 分离ip库的下载时机 2025-04-21 14:16:58 +08:00
ayflying
0605302db6 调整接口的逻辑 2025-04-18 18:36:50 +08:00
ayflying
5f2fe5dcb2 增加群组广播 2025-04-14 17:05:08 +08:00
ayflying
452aefe3d0 调整长连接库 2025-04-14 11:17:33 +08:00
ayflying
97bf7fc390 修改上传版本呢目录 2025-04-14 11:17:19 +08:00
ayflying
08f2b2d9bc 长连接接口增加玩家信息绑定 2025-04-10 15:42:08 +08:00
ayflying
366ddb45ea 修改导表工具,修改websocket协议的钩子 2025-04-09 16:50:54 +08:00
ayflying
09a9f14a29 修改ExcelTime2Time方法 2025-04-09 11:47:07 +08:00
ayflying
e0afb55bb2 随机算法小修改 2025-04-08 18:43:37 +08:00
ayflying
a469692358 修改随机方法 2025-04-02 16:20:03 +08:00
ayflying
bce7131d9f 开启qps 2025-04-02 15:55:43 +08:00
ayflying
a53f7b718d 修改目录 2025-04-02 15:53:05 +08:00
ayflying
75624ff0b7 使用boot统一注册执行代码 2025-04-02 15:49:42 +08:00
ayflying
743d232c38 增加单元测试,统一初始化方法 2025-04-02 15:19:49 +08:00
ayflying
1d0661ae40 增加缺少的库 2025-04-02 12:12:13 +08:00
ayflying
69e72283dc 更新 2025-04-02 11:51:25 +08:00
ayflying
a9d84c2db9 增加新的路由器 2025-04-02 11:43:05 +08:00
ayflying
db3a2bf405 增加缓存qps 2025-04-02 11:32:54 +08:00
ayflying
5e18d67747 修改ip库的内容 2025-03-31 18:30:41 +08:00
ayflying
8be47af097 更新说明 2025-03-31 18:04:43 +08:00
ayflying
4c24c4274c 定时器只允许启动一次 2025-03-31 14:57:04 +08:00
ayflying
2a34ce6043 更新g.redis方法的传参 2025-03-27 11:53:19 +08:00
ayflying
e8f94c911c 修稿红点删除缓存清理方式 2025-03-27 11:25:31 +08:00
ayflying
f55b3bc609 更新缓存模块 2025-03-27 11:20:07 +08:00
ayflying
d05d865b0d 去掉重复注册 2025-03-25 16:04:50 +08:00
ayflying
6e19671d06 增加控制器的反向注册 2025-03-25 15:58:20 +08:00
ayflying
f349dca0f7 所有包同意改为pkg 2025-03-25 15:00:54 +08:00
ayflying
58f00b4f8e 跟新mod 2025-03-25 14:24:56 +08:00
ayflying
d9ab1be2e7 更新pb目录 2025-03-25 14:14:48 +08:00
ayflying
4b77cd140d 初始化驱动 2025-03-25 14:06:03 +08:00
ayflying
8d640be472 增加websocket库 2025-03-24 17:39:09 +08:00
ayflying
cc08e830d3 分离websocket 2025-03-21 16:33:44 +08:00
ayflying
696f1bcbdb 导表支持忽略注释行 2025-03-20 16:22:28 +08:00
ayflying
5c45ddb80b 修改引用头部,不是用ctx 2025-03-19 17:41:23 +08:00
ayflying
14de836089 调整缓存key,增加kv持久化方法 2025-03-18 16:16:44 +08:00
ayflying
1c4f804738 修改持久化的顺序 2025-03-17 11:21:37 +08:00
ayflying
5fbe4d5dcf 更新库pkg 2025-03-14 14:26:07 +08:00
ayflying
4963780a32 修改删除结构体方法,支持传递多个数据进行删除 2025-03-13 16:25:28 +08:00
ayflying
70ebaae3d2 增加权重随机 2025-03-13 15:33:13 +08:00
ayflying
9cd286fd92 增加权重随机方法 2025-03-13 14:28:26 +08:00
ayflying
f8ec441241 修复缓存可能遇到的问题 2025-03-10 19:00:29 +08:00
ayflying
92a127e128 包名改回来 2025-03-06 14:38:03 +08:00
ayflying
f654e0feda 更新 2025-03-06 11:53:18 +08:00
ayflying
d44810e174 更新包名 2025-03-06 11:50:17 +08:00
ayflying
843cdc94d4 修改ci 2025-03-06 11:36:17 +08:00
ayflying
dd1d6ce2a6 增加ci文件 2025-03-06 11:16:41 +08:00
ayflying
1df0172acc 忽略目录 2025-03-05 17:27:54 +08:00
ayflying
1a3d79a605 去掉多余文件 2025-03-05 17:22:03 +08:00
ayflying
0e55698a47 使用统一方法pgk进行调用 2025-03-04 18:58:10 +08:00
ayflying
6eeb5a57cd 分离钉钉消息到通知管理 2025-03-04 17:24:10 +08:00
ayflying
6988e99717 修改说明文件 2025-03-04 16:03:19 +08:00
ayflying
754fd11ad2 自动生成支持新版 2025-03-04 14:49:26 +08:00
ayflying
4bd9d101c7 更新其他库 2025-03-04 14:32:00 +08:00
ayflying
eee58c8da8 更新excel版本库 2025-03-04 14:30:18 +08:00
ayflying
c281b4a30d 导表工具增加json格式 2025-03-04 14:10:32 +08:00
ayflying
74a746bc47 修改路径 2025-02-28 17:45:44 +08:00
ayflying
9f337df9de 计划任务延时启动 2025-02-28 15:12:20 +08:00
ayflying
45ffdc37fb 增加ip获取 2025-02-28 14:53:05 +08:00
ayflying
6765eff93f 增加埋点服务 2025-02-28 14:32:12 +08:00
ayflying
fab208c121 系统日志服务写入 2025-02-28 14:21:48 +08:00
ayflying
e45e8c7572 还原到标准service 2025-02-28 12:17:17 +08:00
ayflying
e9540d0971 活动模块,计划任务模块 加入第三方 2025-02-28 12:12:03 +08:00
ayflying
6d2b68a202 修改服务生成造成的错误 2025-02-26 18:14:42 +08:00
ayflying
144e2ffb25 修复配置切片的问题 2025-02-26 16:32:19 +08:00
乔焰阳
0a1c3c436e Create README.md 2025-02-26 16:11:14 +08:00
ayflying
8c6be6f487 make方法增加创建配置文件 2025-02-26 16:09:08 +08:00
ayflying
915d474fea 格式导表兼容冒号 2025-02-26 12:21:18 +08:00
ayflying
0cfaa799f5 时间传入不修改时区 2025-02-25 16:38:35 +08:00
ayflying
36a34891db 时间函数使用utc时间计算,预防切换夏令时bug 2025-02-25 15:19:42 +08:00
ayflying
4862dcd1d8 跟新结构体切片 2025-02-11 14:26:06 +08:00
216 changed files with 12332 additions and 926 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.idea/

36
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,36 @@
# This file is a template, and might need editing before it works on your project.
# You can copy and paste this template into a new `.gitlab-ci.yml` file.
# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.
#
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Go.gitlab-ci.yml
image: golang:latest
stages:
- test
# - build
# - deploy
format:
stage: test
script:
- go fmt $(go list ./... | grep -v /vendor/)
- go vet $(go list ./... | grep -v /vendor/)
- go test -race $(go list ./... | grep -v /vendor/)
#compile:
# stage: build
# script:
# - mkdir -p mybinaries
# - go build -o mybinaries main.go
# artifacts:
# paths:
# - build
#
#deploy:
# stage: deploy
# script: echo "Define your deployment script!"
# environment: production

8
.idea/.gitignore generated vendored
View File

@@ -1,8 +0,0 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="com.github.oldmegit.goframehelper.ui.goframehelperCache">
<option name="gf" value="true" />
</component>
</project>

8
.idea/modules.xml generated
View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/utility-go.iml" filepath="$PROJECT_DIR$/.idea/utility-go.iml" />
</modules>
</component>
</project>

9
.idea/utility-go.iml generated
View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml generated
View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

159
README.md Normal file
View File

@@ -0,0 +1,159 @@
# utility_go强大的Go语言工具类库
## 一、项目概述
`utility_go` 是一个功能丰富的Go语言工具类库旨在助力开发者更高效地开发Go应用程序。它提供了一系列实用的功能模块广泛涵盖数据库操作、缓存处理、支付接口集成、排名算法实现等多个方面适用于各类Go项目。
## 二、安装方式
要使用 `utility_go` 工具类库,可使用 `go get` 命令进行安装。请确保你的Go环境已正确配置且可访问互联网。
### 安装命令
```sh
go get github.com/ayflying/utility_go
```
### 安装验证
安装完成后你可以在Go代码中导入 `utility_go` 相关的包,检查是否能够正常使用。示例如下:
```go
package main
import (
// 这里导入utility_go中的某个具体包根据实际使用情况调整
"github.com/ayflying/utility_go/package/pay/apple"
)
func main() {
// 进行一些简单的操作,如打印版本信息等
// 这里假设apple包有一个Version函数
// fmt.Println(apple.Version())
}
```
## 三、项目结构
`utility_go` 的项目结构设计清晰,各模块分工明确,便于开发者使用和扩展。以下是项目的主要目录结构及说明:
### 主要目录说明
- **api/**存放与API相关的代码包含不同模块的API接口定义`admin``callback``system` 等。这些API接口用于处理各种外部请求是项目与外部系统交互的重要入口。
- **service/**:服务层代码,包含各种业务逻辑的实现,如 `game_act.go``ip_2_region.go` 等。服务层负责处理具体的业务需求,将数据处理和业务逻辑封装在独立的函数或方法中,提高代码的可维护性和复用性。
- **controller/**控制器层代码主要用于处理HTTP请求和响应。控制器接收客户端的请求调用相应的服务层方法进行处理并将处理结果返回给客户端。
- **internal/**:内部包,包含项目的核心业务逻辑,如 `game``logic``model` 等模块。其中,`model` 模块定义了项目中使用的数据模型,如数据库表对应的结构体;`logic` 模块实现了各种业务逻辑的处理函数。
- **package/**:包含各种功能包,提供了丰富的工具和功能,具体如下:
- **aycache**:缓存相关的功能包,提供了缓存操作的接口和实现,帮助开发者更方便地使用缓存技术,提高应用程序的性能。
- **elasticsearch**Elasticsearch相关的功能包用于与Elasticsearch搜索引擎进行交互实现数据的存储、检索和分析等功能。
- **excel**Excel处理相关的功能包提供了Excel文件的读写操作接口方便开发者处理Excel文件中的数据。
- **pay**:支付相关的功能包,包含了与各种支付平台的接口集成,如 `apple`(苹果支付)、`playstore`Google Play Store支付支持应用内购买等支付功能。
- **rand**:随机数相关的功能包,提供了生成各种随机数的函数,可用于测试、加密等场景。
- **rank**排名相关的功能包实现了各种排名算法如基于Redis的排行榜功能可用于游戏排名、活动排名等场景。
- **s3**S3存储相关的功能包用于与Amazon S3等云存储服务进行交互实现文件的上传、下载、删除等操作。
- **tools/**:工具类代码,包含了一些常用的工具函数,如 `redis.go`Redis操作相关`time.go`(时间处理相关)、`tools.go`(通用工具函数)等,方便开发者在项目中使用。
## 四、主要模块功能
### 4.1 pay/playstore
该模块主要用于与Google Play Store API交互处理应用内购买相关的操作提供以下主要功能
- **创建客户端**:通过 `New` 函数创建并返回一个包含访问 `androidpublisher` API所需凭证的HTTP客户端方便开发者与Google Play Store API进行通信。
- **使用自定义客户端**`NewWithClient` 函数允许开发者使用自定义的HTTP客户端创建并返回一个包含访问 `androidpublisher` API所需凭证的HTTP客户端增加了客户端的灵活性。
- **验证签名**`VerifySignature` 函数用于验证应用内购买的签名,确保支付信息的安全性和合法性。
### 4.2 s3
`s3` 模块主要用于与S3存储服务进行交互提供文件存储和管理的功能。其中`ListBuckets` 函数可以列出S3存储桶的信息方便开发者管理存储桶中的文件。
### 4.3 model
`model` 模块定义了项目中使用的数据模型,这些数据模型通常与数据库表相对应,用于数据的存储和操作。例如:
- **GameMailMass**:表示游戏邮件群发的数据模型,包含邮件的标题、内容、类型等信息。
- **GameBag**:表示游戏背包的数据模型,包含用户标识、道具数据、图鉴、手势等信息。
- **MemberSave**:(根据具体代码中的定义)可能表示用户会员信息的数据模型,用于存储用户的会员相关数据。
### 4.4 tools
`tools` 模块提供了一系列通用工具函数涵盖时间处理、Redis操作、道具数据处理等功能
- **时间处理**`time.go` 文件中的函数可以进行时间计算,如获取本周开始时间、计算两个时间间隔天数等。
- **Redis操作**`redis.go` 文件中的函数可以进行Redis的扫描操作支持批量获取大量数据。
- **通用工具**`tools.go` 文件中的函数提供了字符串处理、切片操作、道具数据合并等功能。
## 五、使用示例
### 5.1 支付模块示例
以下是一个使用 `pay/playstore` 模块验证应用内购买签名的示例代码:
```go
package main
import (
"fmt"
"github.com/ayflying/utility_go/package/pay/playstore"
)
func main() {
// 初始化参数
purchaseData := "your_purchase_data"
signature := "your_signature"
// 验证签名
err := playstore.VerifySignature(purchaseData, signature)
if err != nil {
fmt.Println("Signature verification failed:", err)
return
}
fmt.Println("Signature verification succeeded")
}
```
### 5.2 S3模块示例
以下是一个使用 `s3` 模块列出S3存储桶信息的示例代码
```go
package main
import (
"fmt"
"github.com/ayflying/utility_go/package/s3"
)
func main() {
// 列出S3存储桶信息
buckets, err := s3.ListBuckets()
if err != nil {
fmt.Println("Failed to list buckets:", err)
return
}
for _, bucket := range buckets {
fmt.Println("Bucket name:", bucket.Name)
}
}
```
### 5.3 工具模块示例
以下是一个使用 `tools` 模块处理道具数据的示例代码:
```go
package main
import (
"fmt"
"github.com/ayflying/utility_go/tools"
)
func main() {
// 字符串转道具类型
str := "1|10|2|20"
result := tools.Tools.Spilt2Item(str)
fmt.Println("Spilt2Item result:", result)
// 切片换道具类型
slice := []int64{1, 10, 2, 20}
res := tools.Tools.Slice2Item(slice)
fmt.Println("Slice2Item result:", res)
// 道具格式转map
list := tools.Tools.Items2Map(result)
fmt.Println("Items2Map result:", list)
}
```
## 六、注意事项
- **自动生成文件**项目中有部分代码文件是由GoFrame CLI工具生成并维护的这些文件通常会标注有 `// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.` 注释。请不要手动修改这些文件,以免造成不必要的问题。
- **版本兼容性**:在使用 `utility_go` 工具类库时请确保你的Go语言版本与工具类库的要求版本兼容。建议使用最新的Go语言版本以获得更好的性能和稳定性。
## 七、更新和维护
`utility_go` 工具类库会定期进行更新和维护以修复已知的问题、添加新的功能和优化性能。你可以关注项目的GitHub仓库https://github.com/ayflying/utility_go获取最新的更新信息。如果你在使用过程中遇到任何问题或有任何建议欢迎提交Issue或Pull Request。
## 八、许可证信息
`utility_go` 工具类库遵循MIT许可证你可以在项目的 `LICENSE` 文件中查看详细的许可证条款。请确保在使用该工具类库时遵守相关的许可证规定。

View File

@@ -1,29 +0,0 @@
package act
import (
"github.com/gogf/gf/v2/os/gtime"
)
type act struct {
}
type Sql struct {
UID uint64 `gorm:"primaryKey;comment:玩家编号"`
ActID int `gorm:"primaryKey;comment:活动编号"`
Action string `gorm:"type:text;comment:活动配置"`
UpdatedAt *gtime.Time `gorm:"index;comment:更新时间"`
}
func New() *act {
return &act{}
}
func (s *act) CreateTable(name string) {
//prefix := g.DB().GetPrefix()
//
//g.DB()
//g.DB().Exec(gctx.New())
}

View File

@@ -1,13 +0,0 @@
create table shiningu_game_act
(
uid bigint not null comment '玩家编号',
act_id int not null comment '活动编号',
action text null comment '活动配置',
updated_at datetime null comment '更新时间',
primary key (uid, act_id)
)
comment '玩家活动数据' charset = utf8mb4;
create index shiningu_game_act_uid_index
on shiningu_game_act (uid);

View File

@@ -1,19 +0,0 @@
package act
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
)
// 查询表格时候存在
func (s *act) TableExists(name string) bool {
Prefix := g.DB().GetPrefix()
get, err := g.DB().TableFields(gctx.New(), Prefix+name)
if err != nil {
g.Log().Error(gctx.New(), err)
}
if get != nil {
return true
}
return false
}

12
api/admin/v1/log.go Normal file
View File

@@ -0,0 +1,12 @@
package v1
import (
"github.com/ayflying/utility_go/internal/model/entity"
"github.com/gogf/gf/v2/frame/g"
)
type SystemLog struct {
entity.SystemLog
Data g.Map `json:"data" dc:"操作数据"`
//Post g.Map `json:"post" dc:"提交数据"`
}

15
api/callback/callback.go Normal file
View File

@@ -0,0 +1,15 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package callback
import (
"context"
"github.com/ayflying/utility_go/api/callback/v1"
)
type ICallbackV1 interface {
Ip(ctx context.Context, req *v1.IpReq) (res *v1.IpRes, err error)
}

20
api/callback/v1/ip.go Normal file
View File

@@ -0,0 +1,20 @@
package v1
import "github.com/gogf/gf/v2/frame/g"
type IpReq struct {
g.Meta `path:"/callback/ip/{ip}" tags:"回调响应" method:"get" summary:"获取ip"`
Ip string `json:"ip" dc:"ip"`
}
type IpRes struct {
g.Meta `mime:"application/json" example:"string"`
Address []string `json:"address" dc:"地区名"`
}
type Ip struct {
Country string `json:"country" dc:"国家"` //国家
Region string `json:"region" dc:"地区"` //地区
Province string `json:"province" dc:"省份"` //省份
City string `json:"city" dc:"城市"` //城市
District string `json:"district" dc:"区县"` //区县
}

237
api/pkg/v1/pkg.pb.go Normal file
View File

@@ -0,0 +1,237 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.20.0
// source: pkg/v1/pkg.proto
package v1
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 定义 NoticeType 枚举
type NoticeType int32
const (
NoticeType_DINGTALK NoticeType = 0
NoticeType_WECHAT NoticeType = 1
NoticeType_EMAIL NoticeType = 2
NoticeType_SMS NoticeType = 3
NoticeType_VOICE NoticeType = 4
)
// Enum value maps for NoticeType.
var (
NoticeType_name = map[int32]string{
0: "DINGTALK",
1: "WECHAT",
2: "EMAIL",
3: "SMS",
4: "VOICE",
}
NoticeType_value = map[string]int32{
"DINGTALK": 0,
"WECHAT": 1,
"EMAIL": 2,
"SMS": 3,
"VOICE": 4,
}
)
func (x NoticeType) Enum() *NoticeType {
p := new(NoticeType)
*p = x
return p
}
func (x NoticeType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (NoticeType) Descriptor() protoreflect.EnumDescriptor {
return file_pkg_v1_pkg_proto_enumTypes[0].Descriptor()
}
func (NoticeType) Type() protoreflect.EnumType {
return &file_pkg_v1_pkg_proto_enumTypes[0]
}
func (x NoticeType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use NoticeType.Descriptor instead.
func (NoticeType) EnumDescriptor() ([]byte, []int) {
return file_pkg_v1_pkg_proto_rawDescGZIP(), []int{0}
}
// 排行榜数据
type RankData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Score int64 `protobuf:"varint,2,opt,name=score,proto3" json:"score,omitempty"`
Rank int32 `protobuf:"varint,3,opt,name=rank,proto3" json:"rank,omitempty"`
UpdateTs int64 `protobuf:"varint,4,opt,name=update_ts,json=updateTs,proto3" json:"update_ts,omitempty"`
}
func (x *RankData) Reset() {
*x = RankData{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_v1_pkg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RankData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RankData) ProtoMessage() {}
func (x *RankData) ProtoReflect() protoreflect.Message {
mi := &file_pkg_v1_pkg_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RankData.ProtoReflect.Descriptor instead.
func (*RankData) Descriptor() ([]byte, []int) {
return file_pkg_v1_pkg_proto_rawDescGZIP(), []int{0}
}
func (x *RankData) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *RankData) GetScore() int64 {
if x != nil {
return x.Score
}
return 0
}
func (x *RankData) GetRank() int32 {
if x != nil {
return x.Rank
}
return 0
}
func (x *RankData) GetUpdateTs() int64 {
if x != nil {
return x.UpdateTs
}
return 0
}
var File_pkg_v1_pkg_proto protoreflect.FileDescriptor
var file_pkg_v1_pkg_proto_rawDesc = []byte{
0x0a, 0x10, 0x70, 0x6b, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6b, 0x67, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x22, 0x61, 0x0a, 0x08, 0x52,
0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x61, 0x6e,
0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x73, 0x18, 0x04,
0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x73, 0x2a, 0x45,
0x0a, 0x0a, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08,
0x44, 0x49, 0x4e, 0x47, 0x54, 0x41, 0x4c, 0x4b, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x57, 0x45,
0x43, 0x48, 0x41, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x41, 0x49, 0x4c, 0x10,
0x02, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x4d, 0x53, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x4f,
0x49, 0x43, 0x45, 0x10, 0x04, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x79, 0x66, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x2f, 0x75, 0x74, 0x69,
0x6c, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f,
0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_pkg_v1_pkg_proto_rawDescOnce sync.Once
file_pkg_v1_pkg_proto_rawDescData = file_pkg_v1_pkg_proto_rawDesc
)
func file_pkg_v1_pkg_proto_rawDescGZIP() []byte {
file_pkg_v1_pkg_proto_rawDescOnce.Do(func() {
file_pkg_v1_pkg_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_v1_pkg_proto_rawDescData)
})
return file_pkg_v1_pkg_proto_rawDescData
}
var file_pkg_v1_pkg_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_pkg_v1_pkg_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_pkg_v1_pkg_proto_goTypes = []interface{}{
(NoticeType)(0), // 0: package.NoticeType
(*RankData)(nil), // 1: package.RankData
}
var file_pkg_v1_pkg_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_pkg_v1_pkg_proto_init() }
func file_pkg_v1_pkg_proto_init() {
if File_pkg_v1_pkg_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pkg_v1_pkg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RankData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pkg_v1_pkg_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pkg_v1_pkg_proto_goTypes,
DependencyIndexes: file_pkg_v1_pkg_proto_depIdxs,
EnumInfos: file_pkg_v1_pkg_proto_enumTypes,
MessageInfos: file_pkg_v1_pkg_proto_msgTypes,
}.Build()
File_pkg_v1_pkg_proto = out.File
file_pkg_v1_pkg_proto_rawDesc = nil
file_pkg_v1_pkg_proto_goTypes = nil
file_pkg_v1_pkg_proto_depIdxs = nil
}

180
api/system/v1/cron.pb.go Normal file
View File

@@ -0,0 +1,180 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.20.0
// source: system/v1/cron.proto
package v1
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 定义 CronType 计划任务 枚举
type CronType int32
const (
CronType_UNKNOWN CronType = 0 // 未知类型
CronType_SECOND CronType = 1 // 每秒触发一次
CronType_MINUTE CronType = 2 // 每分钟触发一次
CronType_HOUR CronType = 3 // 每小时触发一次
CronType_DAILY CronType = 4 // 每天触发一次
CronType_WEEK CronType = 5 // 每周触发一次
CronType_MONTH CronType = 6 // 每月触发一次
CronType_YEAR CronType = 7 // 每年触发一次
CronType_MONDAY CronType = 8 // 每周一触发一次
CronType_TUESDAY CronType = 9 // 每周二触发一次
CronType_WEDNESDAY CronType = 10 // 每周三触发一次
CronType_THURSDAY CronType = 11 // 每周四触发一次
CronType_FRIDAY CronType = 12 // 每周五触发一次
CronType_SATURDAY CronType = 13 // 每周六触发一次
CronType_SUNDAY CronType = 14 // 每周日触发一次
)
// Enum value maps for CronType.
var (
CronType_name = map[int32]string{
0: "UNKNOWN",
1: "SECOND",
2: "MINUTE",
3: "HOUR",
4: "DAILY",
5: "WEEK",
6: "MONTH",
7: "YEAR",
8: "MONDAY",
9: "TUESDAY",
10: "WEDNESDAY",
11: "THURSDAY",
12: "FRIDAY",
13: "SATURDAY",
14: "SUNDAY",
}
CronType_value = map[string]int32{
"UNKNOWN": 0,
"SECOND": 1,
"MINUTE": 2,
"HOUR": 3,
"DAILY": 4,
"WEEK": 5,
"MONTH": 6,
"YEAR": 7,
"MONDAY": 8,
"TUESDAY": 9,
"WEDNESDAY": 10,
"THURSDAY": 11,
"FRIDAY": 12,
"SATURDAY": 13,
"SUNDAY": 14,
}
)
func (x CronType) Enum() *CronType {
p := new(CronType)
*p = x
return p
}
func (x CronType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CronType) Descriptor() protoreflect.EnumDescriptor {
return file_system_v1_cron_proto_enumTypes[0].Descriptor()
}
func (CronType) Type() protoreflect.EnumType {
return &file_system_v1_cron_proto_enumTypes[0]
}
func (x CronType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CronType.Descriptor instead.
func (CronType) EnumDescriptor() ([]byte, []int) {
return file_system_v1_cron_proto_rawDescGZIP(), []int{0}
}
var File_system_v1_cron_proto protoreflect.FileDescriptor
var file_system_v1_cron_proto_rawDesc = []byte{
0x0a, 0x14, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x72, 0x6f, 0x6e,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2a, 0xbf,
0x01, 0x0a, 0x08, 0x43, 0x72, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55,
0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x43, 0x4f,
0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x02,
0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x55, 0x52, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x41,
0x49, 0x4c, 0x59, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x45, 0x45, 0x4b, 0x10, 0x05, 0x12,
0x09, 0x0a, 0x05, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x59, 0x45,
0x41, 0x52, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x4f, 0x4e, 0x44, 0x41, 0x59, 0x10, 0x08,
0x12, 0x0b, 0x0a, 0x07, 0x54, 0x55, 0x45, 0x53, 0x44, 0x41, 0x59, 0x10, 0x09, 0x12, 0x0d, 0x0a,
0x09, 0x57, 0x45, 0x44, 0x4e, 0x45, 0x53, 0x44, 0x41, 0x59, 0x10, 0x0a, 0x12, 0x0c, 0x0a, 0x08,
0x54, 0x48, 0x55, 0x52, 0x53, 0x44, 0x41, 0x59, 0x10, 0x0b, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x52,
0x49, 0x44, 0x41, 0x59, 0x10, 0x0c, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x41, 0x54, 0x55, 0x52, 0x44,
0x41, 0x59, 0x10, 0x0d, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x55, 0x4e, 0x44, 0x41, 0x59, 0x10, 0x0e,
0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61,
0x79, 0x66, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x2f, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f,
0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_system_v1_cron_proto_rawDescOnce sync.Once
file_system_v1_cron_proto_rawDescData = file_system_v1_cron_proto_rawDesc
)
func file_system_v1_cron_proto_rawDescGZIP() []byte {
file_system_v1_cron_proto_rawDescOnce.Do(func() {
file_system_v1_cron_proto_rawDescData = protoimpl.X.CompressGZIP(file_system_v1_cron_proto_rawDescData)
})
return file_system_v1_cron_proto_rawDescData
}
var file_system_v1_cron_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_system_v1_cron_proto_goTypes = []interface{}{
(CronType)(0), // 0: system.CronType
}
var file_system_v1_cron_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_system_v1_cron_proto_init() }
func file_system_v1_cron_proto_init() {
if File_system_v1_cron_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_system_v1_cron_proto_rawDesc,
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_system_v1_cron_proto_goTypes,
DependencyIndexes: file_system_v1_cron_proto_depIdxs,
EnumInfos: file_system_v1_cron_proto_enumTypes,
}.Build()
File_system_v1_cron_proto = out.File
file_system_v1_cron_proto_rawDesc = nil
file_system_v1_cron_proto_goTypes = nil
file_system_v1_cron_proto_depIdxs = nil
}

15
aycache/aycache.go Normal file
View File

@@ -0,0 +1,15 @@
package aycache
import (
"github.com/ayflying/utility_go/pkg"
"github.com/gogf/gf/v2/os/gcache"
)
type Mod struct {
client *gcache.Cache
}
// Deprecated:弃用,改用 pkg.Cache()
func New(_name ...string) gcache.Adapter {
return pkg.Cache(_name...)
}

View File

@@ -1,32 +0,0 @@
package aycache
import (
"github.com/gogf/gf/v2/os/gcache"
)
type Mod struct {
client *gcache.Cache
}
//func NewV1(_name ...string) *cache.Mod {
// return pgk.Cache
//}
func New(_name ...string) gcache.Adapter {
var cacheAdapterObj gcache.Adapter
var name = "cache"
if len(_name) > 0 {
name = _name[0]
}
switch name {
case "cache":
cacheAdapterObj = NewAdapterMemory()
case "redis":
cacheAdapterObj = NewAdapterRedis()
}
//var client = gcache.New()
//client.SetAdapter(cacheAdapterObj)
return cacheAdapterObj
}

View File

@@ -1,118 +0,0 @@
package aycache
import (
"context"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/os/gcache"
"time"
)
type AdapterFile struct {
FilePath string
}
func (a AdapterFile) Set(ctx context.Context, key interface{}, value interface{}, duration time.Duration) error {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) SetMap(ctx context.Context, data map[interface{}]interface{}, duration time.Duration) error {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) SetIfNotExist(ctx context.Context, key interface{}, value interface{}, duration time.Duration) (ok bool, err error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) SetIfNotExistFunc(ctx context.Context, key interface{}, f gcache.Func, duration time.Duration) (ok bool, err error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) SetIfNotExistFuncLock(ctx context.Context, key interface{}, f gcache.Func, duration time.Duration) (ok bool, err error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) Get(ctx context.Context, key interface{}) (*gvar.Var, error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) GetOrSet(ctx context.Context, key interface{}, value interface{}, duration time.Duration) (result *gvar.Var, err error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) GetOrSetFunc(ctx context.Context, key interface{}, f gcache.Func, duration time.Duration) (result *gvar.Var, err error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) GetOrSetFuncLock(ctx context.Context, key interface{}, f gcache.Func, duration time.Duration) (result *gvar.Var, err error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) Contains(ctx context.Context, key interface{}) (bool, error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) Size(ctx context.Context) (size int, err error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) Data(ctx context.Context) (data map[interface{}]interface{}, err error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) Keys(ctx context.Context) (keys []interface{}, err error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) Values(ctx context.Context) (values []interface{}, err error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) Update(ctx context.Context, key interface{}, value interface{}) (oldValue *gvar.Var, exist bool, err error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) UpdateExpire(ctx context.Context, key interface{}, duration time.Duration) (oldDuration time.Duration, err error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) GetExpire(ctx context.Context, key interface{}) (time.Duration, error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) Remove(ctx context.Context, keys ...interface{}) (lastValue *gvar.Var, err error) {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) Clear(ctx context.Context) error {
//TODO implement me
panic("implement me")
}
func (a AdapterFile) Close(ctx context.Context) error {
//TODO implement me
panic("implement me")
}
func NewAdapterFile(filePath string) gcache.Adapter {
return &AdapterFile{
FilePath: filePath,
}
}

View File

@@ -1,18 +0,0 @@
package aycache
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gcache"
)
var adapterRedisClient gcache.Adapter
var adapterRedisCache = gcache.New()
func NewAdapterRedis() gcache.Adapter {
if adapterRedisClient == nil {
adapterRedisClient = gcache.NewAdapterRedis(g.Redis("default"))
adapterRedisCache.SetAdapter(adapterRedisClient)
}
return adapterRedisCache
}

32
cmd/load.go Normal file
View File

@@ -0,0 +1,32 @@
package cmd
import (
"github.com/ayflying/utility_go/controller/callback"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
func Load(s *ghttp.Server) {
//开启prometheus监控
s.Group("/metrics", func(group *ghttp.RouterGroup) {
group.Bind(
ghttp.WrapH(promhttp.Handler()),
)
})
}
// 注册游客方法
func RegistrationAnonymous(group *ghttp.RouterGroup) (res []interface{}) {
group.Bind(
callback.NewV1(),
)
return
}
// 注册用户方法
func RegistrationUser(group *ghttp.RouterGroup) (res []interface{}) {
group.Bind()
return
}

View File

@@ -24,8 +24,10 @@ var (
{Name: "id", Short: "i", Brief: "活动id"},
{Name: "name", Short: "n", Brief: "服务文件名"},
},
Examples: "make -m act -i 1: 创建活动1的接口与服务文件 \n" +
"make -m logic -n test: 创建test的服务文件",
Examples: "make -m act -i 1: 创建活动1的接口与服务文件 \n" +
"make -m logic -n test: 创建test的服务文件 \n" +
"make -m config -n test: 创建配置文件 \n" +
"make -m socket -n test: 创建socket文件 \n",
Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
//g.Dump(parser.GetOptAll(), parser.GetArgAll())
@@ -46,6 +48,18 @@ var (
return
}
err = this.Logic(name)
case "config":
var name = parser.GetOpt("name").String()
if name == "" {
return
}
err = this.Config(name)
case "socket":
var name = parser.GetOpt("name").String()
if name == "" {
return
}
err = this.Socket(name)
}
return
@@ -84,7 +98,7 @@ func (c *cMake) Logic(name string) (err error) {
//生成文件不覆盖
if !gfile.Exists(filePath) {
//fileStr := gfile.GetContents("./make/logic")
get, _ := fs.ReadFile(ConfigFiles, "make/act")
get, _ := fs.ReadFile(ConfigFiles, "make/logic")
fileStr := string(get)
fileStr = gstr.Replace(fileStr, "{package}", name)
fileStr = gstr.Replace(fileStr, "{name}", gstr.CaseCamel(name))
@@ -93,3 +107,41 @@ func (c *cMake) Logic(name string) (err error) {
return
}
func (c *cMake) Config(name string) (err error) {
var filePath = fmt.Sprintf("utility/config/%s.go", name)
//生成文件不覆盖
if !gfile.Exists(filePath) {
get, _ := fs.ReadFile(ConfigFiles, "make/config")
fileStr := string(get)
fileStr = gstr.Replace(fileStr, "{name}", gstr.CaseCamel(name))
fileStr = gstr.Replace(fileStr, "{cfg}", gstr.CaseCamel(name))
fileStr = gstr.Replace(fileStr, "{mod}", gstr.CaseCamelLower(name))
fileStr = gstr.Replace(fileStr, "{file}", name)
err = gfile.PutContents(filePath, fileStr)
}
return
}
func (c *cMake) Socket(name string) (err error) {
var filePath = fmt.Sprintf("internal/socket/%s/%s_new.go", name, gstr.CaseSnake(name))
//生成文件不覆盖
if !gfile.Exists(filePath) {
// 生成目录文件
get, _ := fs.ReadFile(ConfigFiles, "make/socket")
fileStr := string(get)
fileStr = gstr.Replace(fileStr, "{name}", name)
err = gfile.PutContents(filePath, fileStr)
//生成方法文件
var filePath2 = fmt.Sprintf("internal/socket/%s/%s.go", name, gstr.CaseSnake(name))
get, _ = fs.ReadFile(ConfigFiles, "make/socket2")
fileStr = string(get)
fileStr = gstr.Replace(fileStr, "{name}", name)
fileStr = gstr.Replace(fileStr, "{func}", gstr.CaseCamel(name))
err = gfile.PutContents(filePath2, fileStr)
}
return
}

View File

@@ -1,8 +1,7 @@
package act{id}
import (
"game_server/internal/service"
"github.com/gogf/gf/v2/os/gctx"
service2 "github.com/ayflying/utility_go/service"
)
type sAct{id} struct {
@@ -14,7 +13,7 @@ func New() *sAct{id} {
var (
ActId = {id}
ctx = gctx.New()
Name = ""
)
type Data struct {
@@ -25,7 +24,7 @@ func init() {
}
func (s *sAct{id}) GetData(uid int64) (data *Data) {
get, _ := service.GameAct().Info(uid, ActId)
get, _ := service2.GameAct().Info(uid, ActId)
get.Scan(&data)
if get.IsEmpty() || get.IsNil() || data == nil {
data = &Data{
@@ -35,5 +34,5 @@ func (s *sAct{id}) GetData(uid int64) (data *Data) {
}
func (s *sAct{id}) SetData(uid int64, data interface{}) {
service.GameAct().Set(uid, ActId, data)
service2.GameAct().Set(uid, ActId, data)
}

51
cmd/make/config Normal file
View File

@@ -0,0 +1,51 @@
package config
import (
"github.com/ayflying/utility_go/pkg"
"github.com/gogf/gf/v2/util/gutil"
"sync"
)
type {cfg}Cfg struct {
Id int32 `json:"id" dc:"编号"`
}
type {mod}Mod struct {
once sync.Once
lock sync.Mutex
cfgArr []*{cfg}Cfg
cfgMap map[int32]*{cfg}Cfg
}
var {name} = &{mod}Mod{}
func (c *{mod}Mod) Load(_cfg ...string) {
c.lock.Lock()
defer c.lock.Unlock()
c.cfgArr = make([]*{cfg}Cfg, 0)
data, err := pkg.Config().GetFile("{file}")
err = data.Scan(&c.cfgArr)
if err != nil {
panic(err)
}
c.cfgMap = make(map[int32]*{cfg}Cfg)
for _, v := range c.cfgArr {
c.cfgMap[v.Id] = v
}
}
func (c *{mod}Mod) List() []*{cfg}Cfg {
var list = make([]*{cfg}Cfg, len(c.cfgArr))
for k, v := range c.cfgArr {
list[k] = c.Get(v.Id)
}
return list
}
func (c *{mod}Mod) Get(id int32) *{cfg}Cfg {
if data, ok := c.cfgMap[id]; ok {
return gutil.Copy(data).(*{cfg}Cfg)
}
return nil
}

View File

@@ -9,7 +9,7 @@ type s{name} struct {
}
var (
ctx = gctx.New()
)
func New() *s{name} {

10
cmd/make/socket Normal file
View File

@@ -0,0 +1,10 @@
package {name}
type {name} struct {
}
func New() *{name} {
return &{name}{}
}
func init() {}

19
cmd/make/socket2 Normal file
View File

@@ -0,0 +1,19 @@
package {name}
import (
"github.com/ayflying/utility_go/pkg"
"github.com/ayflying/utility_go/pkg/websocket"
"google.golang.org/protobuf/proto"
)
func (s *{name}) {func}Handler(conn *websocket.WebsocketData, req any) (err error) {
var data = &v1.{func}2S{}
err = proto.Unmarshal(req.([]byte), data)
var res = &v1.{func}2C{}
resp, err := proto.Marshal(res)
pkg.Websocket().Send(000000, conn.Uid, resp)
return
}

267
cmd/middleware.go Normal file
View File

@@ -0,0 +1,267 @@
package cmd
import (
"github.com/ayflying/utility_go/service"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/text/gstr"
)
//func MiddlewareAnonymous(r *ghttp.Request) {
// // 中间件处理逻辑
// r.Response.CORSDefault()
//
// ip := r.GetClientIp()
// r.SetCtxVar("ip", ip)
//
// //各种回调的日志返回
// //get, _ := r.GetJson()
// get := r.GetRequestMapStrStr()
// delete(get, "r")
// delete(get, "s")
// delete(get, "t")
// delete(get, "data")
// getJson, _ := gjson.EncodeString(get)
// g.Log("cmd").Debugf(r.GetCtx(), "from|%v|%v|%v", 0, r.RequestURI, getJson)
//
// r.Middleware.Next()
//
// //中间件后置
// err := r.GetError()
// if err != nil {
// code, err2 := strconv.Atoi(err.Error())
// if err2 != nil {
// return
// }
// if _, ok := consts.ErrCodeList[code]; ok {
// //g.Dump("===error:", gerror.Code(r.GetError()).Code())
// msg := g.Map{
// "code": code,
// "message": consts.ErrCodeList[code],
// //"data": r.GetHandlerResponse(),
// }
// r.Response.WriteJson(msg)
// //错误码置空
// r.SetError(nil)
// //g.Log("cmd").Debugf(r.GetCtx(), "to|%v|%v|%v", uid, r.RequestURI, msg)
// return
// }
// }
//
// //回复
// res, _ := gjson.EncodeString(r.GetHandlerResponse())
// g.Log("cmd").Debugf(r.GetCtx(), "to|%v|%v|%v", 0, r.RequestURI, res)
//}
func MiddlewareAdmin(r *ghttp.Request) {
// 中间件处理逻辑
r.Response.CORSDefault()
ip := r.GetClientIp()
r.SetCtxVar("ip", ip)
getUid := r.Cookie.Get("uid")
if getUid == nil {
//调试模式允许不验证用户名
debug, _ := g.Cfg().GetWithEnv(nil, "debug")
if !debug.Bool() {
msg := g.Map{
"code": 403,
"message": "登录失败",
//"data": r.GetHandlerResponse(),
}
//r.SetError(http.Error(r,"403",http.StatusForbidden))
r.Response.WriteJson(msg)
gerror.NewCode(gcode.CodeNil, "登录失败")
return
}
}
uid := getUid.Int()
//获取所有请求的信息
get := r.GetRequestMapStrStr()
if _, ok := get["uid"]; ok {
r.SetCtxVar("uid", get["uid"])
}
r.Middleware.Next()
//后置所有post都写入日志
if r.Method == "POST" {
//黑名单列表
LogUrl := []string{
"/system/chatgpt",
}
if !gstr.InArray(LogUrl, r.RequestURI) {
//写入日志
service.SystemLog().AddLog(uid, r.RequestURI, ip, r.GetFormMap())
}
} else {
//需要写入的get
LogUrl := []string{
"/admin/config/mall/del",
"/admin/config/shop/del",
"/admin/group/del",
"/admin/user/del",
"/admin/community/posts/del",
"/admin/community/posts/limit",
"/admin/community/posts/limit/del",
"/admin/community/reply/del",
"/admin/community/recommend",
}
for _, item := range LogUrl {
if item == r.RequestURI {
service.SystemLog().AddLog(uid, r.RequestURI, ip, r.GetFormMap())
}
}
}
}
//// 中间件
//func Middleware(r *ghttp.Request) {
// // 中间件处理逻辑
// r.Response.CORSDefault()
//
// //获取玩家的guid
// guid := r.Header.Get("guid")
//
// //获取所有请求的信息
// get := r.GetRequestMapStrStr()
//
// //cacheKey := fmt.Sprintf("sign:%s", guid)
//
// ////进入debug模式
// //debugBool := g.Cfg().MustGetWithCmd(nil, "debug")
// ////如果收到签名,开始验证签名
// //if sign, _ := get["s"]; !debugBool.Bool() && sign != "" {
// //
// // //如果连续两次使用相同sign直接抛出
// // getSign, _ := aycache.New().Get(nil, cacheKey)
// // if getSign.String() == sign {
// // //中间件授权错误
// // msg := g.Map{
// // "code": 11000,
// // "message": consts.ErrCodeList[11000],
// // }
// // r.Response.WriteJson(msg)
// // return
// // }
// // aycache.New().Set(nil, cacheKey, sign, time.Minute*10)
// //
// // secretKey := "asdkjqwhiasdoplmwofjk/aws"
// // nonce := get["r"]
// // timestamp := get["t"]
// //
// // message := timestamp + nonce
// //
// // timeUnix := time.Now().Unix() - gconv.Int64(timestamp)
// // if timeUnix > 600 || timeUnix < -600 {
// // //中间件授权错误
// // msg := g.Map{
// // "code": 11000,
// // "message": consts.ErrCodeList[11000],
// // }
// // r.Response.WriteJson(msg)
// // return
// // }
// //
// // // 创建 HMAC 对象
// // h := hmac.New(sha256.New, []byte(secretKey))
// //
// // // 更新 HMAC 对象的数据
// // h.Write([]byte(message))
// //
// // // 获取 HMAC 的十六进制表示
// // signature := hex.EncodeToString(h.Sum(nil))
// //
// // //如果加密算法不一致
// // if signature != sign {
// // //中间件授权错误
// // msg := g.Map{
// // "code": 11000,
// // "message": consts.ErrCodeList[11000],
// // }
// // r.Response.WriteJson(msg)
// // return
// // }
// //}
//
// uid, _ := service.MemberUser().Guid2uid(guid)
// if uid == 0 {
// //中间件授权错误
// msg := g.Map{
// "code": 11000,
// "message": consts.ErrCodeList[11000],
// //"data": r.GetHandlerResponse(),
// }
// r.Response.WriteJson(msg)
//
// return
// }
// r.SetCtxVar("guid", guid)
// r.SetCtxVar("uid", uid)
//
// ip := r.GetClientIp()
// r.SetCtxVar("ip", ip)
//
// delete(get, "r")
// delete(get, "s")
// delete(get, "t")
// delete(get, "data")
// //前置输出服务器收到信息
// getJson, _ := gjson.EncodeString(get)
// //后置输出服务器返回信息
// if r.GetCtxVar("not_log").IsEmpty() {
// g.Log("cmd").Debugf(r.GetCtx(), "from|%v|%v|%v", uid, r.RequestURI, getJson)
// }
//
// //运行开始时间
// RunStartTime := gtime.Now()
//
// //proto.Marshal()
//
// //中间件核心
// r.Middleware.Next()
//
// //返回运行时
// if getTime := gtime.Now().Sub(RunStartTime); getTime > time.Millisecond*1000 {
// g.Log().Debugf(nil, "当前运行时间:%v,uid=%d,url=%s", getTime, uid, r.RequestURI)
// }
//
// //中间件后置
// err := r.GetError()
// if err != nil {
// code, err2 := strconv.Atoi(err.Error())
// if err2 != nil {
// return
// }
// if _, ok := consts.ErrCodeList[code]; ok {
// //g.Dump("===error:", gerror.Code(r.GetError()).Code())
// msg := g.Map{
// "code": code,
// "message": consts.ErrCodeList[code],
// //"data": r.GetHandlerResponse(),
// }
// msgJson, _ := gjson.EncodeString(msg)
// r.Response.WriteJson(msgJson)
// //错误码置空
// r.SetError(nil)
// g.Log("cmd").Debugf(r.GetCtx(), "to|%v|%v|%v", uid, r.RequestURI, msg)
// return
// }
// }
//
// //后置输出服务器返回信息
// if r.GetCtxVar("not_log").IsEmpty() {
// res, _ := gjson.EncodeString(r.GetHandlerResponse())
// g.Log("cmd").Debugf(r.GetCtx(), "to|%v|%v|%v", uid, r.RequestURI, res)
// }
//
//}

View File

@@ -2,14 +2,16 @@ package cmd
import (
"context"
"github.com/ayflying/utility_go/s3"
"os"
"path"
"time"
"github.com/ayflying/utility_go/pkg"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gcfg"
"github.com/gogf/gf/v2/os/gcmd"
"github.com/gogf/gf/v2/os/gctx"
"os"
"time"
)
type serverCfg struct {
@@ -17,6 +19,8 @@ type serverCfg struct {
Address string `json:"address" dc:"服务地址"`
Prod bool `json:"prod" dc:"是否生产环境"`
S3 string `json:"s3" dc:"使用哪个对象储存中转"`
Arch string `json:"arch" dc:"架构"`
System string `json:"system" dc:"系统"`
}
type UpdateReq struct {
@@ -24,8 +28,6 @@ type UpdateReq struct {
FileUrl string `json:"file_url" dc:"文件地址"`
}
var s3Mod *s3.Mod
var (
Update = gcmd.Command{
Name: "update",
@@ -36,9 +38,14 @@ var (
g.Log().Info(ctx, "准备上传更新文件")
//加载编辑配置文件
g.Cfg("hack").GetAdapter().(*gcfg.AdapterFile).SetFileName("hack/config.yaml")
//获取文件名
getFileName, err := g.Cfg("hack").Get(ctx, "gfcli.build.name")
Filename := getFileName.String()
//获取版本号
getVersion, err := g.Cfg("hack").Get(ctx, "gfcli.build.version")
Version := getVersion.String()
var list []*serverCfg
serverList := g.Cfg().MustGet(ctx, "server_list")
serverList.Scan(&list)
@@ -59,7 +66,9 @@ var (
g.Dump("需要更新的服务器", list)
//获取上传链接
var url = make(map[string]string)
filename := "linux_amd64/" + Filename
var system = make(map[string]string)
//filename := "linux_amd64/" + Filename
//filename := path.Join(Version, "linux_amd64", Filename)
client := g.Client()
client.SetTimeout(time.Minute)
@@ -73,24 +82,38 @@ var (
}
//查询当前上传地址是否存在
if _, ok := url[v.S3]; !ok {
_, ok2 := system[v.System+v.Arch]
if _, ok := url[v.S3]; !ok || !ok2 {
var systemName = "linux_amd64"
if v.Arch != "" && v.System != "" {
systemName = v.System + "_" + v.Arch
}
var filename = path.Join(Version, systemName, Filename)
g.Log().Debugf(ctx, "当前上传文件:"+filename)
url[v.S3], err = UploadS3(v.S3, filename)
if err != nil {
g.Log().Error(ctx, err)
return
}
}
system[v.System+v.Arch] = filename
if err != nil {
g.Log().Error(ctx, err)
return
}
}
g.Log().Debugf(ctx, "准备同步服务器:%v,url=%v", v.Name, address+"/callback/update")
get, err := client.Post(ctx, address+"/callback/update", &UpdateReq{
FileUrl: url[v.S3],
})
if err != nil {
Proxy := g.Cfg().MustGet(ctx, "update_proxy", "http://192.168.50.170:10808").String()
g.Log().Debugf(ctx, "切换代理进行上传:err=%v", err)
get, err = client.Proxy("http://192.168.50.114:10808").
Post(ctx, address+"/callback/update", &UpdateReq{
FileUrl: url[v.S3],
})
get, err = client.Proxy(Proxy).Post(ctx, address+"/callback/update", &UpdateReq{
FileUrl: url[v.S3],
})
}
if err != nil {
g.Log().Error(ctx, err)
@@ -107,9 +130,13 @@ var (
func UploadS3(typ string, filename string) (res string, err error) {
//updateServerS3Name, _ := g.Config().Get(ctx, "update_server_s3_name")
s3Mod = s3.New(typ)
var s3Mod = pkg.S3(typ)
bucketName := s3Mod.GetCfg().BucketName
obj, err := os.Open(filename)
if err != nil {
return
}
defer obj.Close()
ff, err := obj.Stat()
_, err = s3Mod.PutObject(obj, filename, bucketName, ff.Size())
if err != nil {

View File

@@ -1,17 +1,11 @@
package config
import (
"fmt"
"github.com/apolloconfig/agollo/v4"
apolloConfig "github.com/apolloconfig/agollo/v4/env/config"
"github.com/apolloconfig/agollo/v4/storage"
"github.com/ayflying/utility_go/pkg"
"github.com/gogf/gf/contrib/config/apollo/v2"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gres"
"github.com/gogf/gf/v2/text/gstr"
"sync"
)
@@ -31,137 +25,28 @@ type Cfg struct {
Lock sync.Mutex
}
// Deprecated : pkg.Config().GetDbFile(name)
func (c *Cfg) GetDbFile(name string) (res *g.Var, err error) {
get2, err := g.Model("game_config").
Where("name", name).Master().Value("data")
err = get2.Scan(&res)
if res == nil {
res = &gvar.Var{}
}
res, err = pkg.Config().GetDbFile(name)
return
}
// Deprecated : pkg.Config().GetFile(name, obj...)
func (c *Cfg) GetFile(filename string, obj ...Load) (jsonObj *gjson.Json, err error) {
pathStr := "manifest/game/"
filePath := pathStr + filename + ".json"
//err := gres.Load(pathStr + filename)
//载入静态资源到文件对象
err = gres.Load(filePath)
var bytes []byte
if gfile.IsFile(filePath) {
bytes = gfile.GetBytes(filePath)
} else {
bytes = gres.GetContent(filePath)
}
jsonObj, err = gjson.DecodeToJson(bytes)
//g.Dump(filePath, jsonObj)
jsonObj, err = pkg.Config().GetFile(filename)
return
}
// getUrlFile 获取远程配置
// Deprecated : pkg.Config().GetUrlFile(name)
func (c *Cfg) GetUrlFile(name string) (jsonObj *gjson.Json, err error) {
urlStr := fmt.Sprintf("http://sdf.sdfs.sdf/%s.json", name)
getUrl, err := g.Client().Discovery(nil).Get(nil, urlStr)
bytes := getUrl.ReadAll()
jsonObj, err = gjson.DecodeToJson(bytes)
jsonObj, err = pkg.Config().GetUrlFile(name)
return
}
// 获取阿波罗
//func (c *Cfg) GetApollo(name string, obj Load) (jsonObj *gjson.Json, err error) {
// jsonObj, err = c.GetApolloV2(name, obj)
// return
//
// //c.Lock.Lock()
// //defer c.Lock.Unlock()
// //
// //Item2Obj[name+".json"] = obj
// //var cfg = apolloConfig.AppConfig{
// // AppID: ApolloCfg.AppID,
// // Cluster: ApolloCfg.Cluster,
// // IP: ApolloCfg.IP,
// // NamespaceName: name + ".json",
// // Secret: ApolloCfg.Secret,
// // IsBackupConfig: ApolloCfg.IsBackupConfig,
// // BackupConfigPath: ApolloCfg.BackupConfigPath,
// // SyncServerTimeout: 60,
// // MustStart: true,
// //}
// ////cfg.NamespaceName = name + ".json"
// //
// //client, err := agollo.StartWithConfig(func() (*apolloConfig.AppConfig, error) {
// // return ApolloCfg, nil
// //})
// //if client == nil {
// // return
// //}
// //var getStr string
// //var getApollo *storage.Config
// //for range 5 {
// // getApollo = client.GetConfig(cfg.NamespaceName)
// // if getApollo != nil {
// // break
// // }
// // time.Sleep(time.Second * 5)
// //}
// //
// //if getApollo != nil {
// // getStr = getApollo.GetValue("content")
// // if getStr != "" {
// // //写入配置
// // gfile.PutContents(path.Join("manifest", "game", name+".json"), getStr)
// // }
// //} else {
// // jsonObj, err = c.GetFile(name)
// //}
// //jsonObj, err = gjson.DecodeToJson(getStr)
// ////首次运行加入监听器
// //if !gstr.InArray(ApolloListener, name) {
// // c2 := &CustomChangeListener{}
// // client.AddChangeListener(c2)
// // ApolloListener = append(ApolloListener, name)
// //}
// //return
//}
// Deprecated : pkg.Config().GetApollo(name, obj)
func (c *Cfg) GetApollo(name string, obj Load) (jsonObj *gjson.Json, err error) {
Item2Obj[name+".json"] = obj
// 接入阿波罗配置
ApolloCfg.NamespaceName = name + ".json"
adapter, err := apollo.New(nil, *ApolloCfg)
if err != nil {
g.Log().Fatalf(nil, `%+v`, err)
}
// Change the adapter of default configuration instance.
g.Cfg(name).SetAdapter(adapter)
//首次运行加入监听器
if !gstr.InArray(ApolloListener, name+".json") {
//放置监听器
client, _ := agollo.StartWithConfig(func() (*apolloConfig.AppConfig, error) {
return &apolloConfig.AppConfig{
AppID: ApolloCfg.AppID,
Cluster: ApolloCfg.Cluster,
NamespaceName: ApolloCfg.NamespaceName,
IP: ApolloCfg.IP,
IsBackupConfig: ApolloCfg.IsBackupConfig,
BackupConfigPath: ApolloCfg.BackupConfigPath,
Secret: ApolloCfg.Secret,
SyncServerTimeout: ApolloCfg.SyncServerTimeout,
MustStart: ApolloCfg.MustStart,
}, nil
})
c2 := &CustomChangeListener{}
client.AddChangeListener(c2)
ApolloListener = append(ApolloListener, name+".json")
}
cfg, err := g.Cfg(name).Get(nil, "content")
cfg.Scan(&jsonObj)
jsonObj, err = pkg.Config().GetApollo(name, obj)
return
}

View File

@@ -0,0 +1,5 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package callback

View File

@@ -0,0 +1,15 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package callback
import (
"github.com/ayflying/utility_go/api/callback"
)
type ControllerV1 struct{}
func NewV1() callback.ICallbackV1 {
return &ControllerV1{}
}

View File

@@ -0,0 +1,14 @@
package callback
import (
"context"
"github.com/ayflying/utility_go/service"
"github.com/ayflying/utility_go/api/callback/v1"
)
func (c *ControllerV1) Ip(ctx context.Context, req *v1.IpReq) (res *v1.IpRes, err error) {
res = &v1.IpRes{}
res.Address = service.Ip2Region().GetIp(req.Ip)
return
}

View File

@@ -0,0 +1,83 @@
package elasticsearch
import (
"github.com/elastic/go-elasticsearch/v8"
)
var (
es *elasticsearch.TypedClient
)
type elastic struct {
client *elasticsearch.TypedClient
}
//func (d *Driver) Insert(ctx context.Context, table string, data interface{}, batch ...int) (res sql.Result, err error) {
//
// return
//}
//
//// createIndex 创建索引
//func (d *Driver) CreateIndex(name string) {
//
// resp, err := d.client.Indices.
// Create(name).
// Do(context.Background())
// if err != nil {
// fmt.Printf("create index failed, err:%v\n", err)
// return
// }
// fmt.Printf("index:%#v\n", resp.Index)
//}
//
//// indexDocument 索引文档
//func (d *Driver) IndexDocument(name string, key string, data interface{}) {
//
// // 添加文档
// resp, err := d.client.Index(name).
// Id(key).
// Document(data).
// Do(context.Background())
// if err != nil {
// fmt.Printf("indexing document failed, err:%v\n", err)
// return
// }
// fmt.Printf("result:%#v\n", resp.Result)
//}
//
//// getDocument 获取文档
//func (d *Driver) Get(name string, id string) (res json.RawMessage) {
// resp, err := d.client.Get(name, id).
// Do(context.Background())
// if err != nil {
// fmt.Printf("get document by id failed, err:%v\n", err)
// return
// }
// fmt.Printf("fileds:%d\n", resp.Source_)
// res = resp.Source_
// return
//}
//
//// updateDocument 更新文档
//func (d *Driver) UpdateDocument(name string, key string, data interface{}) {
//
// resp, err := d.client.Update(name, key).
// Doc(data). // 使用结构体变量更新
// Do(context.Background())
// if err != nil {
// fmt.Printf("update document failed, err:%v\n", err)
// return
// }
// fmt.Printf("result:%v\n", resp.Result)
//}
//
//// deleteDocument 删除 document
//func (d *Driver) DeleteDocument(name string, key string) {
// resp, err := d.client.Delete(name, key).
// Do(context.Background())
// if err != nil {
// fmt.Printf("delete document failed, err:%v\n", err)
// return
// }
// fmt.Printf("result:%v\n", resp.Result)
//}

View File

@@ -0,0 +1,39 @@
package elasticsearch
import (
"database/sql"
"github.com/elastic/go-elasticsearch/v8"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
)
func (d *Driver) Open(config *gdb.ConfigNode) (db *sql.DB, err error) {
var (
source string
underlyingDriverName = "elasticsearch"
)
source = config.Host
cfg := elasticsearch.Config{
Addresses: []string{
config.Host,
},
}
es, err = elasticsearch.NewTypedClient(cfg)
//if err != nil {
// fmt.Printf("elasticsearch.NewTypedClient failed, err:%v\n", err)
// return
//}
if db, err = sql.Open(underlyingDriverName, source); err != nil {
err = gerror.WrapCodef(
gcode.CodeDbOperationError, err,
`sql.Open failed for driver "%s" by source "%s"`, underlyingDriverName, source,
)
return nil, err
}
return
}

View File

@@ -0,0 +1,51 @@
package elasticsearch
import (
"github.com/ayflying/utility_go/internal/boot"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
)
// Driver is the driver for mysql database.
type Driver struct {
*gdb.Core
}
const (
quoteChar = "`"
)
func init() {
boot.AddFunc(func() {
var (
err error
driverObj = New()
driverNames = g.SliceStr{"es", "elasticsearch"}
)
for _, driverName := range driverNames {
if err = gdb.Register(driverName, driverObj); err != nil {
panic(err)
}
}
})
}
// New create and returns a driver that implements gdb.Driver, which supports operations for MySQL.
func New() gdb.Driver {
return &Driver{}
}
// New creates and returns a database object for mysql.
// It implements the interface of gdb.Driver for extra database driver installation.
func (d *Driver) New(core *gdb.Core, node *gdb.ConfigNode) (res gdb.DB, err error) {
res = &Driver{
Core: core,
}
return
}
// GetChars returns the security char for this type of database.
func (d *Driver) GetChars() (charLeft string, charRight string) {
return quoteChar, quoteChar
}

56
drivers/db/found/found.go Normal file
View File

@@ -0,0 +1,56 @@
package found
import (
"database/sql"
"github.com/ayflying/utility_go/internal/boot"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
)
// Driver is the driver for mysql database.
type Driver struct {
*gdb.Core
}
func (d *Driver) Open(config *gdb.ConfigNode) (*sql.DB, error) {
//TODO implement me
panic("implement me")
}
const (
quoteChar = "`"
)
func init() {
boot.AddFunc(func() {
var (
err error
driverObj = New()
driverNames = g.SliceStr{"es", "found"}
)
for _, driverName := range driverNames {
if err = gdb.Register(driverName, driverObj); err != nil {
panic(err)
}
}
})
}
// New create and returns a driver that implements gdb.Driver, which supports operations for MySQL.
func New() gdb.Driver {
return &Driver{}
}
// New creates and returns a database object for mysql.
// It implements the interface of gdb.Driver for extra database driver installation.
func (d *Driver) New(core *gdb.Core, node *gdb.ConfigNode) (res gdb.DB, err error) {
res = &Driver{
Core: core,
}
return
}
// GetChars returns the security char for this type of database.
func (d *Driver) GetChars() (charLeft string, charRight string) {
return quoteChar, quoteChar
}

View File

@@ -1,101 +0,0 @@
package elasticsearch
import (
"context"
"encoding/json"
"fmt"
"github.com/elastic/go-elasticsearch/v8"
)
var (
es *elasticsearch.TypedClient
)
type elastic struct {
client *elasticsearch.TypedClient
}
func New(name ...string) *elastic {
// ES 配置
cfg := elasticsearch.Config{
Addresses: []string{
"http://ay.cname.com:9200",
},
}
if es == nil {
var err error
es, err = elasticsearch.NewTypedClient(cfg)
if err != nil {
fmt.Printf("elasticsearch.NewTypedClient failed, err:%v\n", err)
return &elastic{}
}
}
return &elastic{
client: es,
}
}
// createIndex 创建索引
func (s *elastic) CreateIndex(name string) {
resp, err := s.client.Indices.
Create(name).
Do(context.Background())
if err != nil {
fmt.Printf("create index failed, err:%v\n", err)
return
}
fmt.Printf("index:%#v\n", resp.Index)
}
// indexDocument 索引文档
func (s *elastic) IndexDocument(name string, key string, data interface{}) {
// 添加文档
resp, err := s.client.Index(name).
Id(key).
Document(data).
Do(context.Background())
if err != nil {
fmt.Printf("indexing document failed, err:%v\n", err)
return
}
fmt.Printf("result:%#v\n", resp.Result)
}
// getDocument 获取文档
func (s *elastic) GetDocument(name string, id string) (res json.RawMessage) {
resp, err := s.client.Get(name, id).
Do(context.Background())
if err != nil {
fmt.Printf("get document by id failed, err:%v\n", err)
return
}
fmt.Printf("fileds:%s\n", resp.Source_)
res = resp.Source_
return
}
// updateDocument 更新文档
func (s *elastic) UpdateDocument(name string, key string, data interface{}) {
resp, err := s.client.Update(name, key).
Doc(data). // 使用结构体变量更新
Do(context.Background())
if err != nil {
fmt.Printf("update document failed, err:%v\n", err)
return
}
fmt.Printf("result:%v\n", resp.Result)
}
// deleteDocument 删除 document
func (s *elastic) DeleteDocument(name string, key string) {
resp, err := s.client.Delete(name, key).
Do(context.Background())
if err != nil {
fmt.Printf("delete document failed, err:%v\n", err)
return
}
fmt.Printf("result:%v\n", resp.Result)
}

View File

@@ -1,173 +0,0 @@
package excel
import (
"context"
"github.com/ayflying/excel2json"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"path"
"strconv"
"strings"
"time"
)
type FileItem struct {
Name string `json:"name" dc:"配置文件名"`
Filename string `json:"filename" dc:"文件名"`
Tabs []string `json:"tabs" dc:"页签"`
Items []string `json:"items" dc:"道具字段"`
ItemsMap []string `json:"items_map" dc:"道具字段map格式"`
Slice map[string]string `json:"slice" dc:"切片"`
}
type Excel struct {
Header int //表头行数
Key int //key列
}
func New(header int, key int) *Excel {
return &Excel{
Header: header,
Key: key,
}
}
func (s *Excel) ExcelLoad(ctx context.Context, fileItem *FileItem, mainPath string) (runTime time.Duration) {
startTime := gtime.Now()
filepath := path.Join("manifest/game", fileItem.Name)
//如果filepath文件不存在跳过
if !gfile.Exists(path.Join(mainPath, fileItem.Filename)) {
return
}
//假设我们有一个命令行工具比如dirWindows环境下列出目录内容
var tempJson []interface{}
for k, v2 := range fileItem.Tabs {
sheet := v2
if k == 0 {
sheet = v2
}
//导出json
excel2json.Excel(path.Join(mainPath, fileItem.Filename),
filepath, s.Header, s.Key, sheet)
//如果配置了道具字段,则进行转换
//g.Log().Info(ctx, "当前任务表=%v,items=%v", v.Name, v.Items)
fileBytes := gfile.GetBytes(filepath)
arr, _ := gjson.DecodeToJson(fileBytes)
list := arr.Array()
//格式化item格式
if len(fileItem.Items) > 0 {
list = s.itemsFormat(list, fileItem.Items)
}
if len(fileItem.ItemsMap) > 0 {
list = s.itemsMapFormat(list, gconv.Strings(fileItem.ItemsMap))
}
//格式化切片修改
if len(fileItem.Slice) > 0 {
list = s.sliceFormat(list, fileItem.Slice)
}
//拼接json
tempJson = append(tempJson, list...)
fileBytes, _ = gjson.MarshalIndent(tempJson, "", "\t")
err := gfile.PutBytes(filepath, fileBytes)
if err != nil {
g.Log().Error(ctx, err)
}
}
runTime = gtime.Now().Sub(startTime)
return
}
func (s *Excel) itemsFormat(list []interface{}, Items []string) []interface{} {
for k2, v2 := range list {
for k3, v3 := range v2.(g.Map) {
if gstr.InArray(Items, k3) {
if _, ok := v3.(string); ok {
list[k2].(g.Map)[k3] = s.Spilt2Item(v3.(string))
} else {
g.Log().Errorf(gctx.New(), "当前类型断言失败:%v,list=%v", v3, v2)
}
}
}
}
return list
}
func (s *Excel) itemsMapFormat(list []interface{}, Items []string) []interface{} {
for k2, v2 := range list {
for k3, v3 := range v2.(g.Map) {
if gstr.InArray(Items, k3) {
if _, ok := v3.(string); ok {
get := s.Spilt2Item(v3.(string))
list[k2].(g.Map)[k3] = s.Items2Map(get)
} else {
g.Log().Errorf(gctx.New(), "当前类型断言失败:%v,list=%v", v3, v2)
}
}
}
}
return list
}
func (s *Excel) sliceFormat(list []interface{}, Slice map[string]string) []interface{} {
for s1, s2 := range Slice {
for k2, v2 := range list {
for k3, v3 := range v2.(g.Map) {
//判断是否存在
if s1 != k3 {
continue
}
if gconv.String(v3) == "" {
list[k2].(g.Map)[k3] = []string{}
continue
}
var parts []string
//断言是否成功
if get, ok := v3.(string); !ok {
//g.Log().Errorf(gctx.New(), "当前类型断言失败:%v", v3)
parts = []string{gconv.String(v3)}
continue
} else {
parts = strings.Split(get, "|") // 分割字符串
}
switch s2 {
case "int":
var temp = make([]int, len(parts))
for k, v := range parts {
temp[k], _ = strconv.Atoi(v)
}
list[k2].(g.Map)[k3] = temp
case "int64":
var temp = make([]int64, len(parts))
for k, v := range parts {
temp[k], _ = strconv.ParseInt(v, 10, 64)
}
case "float64":
var temp = make([]float64, len(parts))
for k, v := range parts {
temp[k], _ = strconv.ParseFloat(v, 64)
}
list[k2].(g.Map)[k3] = temp
default:
list[k2].(g.Map)[k3] = parts
}
}
}
}
return list
}

129
go.mod
View File

@@ -1,66 +1,113 @@
module github.com/ayflying/utility_go
go 1.23.0
go 1.24.0
require (
github.com/apolloconfig/agollo/v4 v4.4.0
github.com/ayflying/excel2json v1.1.2
github.com/elastic/go-elasticsearch/v8 v8.17.0
github.com/gogf/gf/contrib/config/apollo/v2 v2.8.3
github.com/gogf/gf/v2 v2.8.3
github.com/minio/minio-go/v7 v7.0.85
github.com/xuri/excelize/v2 v2.9.0
github.com/ayflying/excel2json v1.1.9
github.com/casdoor/casdoor-go-sdk v1.20.0
github.com/elastic/go-elasticsearch/v8 v8.19.0
github.com/getlantern/systray v1.2.2
github.com/go-pay/crypto v0.0.1
github.com/go-pay/gopay v1.5.114
github.com/go-pay/util v0.0.4
github.com/goccy/go-json v0.10.5
github.com/gogf/gf/contrib/config/apollo/v2 v2.9.3
github.com/gogf/gf/v2 v2.9.3
github.com/google/uuid v1.6.0
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20250916043522-9a14e3273609
github.com/minio/minio-go/v7 v7.0.95
github.com/prometheus/client_golang v1.23.2
github.com/xuri/excelize/v2 v2.9.1
golang.org/x/oauth2 v0.31.0
google.golang.org/api v0.249.0
google.golang.org/protobuf v1.36.9
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
)
require (
github.com/360EntSecGroup-Skylar/excelize v1.4.1 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
cloud.google.com/go/auth v0.16.5 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
cloud.google.com/go/compute/metadata v0.8.3 // indirect
github.com/BurntSushi/toml v1.5.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/clbanning/mxj/v2 v2.7.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect
github.com/elastic/elastic-transport-go/v8 v8.7.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 // indirect
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7 // indirect
github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7 // indirect
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7 // indirect
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55 // indirect
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/go-json v0.10.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/go-pay/errgroup v0.0.3 // indirect
github.com/go-pay/smap v0.0.2 // indirect
github.com/go-pay/xlog v0.0.3 // indirect
github.com/go-pay/xtime v0.0.2 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/grokify/html-strip-tags-go v0.1.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/magiconair/properties v1.8.9 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/magiconair/properties v1.8.10 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/minio/crc64nvme v1.1.1 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.3 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6 // indirect
github.com/olekukonko/errors v1.1.0 // indirect
github.com/olekukonko/ll v0.1.1 // indirect
github.com/olekukonko/tablewriter v1.0.9 // indirect
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/philhofer/fwd v1.2.0 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.66.1 // indirect
github.com/prometheus/procfs v0.17.0 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.4 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.8.1 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d // indirect
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
github.com/sagikazarmark/locafero v0.11.0 // indirect
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/spf13/viper v1.21.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tiendc/go-deepcopy v1.6.1 // indirect
github.com/tinylib/msgp v1.4.0 // indirect
github.com/xuri/efp v0.0.1 // indirect
github.com/xuri/nfp v0.0.1 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
go.opentelemetry.io/otel v1.38.0 // indirect
go.opentelemetry.io/otel/metric v1.38.0 // indirect
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
go.opentelemetry.io/otel/trace v1.38.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.42.0 // indirect
golang.org/x/net v0.44.0 // indirect
golang.org/x/sys v0.36.0 // indirect
golang.org/x/text v0.29.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090 // indirect
google.golang.org/grpc v1.75.1 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

296
go.sum
View File

@@ -18,12 +18,18 @@ cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmW
cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
cloud.google.com/go/auth v0.16.5 h1:mFWNQ2FEVWAliEQWpAdH80omXFokmrnbDhUS9cBywsI=
cloud.google.com/go/auth v0.16.5/go.mod h1:utzRfHMP+Vv0mpOkTRQoWD2q3BatTOoWbA7gCc2dUhQ=
cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc=
cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
cloud.google.com/go/compute/metadata v0.8.3 h1:1AzcHmzbrX8t3m0CVosfxCAwGvaAShtrnlNxDriLgIk=
cloud.google.com/go/compute/metadata v0.8.3/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
@@ -37,11 +43,9 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/360EntSecGroup-Skylar/excelize v1.4.1 h1:l55mJb6rkkaUzOpSsgEeKYtS6/0gHwBYyfo5Jcjv/Ks=
github.com/360EntSecGroup-Skylar/excelize v1.4.1/go.mod h1:vnax29X2usfl7HHkBrX5EvSCJcmH3dT9luvxzu8iGAE=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0=
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/agiledragon/gomonkey/v2 v2.11.0 h1:5oxSgA+tC1xuGsrIorR+sYiziYltmJyEZ9qA25b6l5U=
github.com/agiledragon/gomonkey/v2 v2.11.0/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY=
@@ -51,11 +55,17 @@ github.com/apolloconfig/agollo/v4 v4.4.0/go.mod h1:6WjI68IzqMk/Y6ghMtrj5AX6Uewo2
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/ayflying/excel2json v1.1.2 h1:ERMDUvN2H/9jQmbFo5Rt1XJAvWdMTzIAsI4p4Fp/wRA=
github.com/ayflying/excel2json v1.1.2/go.mod h1:aNzB271bUAuRq+P4J+S8a3NAltcghLIGR2HdM6akqFU=
github.com/ayflying/excel2json v1.1.9 h1:AKaUFc/FNQXV/53/VSgp3J+2d4PMWhVpTDRj/yx3VOs=
github.com/ayflying/excel2json v1.1.9/go.mod h1:GjXYP2cDzeTgQxssQ3ba8QRa9JsScAeJMwCrZ7QTlQo=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
github.com/casdoor/casdoor-go-sdk v1.20.0 h1:Xr8vzs25a0QzsLfs99x9kLoHkYznCa1Lf5nEvks9GLI=
github.com/casdoor/casdoor-go-sdk v1.20.0/go.mod h1:cMnkCQJgMYpgAlgEx8reSt1AVaDIQLcJ1zk5pzBaz+4=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
@@ -72,10 +82,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA=
github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk=
github.com/elastic/go-elasticsearch/v8 v8.17.0 h1:e9cWksE/Fr7urDRmGPGp47Nsp4/mvNOrU8As1l2HQQ0=
github.com/elastic/go-elasticsearch/v8 v8.17.0/go.mod h1:lGMlgKIbYoRvay3xWBeKahAiJOgmFDsjZC39nmO3H64=
github.com/elastic/elastic-transport-go/v8 v8.7.0 h1:OgTneVuXP2uip4BA658Xi6Hfw+PeIOod2rY3GVMGoVE=
github.com/elastic/elastic-transport-go/v8 v8.7.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk=
github.com/elastic/go-elasticsearch/v8 v8.19.0 h1:VmfBLNRORY7RZL+9hTxBD97ehl9H8Nxf2QigDh6HuMU=
github.com/elastic/go-elasticsearch/v8 v8.19.0/go.mod h1:F3j9e+BubmKvzvLjNui/1++nJuJxbkhHefbaT0kFKGY=
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
@@ -88,9 +98,27 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 h1:NRUJuo3v3WGC/g5YiyF790gut6oQr5f3FBI88Wv0dx4=
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520/go.mod h1:L+mq6/vvYHKjCX2oez0CgEAJmbq1fbb/oNJIWQkBybY=
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7 h1:6uJ+sZ/e03gkbqZ0kUG6mfKoqDb4XMAzMIwlajq19So=
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7/go.mod h1:l+xpFBrCtDLpK9qNjxs+cHU6+BAdlBaxHqikB6Lku3A=
github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7 h1:guBYzEaLz0Vfc/jv0czrr2z7qyzTOGC9hiQ0VC+hKjk=
github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7/go.mod h1:zx/1xUUeYPy3Pcmet8OSXLbF47l+3y6hIPpyLWoR9oc=
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7 h1:micT5vkcr9tOVk1FiH8SWKID8ultN44Z+yzd2y/Vyb0=
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7/go.mod h1:dD3CgOrwlzca8ed61CsZouQS5h5jIzkK9ZWrTcf0s+o=
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55 h1:XYzSdCbkzOC0FDNrgJqGRo8PCMFOBFL9py72DRs7bmc=
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55/go.mod h1:6mmzY2kW1TOOrVy+r41Za2MxXM+hhqTtY3oBKd2AgFA=
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f h1:wrYrQttPS8FHIRSlsrcuKazukx/xqO/PpLZzZXsF+EA=
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f/go.mod h1:D5ao98qkA6pxftxoqzibIBBrLSUli+kYnJqrgBf9cIA=
github.com/getlantern/systray v1.2.2 h1:dCEHtfmvkJG7HZ8lS/sLklTH4RKUcIsKrAD9sThoEBE=
github.com/getlantern/systray v1.2.2/go.mod h1:pXFOI1wwqwYXEhLPm9ZGjS2u/vVELeIgNMY5HvhHhcE=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
@@ -98,18 +126,38 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM=
github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/go-pay/crypto v0.0.1 h1:B6InT8CLfSLc6nGRVx9VMJRBBazFMjr293+jl0lLXUY=
github.com/go-pay/crypto v0.0.1/go.mod h1:41oEIvHMKbNcYlWUlRWtsnC6+ASgh7u29z0gJXe5bes=
github.com/go-pay/errgroup v0.0.3 h1:DB4s8e8oWYDyETKQ1y1riMJ7y29zE1uIsMCSjEOFSbU=
github.com/go-pay/errgroup v0.0.3/go.mod h1:0+4b8mvFMS71MIzsaC+gVvB4x37I93lRb2dqrwuU8x8=
github.com/go-pay/gopay v1.5.114 h1:jNYpcylr7WJev6i/MBeer0Z58E0x5NyqG4FfZrar3pQ=
github.com/go-pay/gopay v1.5.114/go.mod h1:p48xvWeepPolZuakAjCeucWynWwW7msoXsqahcoJpKE=
github.com/go-pay/smap v0.0.2 h1:kKflYor5T5FgZltPFBMTFfjJvqYMHr5VnIFSEyhVTcA=
github.com/go-pay/smap v0.0.2/go.mod h1:HW9oAo0okuyDYsbpbj5fJFxnNj/BZorRGFw26SxrNWw=
github.com/go-pay/util v0.0.4 h1:TuwSU9o3Qd7m9v1PbzFuIA/8uO9FJnA6P7neG/NwPyk=
github.com/go-pay/util v0.0.4/go.mod h1:Tsdhs8Ib9J9b4+NKNO1PHh5hWHhlg98PthsX0ckq6PM=
github.com/go-pay/xlog v0.0.3 h1:avyMhCL/JgBHreoGx/am/kHxfs1udDOAeVqbmzP/Yes=
github.com/go-pay/xlog v0.0.3/go.mod h1:mH47xbobrdsSHWsmFtSF5agWbMHFP+tK0ZbVCk5OAEw=
github.com/go-pay/xtime v0.0.2 h1:7YR4/iuELsEHpJ6LUO0SVK80hQxDO9MLCfuVYIiTCRM=
github.com/go-pay/xtime v0.0.2/go.mod h1:W1yRbJaSt4CSBcdAtLBQ8xajiN/Pl5hquGczUcUE9xE=
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gogf/gf/contrib/config/apollo/v2 v2.8.3 h1:KU51l3uaU7Mxq+FSoLjROyDERUGKCMo4qExxPEgA7KQ=
github.com/gogf/gf/contrib/config/apollo/v2 v2.8.3/go.mod h1:Uo6f/Pr6zVHSbdP2Lj9iToEMuh/TzU/bE2E5SJlquEk=
github.com/gogf/gf/v2 v2.8.3 h1:h9Px3lqJnnH6It0AqHRz4/1hx0JmvaSf1IvUir5x1rA=
github.com/gogf/gf/v2 v2.8.3/go.mod h1:n++xPYGUUMadw6IygLEgGZqc6y6DRLrJKg5kqCrPLWY=
github.com/gogf/gf/contrib/config/apollo/v2 v2.9.3 h1:/IcE+DmlQDWeDjnkKWr1Rql7VCLUxEqz7gXoQKZHd8o=
github.com/gogf/gf/contrib/config/apollo/v2 v2.9.3/go.mod h1:mek4CnNsvdum4jYhf0PzaIYzoSBuSvVXyuCZG4I9qvw=
github.com/gogf/gf/v2 v2.9.3 h1:qjN4s55FfUzxZ1AE8vUHNDX3V0eIOUGXhF2DjRTVZQ4=
github.com/gogf/gf/v2 v2.9.3/go.mod h1:w6rcfD13SmO7FKI80k9LSLiSMGqpMYp50Nfkrrc2sEE=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI=
github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
@@ -139,6 +187,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -152,8 +202,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -170,12 +220,17 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe
github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0=
github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4=
github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/googleapis/gax-go/v2 v2.15.0 h1:SyjDc1mGgZU5LncH8gimWo9lW1DtIfPibOG81vgd/bo=
github.com/googleapis/gax-go/v2 v2.15.0/go.mod h1:zVVkkxAQHa1RQpg9z2AUCMnKhi0Qld9rcmyfL1OZhoc=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
@@ -197,7 +252,6 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
@@ -208,41 +262,46 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY=
github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8=
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20250916043522-9a14e3273609 h1:LfPCMQ+fjqOLKNYrE1wCrmq2CX2ukY0AItPt2rneF4s=
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20250916043522-9a14e3273609/go.mod h1:+mNMTBuDMdEGhWzoQgc6kBdqeaQpWh5ba8zqmp2MxCU=
github.com/lxn/walk v0.0.0-20210112085537-c389da54e794/go.mod h1:E23UucZGqpuUANJooIbHWCufXvOcT6E7Stq81gU+CSQ=
github.com/lxn/win v0.0.0-20210218163916-a377121e959e/go.mod h1:KxxjdtRkfNoYDCUP5ryK7XJJNTnpC8atvtmTheChOtk=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM=
github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE=
github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/minio/crc64nvme v1.1.1 h1:8dwx/Pz49suywbO+auHCBpCtlW1OfpcLN7wYgVR6wAI=
github.com/minio/crc64nvme v1.1.1/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg=
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
github.com/minio/minio-go/v7 v7.0.84 h1:D1HVmAF8JF8Bpi6IU4V9vIEj+8pc+xU88EWMs2yed0E=
github.com/minio/minio-go/v7 v7.0.84/go.mod h1:57YXpvc5l3rjPdhqNrDsvVlY0qPI6UTk1bflAe+9doY=
github.com/minio/minio-go/v7 v7.0.85 h1:9psTLS/NTvC3MWoyjhjXpwcKoNbkongaCSF3PNpSuXo=
github.com/minio/minio-go/v7 v7.0.85/go.mod h1:57YXpvc5l3rjPdhqNrDsvVlY0qPI6UTk1bflAe+9doY=
github.com/minio/minio-go/v7 v7.0.95 h1:ywOUPg+PebTMTzn9VDsoFJy32ZuARN9zhB+K3IYEvYU=
github.com/minio/minio-go/v7 v7.0.95/go.mod h1:wOOX3uxS334vImCNRVyIDdXX9OsXDm89ToynKgqUKlo=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
@@ -250,24 +309,42 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag=
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6 h1:zrbMGy9YXpIeTnGj4EljqMiZsIcE09mmF8XsD5AYOJc=
github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6/go.mod h1:rEKTHC9roVVicUIfZK7DYrdIoM0EOr8mK1Hj5s3JjH0=
github.com/olekukonko/errors v1.1.0 h1:RNuGIh15QdDenh+hNvKrJkmxxjV4hcS50Db478Ou5sM=
github.com/olekukonko/errors v1.1.0/go.mod h1:ppzxA5jBKcO1vIpCXQ9ZqgDh8iwODz6OXIGKU8r5m4Y=
github.com/olekukonko/ll v0.1.1 h1:9Dfeed5/Mgaxb9lHRAftLK9pVfYETvHn+If6lywVhJc=
github.com/olekukonko/ll v0.1.1/go.mod h1:2dJo+hYZcJMLMbKwHEWvxCUbAOLc/CXWS9noET22Mdo=
github.com/olekukonko/tablewriter v1.0.9 h1:XGwRsYLC2bY7bNd93Dk51bcPZksWZmLYuaTHR0FqfL8=
github.com/olekukonko/tablewriter v1.0.9/go.mod h1:5c+EBPeSqvXnLLgkm9isDdzR3wjfBkHR9Nhfp3NWrzo=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ=
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM=
github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs=
github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA=
github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0=
github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw=
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
@@ -278,44 +355,56 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc=
github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw=
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U=
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=
github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=
github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.8.1 h1:Kq1fyeebqsBfbjZj4EL7gj2IO0mMaiyjYUWcUsl2O44=
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU=
github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.3-0.20181224173747-660f15d67dbb/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/tevid/gohamcrest v1.1.1 h1:ou+xSqlIw1xfGTg1uq1nif/htZ2S3EzRqLm2BP+tYU0=
github.com/tevid/gohamcrest v1.1.1/go.mod h1:3UvtWlqm8j5JbwYZh80D/PVBt0mJ1eJiYgZMibh0H/k=
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d h1:llb0neMWDQe87IzJLS4Ci7psK/lVsjIS2otl+1WyRyY=
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
github.com/xuri/excelize/v2 v2.9.0 h1:1tgOaEq92IOEumR1/JfYS/eR0KHOCsRv/rYXXh6YJQE=
github.com/xuri/excelize/v2 v2.9.0/go.mod h1:uqey4QBZ9gdMeWApPLdhm9x+9o2lq4iVmjiLfBS5hdE=
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 h1:hPVCafDV85blFTabnqKgNhDCkJX25eik94Si9cTER4A=
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
github.com/tiendc/go-deepcopy v1.6.1 h1:uVRTItFeNHkMcLueHS7OCsxgxT9P8MzGB/taUa2Y4Tk=
github.com/tiendc/go-deepcopy v1.6.1/go.mod h1:toXoeQoUqXOOS/X4sKuiAoSk6elIdqc0pN7MTgOOo2I=
github.com/tinylib/msgp v1.4.0 h1:SYOeDRiydzOw9kSiwdYp9UcBgPFtLU2WDHaJXyHruf8=
github.com/tinylib/msgp v1.4.0/go.mod h1:cvjFkb4RiC8qSBOPMGPSzSAx47nAsfhLVTCZZNuHv5o=
github.com/xuri/efp v0.0.1 h1:fws5Rv3myXyYni8uwj2qKjVaRP30PdjeYe2Y6FDsCL8=
github.com/xuri/efp v0.0.1/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
github.com/xuri/excelize/v2 v2.9.1 h1:VdSGk+rraGmgLHGFaGG9/9IWu1nj4ufjJ7uwMDtj8Qw=
github.com/xuri/excelize/v2 v2.9.1/go.mod h1:x7L6pKz2dvo9ejrRuD8Lnl98z4JLt0TGAwjhW+EiP8s=
github.com/xuri/nfp v0.0.1 h1:MDamSGatIvp8uOmDP8FnmjuQpu90NzdJxo7242ANR9Q=
github.com/xuri/nfp v0.0.1/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -331,17 +420,29 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo=
go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4=
go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q=
go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g=
go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0=
go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
@@ -349,8 +450,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -363,8 +464,8 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ=
golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ=
golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -424,8 +525,8 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -438,6 +539,8 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo=
golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -449,6 +552,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -479,6 +584,7 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -490,10 +596,10 @@ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -502,8 +608,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -562,6 +668,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
@@ -584,6 +692,8 @@ google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjR
google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8=
google.golang.org/api v0.249.0 h1:0VrsWAKzIZi058aeq+I86uIXbNhm9GxSHpbmZ92a38w=
google.golang.org/api v0.249.0/go.mod h1:dGk9qyI0UYPwO/cjt2q06LG/EhUpwZGdAbYF14wHHrQ=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@@ -632,6 +742,12 @@ google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4=
google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s=
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 h1:FiusG7LWj+4byqhbvmB+Q93B/mOxJLN2DTozDuZm4EU=
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:kXqgZtrWaf6qS3jZOCnCH7WYfrvFjkC51bM8fz3RsCA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090 h1:/OQuEa4YWtDt7uQWHd3q3sUMb+QOLQUg1xa8CEsRv5w=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090/go.mod h1:GmFNa4BdJZ2a8G+wCe9Bg3wwThLrJun751XstdJt5Og=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -652,6 +768,8 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.75.1 h1:/ODCNEuf9VghjgO3rqLcfg8fiOP0nSluljWFlDxELLI=
google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -664,16 +782,22 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
gopkg.in/Knetic/govaluate.v3 v3.0.0/go.mod h1:csKLBORsPbafmSCGTEh3U7Ozmsuq8ZSIlKk1bcqph0E=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

18
hack/config.yaml Normal file
View File

@@ -0,0 +1,18 @@
# CLI tool, only in development environment.
# https://goframe.org/pages/viewpage.action?pageId=3673173
gfcli:
gen:
ctrl:
dstFolder: "controller"
service:
dstFolder: "service"
pb:
path: "manifest/protobuf"
api: "api"
ctrl: "controller"
docker:
build: "-a amd64 -s linux -p temp -ew"
tagPrefixes:
- "hub.docker.com"
# - "git.7cuu.com"
tag: "latest"

43
internal/boot/boot.go Normal file
View File

@@ -0,0 +1,43 @@
package boot
import (
"context"
v1 "github.com/ayflying/utility_go/api/system/v1"
"github.com/ayflying/utility_go/service"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
)
var (
ctx = gctx.GetInitCtx()
_func = []func(){}
)
func Boot() (err error) {
// 启动计划任务定时器预防debug工具激活计划任务造成重复执行此处不执行计划任务
//err = service.SystemCron().StartCron()
//用户活动持久化每小时执行一次
service.SystemCron().AddCronV2(v1.CronType_HOUR, func(context.Context) error {
go func() {
err = service.GameKv().SavesV1()
err = service.GameAct().SavesV2()
if err != nil {
g.Log().Error(gctx.New(), err)
}
}()
return nil
}, true)
//初始化自启动方法
for _, v := range _func {
v()
}
return nil
}
// AddFunc 注册方法,在启动时执行
func AddFunc(f func()) {
_func = append(_func, f)
}

53
internal/game/act/act.go Normal file
View File

@@ -0,0 +1,53 @@
package act
import (
"fmt"
"github.com/ayflying/utility_go/pgk"
"github.com/ayflying/utility_go/service"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gtime"
"time"
)
var (
Cache = pgk.Cache("redis")
ActIdListIsShow map[int]func(uid int64) bool
RedDotList map[string]func(uid int64) int32
)
func GetCacheKey(uid int64, actId int) string {
return fmt.Sprintf("actRedDot:%s:%d:%d", gtime.Now().Format("Ymd"), actId, uid)
}
// 刷新缓存
func RefreshCache(uid int64, actId int) {
Cache.Remove(gctx.New(), GetCacheKey(uid, actId))
service.GameAct().RefreshGetRedDotCache(uid)
}
func GetRedDot(uid int64, actId int) *gvar.Var {
get, _ := Cache.Get(nil, GetCacheKey(uid, actId))
return get
}
func SetRedDot(uid int64, actId int, redDot int32) {
Cache.Set(nil, GetCacheKey(uid, actId), redDot, time.Hour)
}
// 注册隐藏活动接口
func AddIsShowRegistrar(actId int, isShow func(uid int64) bool) {
if ActIdListIsShow == nil {
ActIdListIsShow = make(map[int]func(uid int64) bool)
}
ActIdListIsShow[actId] = isShow
}
// 注册红点接口
func AddRedDotRegistrar(key string, redDot func(uid int64) int32) {
if RedDotList == nil {
RedDotList = make(map[string]func(uid int64) int32)
}
RedDotList[key] = redDot
}

View File

@@ -0,0 +1,60 @@
package casdoor
import (
"github.com/ayflying/utility_go/service"
"github.com/casdoor/casdoor-go-sdk/casdoorsdk"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
)
type sCasdoor struct {
client *casdoorsdk.Client
config *casdoorsdk.AuthConfig
}
func init() {
var casdoor = &sCasdoor{}
service.RegisterCasdoor(New(casdoor))
}
func New(s *sCasdoor) *sCasdoor {
return s
}
func (s *sCasdoor) Load(endpoint string, clientId string, clientSecret string, certificate string, organizationName string, applicationName string) {
s.config = &casdoorsdk.AuthConfig{
Endpoint: endpoint,
ClientId: clientId,
ClientSecret: clientSecret,
Certificate: certificate,
OrganizationName: organizationName,
ApplicationName: applicationName,
}
}
func (s *sCasdoor) New() *casdoorsdk.Client {
if s.config == nil {
g.Log().Errorf(gctx.New(), "未读取到配置请先加载Load方法")
return nil
}
s.client = casdoorsdk.NewClient(
s.config.Endpoint,
s.config.ClientId,
s.config.ClientSecret,
s.config.Certificate,
s.config.OrganizationName,
s.config.ApplicationName,
)
return s.client
}
//func (s *sCasdoor) EditPassword(name, oldPassword, newPassword string) (res bool, err error) {
// res, err = s.client.SetPassword(s.config.OrganizationName, name, oldPassword, newPassword)
// return
//}
//
//func (s *sCasdoor) Edit() {
// s.client.GetGroups()
//
//}

View File

@@ -0,0 +1,587 @@
package gameAct
import (
"context"
"errors"
"fmt"
"strconv"
"strings"
"sync"
"time"
"github.com/ayflying/utility_go/internal/model/do"
"github.com/ayflying/utility_go/internal/model/entity"
"github.com/ayflying/utility_go/pkg"
service2 "github.com/ayflying/utility_go/service"
"github.com/ayflying/utility_go/tools"
"github.com/gogf/gf/v2/container/gset"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/util/gconv"
)
var (
Name = "game_act"
ActList = gset.New(true)
RunTimeMax *gtime.Time
)
type sGameAct struct {
}
func new() *sGameAct {
return &sGameAct{}
}
func init() {
service2.RegisterGameAct(new())
}
// Info 获取活动信息
//
// @Description: 根据用户ID和活动ID获取活动信息
// @receiver s *sGameAct: 代表活动操作的结构体实例
// @param uid int64: 用户ID
// @param actId int: 活动ID
// @return data *v1.Act: 返回活动信息结构体指针
// @return err error: 返回错误信息
func (s *sGameAct) Info(uid int64, actId int) (data *g.Var, err error) {
var ctx = gctx.New()
if uid == 0 || actId == 0 {
g.Log().Error(ctx, "当前参数为空")
return
}
// 构造缓存键名
keyCache := fmt.Sprintf("act:%v:%v", actId, uid)
// 尝试从Redis缓存中获取活动信息
get, err := g.Redis().Get(ctx, keyCache)
if !get.IsEmpty() {
// 如果缓存中存在将数据扫描到data结构体中并返回
data = get
return
}
// 从数据库中查询活动信息
getDb, err := g.Model(Name).Where(do.GameAct{
Uid: uid,
ActId: actId,
}).Fields("action").OrderDesc("updated_at").Value()
getDb.Scan(&data)
if data == nil || data.IsEmpty() {
return
}
// 将查询到的活动信息保存到Redis缓存中
_, err = g.Redis().Set(ctx, keyCache, data)
var CacheKey = fmt.Sprintf("act:update:%d", uid)
pkg.Cache("redis").Set(ctx, CacheKey, uid, time.Hour*24*1)
return
}
// Set 将指定用户的活动信息存储到Redis缓存中。
//
// @Description:
// @receiver s *sGameAct: 表示sGameAct类型的实例。
// @param uid int64: 用户的唯一标识。
// @param actId int: 活动的唯一标识。
// @param data interface{}: 要存储的活动信息数据。
// @return err error: 返回错误信息如果操作成功则返回nil。
func (s *sGameAct) Set(uid int64, actId int, data interface{}) (err error) {
var ctx = gctx.New()
if uid == 0 || actId == 0 {
g.Log().Error(ctx, "当前参数为空")
return
}
// 构造缓存键名
keyCache := fmt.Sprintf("act:%v:%v", actId, uid)
if data == nil {
_, err = g.Redis().Del(ctx, keyCache)
return
}
// 将活动信息保存到Redis缓存并将用户ID添加到活动索引集合中
_, err = g.Redis().Set(ctx, keyCache, data)
//插入集合
ActList.Add(actId)
return
}
// Saves 保存游戏活动数据
//
// @Description: 保存游戏活动数据
// @receiver s *sGameAct: 游戏活动服务结构体指针
// @return err error: 返回错误信息
// Deprecated: 该方法已被弃用建议使用SavesV2方法
func (s *sGameAct) Saves() (err error) {
var ctx = gctx.New()
g.Log().Debug(ctx, "开始执行游戏act数据保存了")
//如果没有执行过,设置时间戳
// 最大允许执行时间
RunTimeMax = gtime.Now().Add(time.Minute * 30)
//遍历执行
ActList.Iterator(func(i interface{}) bool {
//在时间内允许执行
if gtime.Now().Before(RunTimeMax) {
g.Log().Debugf(ctx, "开始执行游戏act数据保存:act=%v", i)
err = s.Save(ctx, i.(int))
} else {
g.Log().Errorf(ctx, "游戏act数据保存超时:act=%v", i)
}
return true
})
return
}
// Save 保存游戏活动数据
//
// @Description: 保存游戏活动数据
// @receiver s *sGameAct: 游戏活动服务结构体指针
// @param ctx context.Context: 上下文对象
// @param actId int: 活动ID
// @return err error: 返回错误信息
// deprecated: 该方法已被弃用建议使用SaveV2方法
func (s *sGameAct) Save(ctx context.Context, actId int) (err error) {
cacheKey := fmt.Sprintf("act:%v:*", actId)
var add = make([]*entity.GameAct, 0)
var update = make([]*entity.GameAct, 0)
//循环获取缓存数据
err = tools.Redis.RedisScanV2(cacheKey, func(keys []string) (err error) {
//判断是否超时
if gtime.Now().After(RunTimeMax) {
g.Log().Debug(ctx, "act执行超时了,停止执行!")
err = errors.New("act执行超时了,停止执行!")
return
}
for _, cacheKey = range keys {
result := strings.Split(cacheKey, ":")
actId, err = strconv.Atoi(result[1])
var uid int64
uid = gconv.Int64(result[2])
//uid, err = strconv.ParseInt(result[2], 10, 64)
if err != nil {
g.Log().Error(ctx, err)
continue
}
cacheGet, _ := g.Redis().Get(ctx, cacheKey)
if uid == 0 {
//跳过为空的用户缓存
continue
}
if cacheGet.IsEmpty() {
//空数据也不保存
continue
}
//如果有活跃,跳过持久化
if getBool, _ := pkg.Cache("redis").
Contains(ctx, fmt.Sprintf("act:update:%d", uid)); getBool {
continue
}
//获取数据库数据
var data *entity.GameAct
// 从数据库中查询活动信息
err = g.Model(Name).Where(do.GameAct{
Uid: uid,
ActId: actId,
}).Fields("uid,act_id").Scan(&data)
if err != nil {
g.Log().Errorf(ctx, "当前数据错误: %v", cacheKey)
continue
}
actionData := cacheGet.String()
if data == nil {
add = append(add, &entity.GameAct{
ActId: actId,
Uid: uid,
Action: actionData,
})
} else {
//覆盖数据
data.ActId = actId
data.Uid = uid
data.Action = actionData
update = append(update, data)
}
}
//批量写入数据库
updateCount := 0
//g.Log().Debugf(ctx, "当前 %v 要更新的数据: %v 条", actId, len(update))
if len(update) > 100 {
for _, v := range update {
v.UpdatedAt = gtime.Now()
updateRes, err2 := g.Model(Name).Where(do.GameAct{
Uid: v.Uid,
ActId: v.ActId,
}).Data(v).Update()
if err2 != nil {
g.Log().Error(ctx, err2)
return
}
if row, _ := updateRes.RowsAffected(); row == 0 {
g.Log().Error(ctx, "本次更新为0更新数据失败: %v", v)
continue
}
//删除缓存
go s.DelCacheKey(ctx, v.ActId, v.Uid)
updateCount++
update = make([]*entity.GameAct, 0)
}
g.Log().Debugf(ctx, "当前 %v 更新数据库: %v 条", actId, updateCount)
update = make([]*entity.GameAct, 0)
}
var count int64
//g.Log().Debugf(ctx, "当前 %v 要添加的数据: %v 条", actId, len(add))
if len(add) > 100 {
dbRes, err2 := g.Model(Name).Data(add).Save()
err = err2
if err != nil {
g.Log().Error(ctx, err2)
return
}
count, _ = dbRes.RowsAffected()
if count == 0 {
g.Log().Error(ctx, "当前 %v 写入数据库: %v 条", actId, count)
for _, vTemp := range add {
g.Log().Debugf(ctx, "当前act%vadd写入数据: %v,内容:%v", vTemp.ActId, vTemp.Uid, vTemp.Action)
}
return
}
for _, v2 := range add {
//删除缓存
go s.DelCacheKey(ctx, v2.ActId, v2.Uid)
}
//g.Log().Debugf(ctx, "当前 %v 写入数据库: %v 条", actId, count)
add = make([]*entity.GameAct, 0)
}
if err != nil {
g.Log().Error(ctx, "当前临时数据入库失败: %v", err)
}
return err
})
return
}
// SavesV2 保存游戏活动数据
//
// @Description: 保存游戏活动数据
// @receiver s *sGameAct: 游戏活动服务结构体指针
// @return err error: 返回错误信息
// SavesV2 保存游戏活动数据
func (s *sGameAct) SavesV2() (err error) {
var ctx = gctx.New()
g.Log().Debug(ctx, "开始执行游戏act数据保存了")
RunTimeMax = gtime.Now().Add(time.Minute * 30)
// 使用局部通道替代包级通道,避免并发冲突
addChan := make(chan *entity.GameAct, 1000)
updateChan := make(chan *entity.GameAct, 1000)
errChan := make(chan error, 1)
var wg sync.WaitGroup
wg.Add(1) // 仅需添加1次对应Cache2SqlChan协程
// wg.Add(1) // 移除多余的Add调用避免计数不平衡
go func() {
defer wg.Done() // Cache2SqlChan协程完成后减1
s.Cache2SqlChan(ctx, addChan, updateChan)
}()
go func() {
scanErr := tools.Redis.RedisScanV2("act:*", func(keys []string) error {
if gtime.Now().After(RunTimeMax) {
return errors.New("Redis扫描超时")
}
for _, key := range keys {
if keyErr := s.SaveV2(ctx, key, addChan, updateChan); keyErr != nil {
g.Log().Errorf(ctx, "处理key %s失败: %v", key, keyErr)
}
}
return nil
})
close(addChan)
close(updateChan)
errChan <- scanErr
}()
// 等待扫描和处理完成,同时监听上下文取消
select {
case scanErr := <-errChan:
wg.Wait() // 等待Cache2SqlChan处理完剩余数据
if scanErr != nil {
return gerror.New(fmt.Sprintf("Redis扫描失败: %v", scanErr))
}
case <-ctx.Done():
wg.Wait()
return ctx.Err() // 返回上下文取消原因
}
return
}
// SaveV2 保存游戏活动数据
//
// @Description: 保存游戏活动数据
// @receiver s *sGameAct: 游戏活动服务结构体指针
// @param ctx context.Context: 上下文对象
// @param cacheKey string: 缓存键
// @param add []*entity.GameAct: 添加数据
// @param update []*entity.GameAct: 更新数据
// @return err error: 返回错误信息
func (s *sGameAct) SaveV2(ctx context.Context, cacheKey string, addChan, updateChan chan *entity.GameAct) (err error) {
result := strings.Split(cacheKey, ":")
actId := gconv.Int(result[1])
if actId == 0 {
return
}
var uid int64
uid = gconv.Int64(result[2])
if uid == 0 {
//跳过为空的用户缓存
return
}
//获取缓存数据
cacheGet, _ := g.Redis().Get(ctx, cacheKey)
if cacheGet.IsEmpty() {
//空数据也不保存
return
}
//如果有活跃,跳过持久化
if getBool, _ := pkg.Cache("redis").
Contains(ctx, fmt.Sprintf("act:update:%d", uid)); getBool {
return
}
//获取数据库数据
var data *entity.GameAct
// 从数据库中查询活动信息
err = g.Model(Name).Where(do.GameAct{
Uid: uid,
ActId: actId,
}).Fields("uid,act_id").Scan(&data)
if err != nil {
g.Log().Errorf(ctx, "当前数据错误: %v", cacheKey)
return
}
//如果没有数据,添加
actionData := cacheGet.String()
if data == nil {
//add = append(add, &entity.GameAct{
// ActId: actId,
// Uid: uid,
// Action: actionData,
//})
addChan <- &entity.GameAct{
ActId: actId,
Uid: uid,
Action: actionData,
}
} else {
//覆盖数据
data.ActId = actId
data.Uid = uid
data.Action = actionData
//update = append(update, data)
updateChan <- data
}
return
}
// Cache2Sql 缓存持久化到数据库
// @Description: 缓存持久化到数据库
// @receiver s *sGameAct: 游戏活动服务结构体指针
// @param ctx context.Context: 上下文对象
// @param add []*entity.GameAct: 添加数据
// @param update []*entity.GameAct: 更新数据
// @return err error: 返回错误信息
func (s *sGameAct) Cache2Sql(ctx context.Context, add, update []*entity.GameAct) {
//批量写入数据库
updateCount := 0
if len(update) > 0 {
for _, v := range update {
v.UpdatedAt = gtime.Now()
updateRes, err2 := g.Model(Name).Where(do.GameAct{
Uid: v.Uid,
ActId: v.ActId,
}).Data(v).Update()
if err2 != nil {
g.Log().Error(ctx, err2)
continue
}
if row, _ := updateRes.RowsAffected(); row == 0 {
g.Log().Error(ctx, "本次更新为0更新数据失败: %v", v)
continue
}
//删除缓存
s.DelCacheKey(ctx, v.ActId, v.Uid)
updateCount++
}
g.Log().Debugf(ctx, "act当前更新数据库: %v 条", updateCount)
update = (update)[:0]
}
var addCount int64
if len(add) > 0 {
for _, v := range add {
addRes, err2 := g.Model(Name).Data(v).Insert()
if err2 != nil {
g.Log().Error(ctx, err2)
continue
}
if row, _ := addRes.RowsAffected(); row == 0 {
g.Log().Error(ctx, "本次新增为0新增数据失败: %v", v)
continue
}
addCount++
//删除缓存
s.DelCacheKey(ctx, v.ActId, v.Uid)
}
g.Log().Debugf(ctx, "act当前写入数据库: %v 条", addCount)
add = (add)[:0]
}
return
}
// Cache2AddChan 批量添加数据库
func (s *sGameAct) Cache2SqlChan(ctx context.Context, addChan, updateChan chan *entity.GameAct) {
//批量写入数据库计数
var addCount int64
//批量更新数据库计数
var updateCount int64
//通道关闭标志
addClosed := false
updateClosed := false
// 使用链式安全模式
var db = g.Model(Name).Safe()
for {
//检查是否两个通道都已关闭且为空
if addClosed && updateClosed {
break
}
select {
case v, ok := <-addChan:
if !ok {
addClosed = true // 仅标记关闭,不立即日志
continue
}
addRes, err2 := db.Data(v).Insert()
if err2 != nil {
g.Log().Error(ctx, err2)
continue
}
if row, _ := addRes.RowsAffected(); row == 0 {
//g.Log().Error(ctx, "本次新增为0新增数据失败: %v", v)
continue
}
row, _ := addRes.RowsAffected()
addCount += row
//删除缓存
s.DelCacheKey(ctx, v.ActId, v.Uid)
case v, ok := <-updateChan:
if !ok {
updateClosed = true // 仅标记关闭,不立即日志
continue
}
v.UpdatedAt = gtime.Now()
updateRes, err2 := db.Where(do.GameAct{
Uid: v.Uid,
ActId: v.ActId,
}).Data(v).Update()
if err2 != nil {
g.Log().Error(ctx, err2)
continue
}
if row, _ := updateRes.RowsAffected(); row == 0 {
//g.Log().Error(ctx, "本次更新为0更新数据失败: %v", v)
continue
}
//删除缓存
s.DelCacheKey(ctx, v.ActId, v.Uid)
updateCount++
case <-ctx.Done():
g.Log().Debug(ctx, "act协程被上下文取消")
return
}
}
// 仅在所有通道处理完毕后打印最终计数(移除中间冗余日志)
g.Log().Debugf(ctx, "act当前写入数据库: %v 条", addCount)
g.Log().Debugf(ctx, "act当前更新数据库: %v 条", updateCount)
return
}
// 删除缓存key
func (s *sGameAct) DelCacheKey(ctx context.Context, aid int, uid int64) {
//如果有活跃,跳过删除
if getBool, _ := pkg.Cache("redis").
Contains(ctx, fmt.Sprintf("act:update:%d", uid)); getBool {
return
}
cacheKey := fmt.Sprintf("act:%v:%v", aid, uid)
_, err := g.Redis().Del(ctx, cacheKey)
if err != nil {
g.Log().Error(ctx, err)
}
}
// 清空GetRedDot缓存
func (s *sGameAct) RefreshGetRedDotCache(uid int64) {
cacheKey := fmt.Sprintf("gameAct:GetRedDot:%s:%d", gtime.Now().Format("d"), uid)
_, err := pkg.Cache("redis").Remove(gctx.New(), cacheKey)
if err != nil {
g.Log().Error(gctx.New(), err)
g.Dump(err)
}
}
func (s *sGameAct) Del(uid int64, actId int) {
var ctx = gctx.New()
if uid == 0 || actId == 0 {
g.Log().Error(ctx, "当前参数为空")
return
}
// 构造缓存键名
keyCache := fmt.Sprintf("act:%v:%v", actId, uid)
//删除活动缓存
g.Redis().Del(ctx, keyCache)
//删除当前活动储存
g.Model(Name).Where(do.GameAct{
Uid: uid,
ActId: actId,
}).Delete()
}

View File

@@ -0,0 +1,137 @@
package gameKv
import (
"context"
"errors"
"fmt"
"strings"
"sync"
"time"
"github.com/ayflying/utility_go/pkg"
"github.com/ayflying/utility_go/service"
"github.com/ayflying/utility_go/tools"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/util/gconv"
)
var (
Name = "game_kv"
RunTimeMax *gtime.Time
)
type sGameKv struct {
Lock sync.Mutex
}
func New() *sGameKv {
return &sGameKv{}
}
func init() {
service.RegisterGameKv(New())
}
// SavesV1 方法
//
// @Description: 保存用户KV数据列表。
// @receiver s: sGameKv的实例。
// @return err: 错误信息如果操作成功则为nil。
func (s *sGameKv) SavesV1() (err error) {
var ctx = gctx.New()
// 最大允许执行时间
RunTimeMax = gtime.Now().Add(time.Minute * 30)
g.Log().Debug(ctx, "开始执行游戏kv数据保存")
// 定义用于存储用户数据的结构体
type ListData struct {
Uid int64 `json:"uid"`
Kv interface{} `json:"kv"`
}
var list []*ListData
// 初始化列表长度与keys数组一致
list = make([]*ListData, 0)
// 从Redis列表中获取所有用户KV索引的键
//keys, err := utils.RedisScan("user:kv:*")
err = tools.Redis.RedisScanV2("user:kv:*", func(keys []string) (err error) {
//判断是否超时
if gtime.Now().After(RunTimeMax) {
g.Log().Error(ctx, "kv执行超时了,停止执行!")
err = errors.New("kv执行超时了,停止执行!")
return
}
//需要删除的key
// 遍历keys获取每个用户的数据并填充到list中
for _, cacheKey := range keys {
//g.Log().Infof(ctx, "保存用户kv数据%v", v)
//uid := v.Int64()
//cacheKey = "user:kv:" + strconv.FormatInt(uid, 10)
result := strings.Split(cacheKey, ":")
var uid = gconv.Int64(result[2])
if uid == 0 {
continue
}
//uid, err = strconv.ParseInt(result[2], 10, 64)
if err != nil {
g.Log().Error(ctx, err)
g.Redis().Del(ctx, cacheKey)
continue
}
//如果有活跃,跳过持久化
if getBool, _ := pkg.Cache("redis").
Contains(ctx, fmt.Sprintf("act:update:%d", uid)); getBool {
continue
}
get, _ := g.Redis().Get(ctx, cacheKey)
var data interface{}
get.Scan(&data)
if data == nil {
continue
}
list = append(list, &ListData{
Uid: uid,
Kv: data,
})
}
// 将列表数据保存到数据库
if len(list) > 100 {
_, err2 := g.Model("game_kv").Data(list).Save()
if err2 != nil {
g.Log().Error(ctx, "当前kv数据入库失败: %v", err2)
err = err2
return
}
//删除当前key
for _, v := range list {
s.DelCacheKey(ctx, v.Uid)
}
list = make([]*ListData, 0)
}
return
})
return
}
// 删除缓存key
func (s *sGameKv) DelCacheKey(ctx context.Context, uid int64) {
//如果有活跃,跳过删除
if getBool, _ := pkg.Cache("redis").
Contains(ctx, fmt.Sprintf("act:update:%d", uid)); getBool {
return
}
cacheKey := fmt.Sprintf("user:kv:%v", uid)
_, err := g.Redis().Del(ctx, cacheKey)
if err != nil {
g.Log().Error(ctx, err)
}
}

View File

@@ -0,0 +1,164 @@
package ip2region
import (
"net"
"path"
"strings"
"github.com/ayflying/utility_go/service"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gfile"
"github.com/lionsoul2014/ip2region/binding/golang/xdb"
)
var (
ctx = gctx.New()
wait = false
)
const IpDbPath = "runtime/library"
type sIp2region struct {
//searcher *xdb.Searcher
searchers map[string]*xdb.Searcher
}
func New() *sIp2region {
return &sIp2region{}
}
func init() {
service.RegisterIp2Region(New())
//boot.AddFunc(func() {
// service.Ip2Region().Load()
//})
}
//func (s *sIp2region) New() *xdb.Searcher {
//
// return nil
//}
// Load 加载到内存中
//
// @Description: 加载ip2region数据库到内存中。
// @receiver s *sIp2region: sIp2region的实例。
func (s *sIp2region) Load(t *xdb.Version) {
var err error
var url string
//var dbPath = "runtime/library/ip2region.xdb"
switch t {
case xdb.IPv4:
//url = "https://github.com/ayflying/resource/raw/refs/heads/master/attachment/ip2region_v4.xdb"
url = "https://github.com/lionsoul2014/ip2region/raw/refs/heads/master/data/ip2region_v4.xdb"
case xdb.IPv6:
url = "https://github.com/lionsoul2014/ip2region/raw/refs/heads/master/data/ip2region_v6.xdb"
}
if wait {
return
}
filename := gfile.Basename(url)
var IpDbFile = path.Join(IpDbPath, filename)
g.Log().Debugf(ctx, "加载ip库文件:%v", filename)
if gfile.IsEmpty(IpDbFile) {
wait = true
defer func() {
wait = false
}()
g.Log().Debug(ctx, "等待下载ip库文件")
//下载文件
putData, err2 := g.Client().Discovery(nil).Get(ctx, url)
if err2 != nil {
return
}
err = gfile.PutBytes(IpDbFile, putData.ReadAll())
}
err = xdb.VerifyFromFile(IpDbFile)
if err != nil {
// err 包含的验证的错误
gfile.RemoveFile(IpDbFile)
g.Log().Errorf(ctx, "ip库xdb file verify: %v", err)
return
}
// 1、从 dbPath 加载 VectorIndex 缓存,把下述 vIndex 变量全局到内存里面。
vIndex, err := xdb.LoadVectorIndexFromFile(IpDbFile)
if err != nil {
g.Log().Errorf(ctx, "failed to load vector index from `%s`: %s\n", IpDbFile, err)
return
}
// 2、用全局的 vIndex 创建带 VectorIndex 缓存的查询对象。
if s.searchers == nil {
s.searchers = make(map[string]*xdb.Searcher)
}
s.searchers[t.Name], err = xdb.NewWithVectorIndex(t, IpDbFile, vIndex)
if err != nil {
g.Log().Errorf(ctx, "failed to create searcher with vector index: %s\n", err)
return
}
//cBuff := gfile.GetBytes(IpDbFile)
//// 基于读取的内容,创建查询对象
//s.searchers[t.Name], err = xdb.NewWithBuffer(t, cBuff)
//if err != nil {
// g.Log().Errorf(ctx, "无法创建内容为的搜索器: %s", err)
// return
//}
}
func (s *sIp2region) GetIp(ip string) (res []string) {
//初始化加载
//if s.searcher == nil {
// s.Load(xdb.IPv6)
//}
var searchers *xdb.Searcher
//区分ipv6与ipv4
if s.isIPv6(ip) {
if s.searchers[xdb.IPv6.Name] == nil {
s.Load(xdb.IPv6)
}
searchers = s.searchers[xdb.IPv6.Name]
} else {
if s.searchers[xdb.IPv4.Name] == nil {
s.Load(xdb.IPv4)
}
searchers = s.searchers[xdb.IPv4.Name]
}
res = make([]string, 5)
if searchers == nil {
return
}
region, err := searchers.SearchByStr(ip)
if err != nil {
return
}
res = strings.Split(region, "|")
return
}
// isIPv6 判断输入字符串是否为IPv6地址
//
// @Description: 通过解析输入的IP字符串判断其是否为IPv6地址。
// @receiver s *sIp2region: 代表`sIp2region`类型的实例,本函数中未使用,可忽略。
// @param ipStr string: 待判断的IP地址字符串。
// @return bool: 返回true表示是IPv6地址返回false表示不是IPv6地址。
func (s *sIp2region) isIPv6(ipStr string) bool {
// 尝试将输入字符串解析为IP地址
ip := net.ParseIP(ipStr)
// 尝试将IP地址转换为IPv4格式
ipv4 := ip.To4()
// 如果转换为IPv4格式不为nil则说明是IPv4地址返回false
if ipv4 != nil {
return false
}
// 如果无法转换为IPv4格式则说明是IPv6地址返回true
return true
}

View File

@@ -0,0 +1,135 @@
package logData
import (
"context"
"github.com/ayflying/utility_go/service"
"github.com/ayflying/utility_go/tools"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"time"
)
var (
ctx = gctx.New()
//pathStr = "runtime/log/logData"
//te thinkingdata.TDAnalytics
//logChannel chan map[string]interface{}
//wg sync.WaitGroup
)
type sLogData struct {
}
func New() *sLogData {
return &sLogData{}
}
func init() {
service.RegisterLogData(New())
//加载日志模块
//service.LogData().Load()
}
func (s *sLogData) Load() {
//数数科技初始化配置
//// 创建 LogConfig 配置文件
//config := thinkingdata.TDLogConsumerConfig{
// Directory: pathStr, // 事件采集的文件路径
// //FileSize: 99, //单个日志文件的最大大小MB
//}
//// 初始化 logConsumer
//consumer, _ := thinkingdata.NewLogConsumerWithConfig(config)
//// 创建 te 对象
//te = thinkingdata.New(consumer)
//日志写入通道开启
//logAppend()
}
// UserSet 方法
//
// @Description: 设置用户信息。
// @receiver s: sLogData 的实例,表示日志数据的结构体。
// @param accountId: 账户ID用于标识账户是字符串格式。
// @param uid: 用户的ID是整型的唯一标识符。
// @param data: 要设置的用户信息以键值对的形式提供是map[string]interface{}类型,支持多种用户属性。
// @return err: 执行过程中可能出现的错误如果执行成功则返回nil。
func (s *sLogData) UserSet(accountId string, uid int64, data map[string]interface{}) (err error) {
// 将用户ID转换为字符串格式的唯一标识
//distinctId := strconv.FormatInt(uid, 10)
// 使用accountId和distinctId以及data来设置用户信息此处调用外部方法完成设置。
//te.UserSet(accountId, distinctId, data)
data["#uid"] = uid
data["#time"] = time.Now()
data["#type"] = "user_set"
//data["_id"], _ = uuid.NewUUID()
//data["#name"] = name
g.Log("elk").Info(nil, data)
//todo 暂时关闭update
//err = s.Update(uid, data)
return
}
// Track 函数记录特定事件。
//
// @Description: 用于跟踪和记录一个指定事件的发生,收集相关数据。
// @receiver s: sLogData 的实例,代表日志数据的存储或处理实体。
// @param accountId: 账户ID用于标识事件所属的账户。
// @param uid: 用户的ID一个整型数值用于区分不同的用户。
// @param name: 事件名称,标识所记录的具体事件。
// @param data: 事件相关的数据映射,包含事件的详细信息。
// @return err: 错误信息如果操作成功则为nil。
func (s *sLogData) Track(ctx context.Context, accountId string, uid int64, name string, data map[string]interface{}) {
// 将用户ID转换为字符串格式的唯一标识
//distinctId := strconv.FormatInt(uid, 10)
// 调用te.Track函数来实际记录事件传入账户ID、用户唯一标识、事件名称及事件数据
//te.Track(accountId, distinctId, name, data)
if data == nil {
return
}
data["#uid"] = uid
data["#event_name"] = name
data["#time"] = time.Now()
data["#type"] = "track"
//data["_id"], _ = uuid.NewUUID()
//道具类型特殊格式化
if get, ok := data["items"]; ok {
if get != nil {
data["items"] = tools.Tools.Items2Map(get.([][]int64))
}
}
g.Log("elk").Info(nil, data)
//err = s.Add(data)
//由于实时写入日志太占用资源,关闭日志写入方法
return
}
//// 上报用不了,弃用
//func (s *sLogData) Send() (err error) {
// consumer, err := thinkingdata.NewBatchConsumer("https://yoyatime-server-release.yoyaworld.com/callback", "dev")
// te = thinkingdata.New(consumer)
// err = te.Flush()
// return
//}
//func (s *sLogData) Flush() (err error) {
// //调用flush接口数据会立即写入文件生产环境注意避免频繁调用flush引发IO或网络开销问题
// err = te.Flush()
// return
//}
//
//func (s *sLogData) Close() {
// // 关闭通道,表示没有更多的日志条目需要写入
// if logChannel != nil {
// close(logChannel)
// wg.Wait() // 等待通道监听goroutine结束
// }
//
// te.Close()
//}

16
internal/logic/logic.go Normal file
View File

@@ -0,0 +1,16 @@
// ==========================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// ==========================================================================
package logic
import (
_ "github.com/ayflying/utility_go/internal/logic/casdoor"
_ "github.com/ayflying/utility_go/internal/logic/gameAct"
_ "github.com/ayflying/utility_go/internal/logic/gameKv"
_ "github.com/ayflying/utility_go/internal/logic/ip2region"
_ "github.com/ayflying/utility_go/internal/logic/logData"
_ "github.com/ayflying/utility_go/internal/logic/os"
_ "github.com/ayflying/utility_go/internal/logic/systemCron"
_ "github.com/ayflying/utility_go/internal/logic/systemLog"
)

View File

@@ -0,0 +1,7 @@
//go:build !windows
package os
func (s *sOS) start() {
}

41
internal/logic/os/os.go Normal file
View File

@@ -0,0 +1,41 @@
package os
import (
"github.com/ayflying/utility_go/service"
"github.com/gogf/gf/v2/os/gcmd"
)
type systrayType struct {
Icon string `json:"icon" dc:"图标"`
Title string `json:"title" dc:"标题"`
Tooltip string `json:"tooltip" dc:"提示"`
}
type sOS struct {
systray *systrayType
}
func New() *sOS {
return &sOS{
systray: &systrayType{},
}
}
func init() {
service.RegisterOS(New())
}
func (s *sOS) Load(title string, tooltip string, ico string) {
if title == "" {
title = gcmd.GetArg(0).String()
}
if tooltip == "" {
tooltip = gcmd.GetArg(0).String()
}
s.systray = &systrayType{
Icon: ico,
Title: title,
Tooltip: tooltip,
}
s.start()
}

View File

@@ -0,0 +1,43 @@
//go:build windows
package os
import (
"os"
"github.com/getlantern/systray"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gfile"
)
func (s *sOS) start() {
// 系统托盘初始化(设置图标、右键菜单)
go systray.Run(s.onSystrayReady, s.onSystrayExit)
}
// 系统托盘初始化(设置图标、右键菜单)
func (s *sOS) onSystrayReady() {
iconByte := gfile.GetBytes(s.systray.Icon)
systray.SetIcon(iconByte)
systray.SetTitle(s.systray.Title)
systray.SetTooltip(s.systray.Tooltip)
mQuit := systray.AddMenuItem("退出", "退出应用")
// Sets the icon of a menu item. Only available on Mac and Windows.
//mQuit.SetIcon(iconByte)
go func() {
<-mQuit.ClickedCh
systray.Quit()
}()
}
func (s *sOS) onSystrayExit() {
// clean up here
g.Log().Debugf(gctx.New(), "系统托盘退出")
defer os.Exit(0)
}

View File

@@ -0,0 +1,55 @@
package systemCron
import (
"encoding/json"
"fmt"
v1 "github.com/ayflying/utility_go/api/pkg/v1"
"github.com/ayflying/utility_go/pkg/notice"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/gclient"
"github.com/gogf/gf/v2/os/gctx"
)
type Status struct {
Code int `json:"code"`
Message string `json:"message"`
Data struct {
Status int `json:"status"`
} `json:"data"`
}
func (s *sSystemCron) Guardian(DingTalkWebHook string) {
var list []struct {
Name string
Address string
}
cfg, _ := g.Cfg().Get(gctx.New(), "serverList")
cfg.Scan(&list)
for _, v := range list {
get, err := g.Client().Discovery(nil).Get(gctx.New(), v.Address+"/callback/status")
defer get.Close()
if err != nil {
notice.New(v1.NoticeType_DINGTALK, DingTalkWebHook).Send(fmt.Sprintf("监控报警:服务端访问失败 (%v 服务器),err=%v", v.Name, err))
} else if get.StatusCode != 200 {
notice.New(v1.NoticeType_DINGTALK, DingTalkWebHook).Send(fmt.Sprintf("监控报警:服务端访问失败 (%v 服务器),code=%v,err=%v", v.Name, get.StatusCode, err))
} else {
var ststus Status
err = json.Unmarshal(get.ReadAll(), &ststus)
if ststus.Code != 0 {
notice.New(v1.NoticeType_DINGTALK, DingTalkWebHook).Send(fmt.Sprintf("监控报警:服务端访问失败 (%v 服务器),msg=%v", v.Name, ststus.Message))
}
}
}
}
// DingTalk 发送钉钉消息
//
// @Description: 向指定的钉钉机器人发送消息。
// @receiver s: 系统定时任务结构体指针。
// @param value: 要发送的消息内容。
// Deprecated: Use message.New(message.DingTalk, DingTalkWebHook).Send(value)
func (s *sSystemCron) DingTalk(DingTalkWebHook string, value string) (res *gclient.Response) {
notice.New(v1.NoticeType_DINGTALK, DingTalkWebHook).Send(value)
return
}

View File

@@ -0,0 +1,5 @@
package systemCron
func (s *sSystemCron) ReadLog() {
}

View File

@@ -0,0 +1,387 @@
package systemCron
import (
"context"
"sync"
"time"
"github.com/ayflying/utility_go/api/system/v1"
"github.com/ayflying/utility_go/service"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gcron"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/os/gtimer"
)
var (
//ctx = gctx.New()
startTime *gtime.Time
)
// sSystemCron 结构体定义了系统定时任务的秒计时器。
// 它包含了不同时间周期的任务,如秒、分钟、小时、天、周、月、年以及特定的工作日任务。
type sSystemCron struct {
//互斥锁
Lock sync.Mutex
taskChan chan func(context.Context) error
TaskTimeout time.Duration
// 每秒执行的任务
SecondlyTask []func(context.Context) error
// 每分钟执行的任务
MinutelyTask []func(context.Context) error
// 每小时执行的任务
HourlyTask []func(context.Context) error
// 每天执行的任务
DailyTask []func(context.Context) error
// 每周执行的任务
WeeklyTask []func(context.Context) error
// 每月执行的任务
MonthlyTask []func(context.Context) error
// 每年执行的任务
YearlyTask []func(context.Context) error
// 每周一执行的任务
MondayTask []func(context.Context) error
// 每周二执行的任务
TuesdayTask []func(context.Context) error
// 每周三执行的任务
WednesdayTask []func(context.Context) error
// 每周四执行的任务
ThursdayTask []func(context.Context) error
// 每周五执行的任务
FridayTask []func(context.Context) error
// 每周六执行的任务
SaturdayTask []func(context.Context) error
// 每周日执行的任务
SundayTask []func(context.Context) error
}
func New() *sSystemCron {
return &sSystemCron{
taskChan: make(chan func(context.Context) error, 2),
TaskTimeout: time.Minute * 60,
}
}
func init() {
service.RegisterSystemCron(New())
}
// AddCron 添加一个定时任务到相应的调度列表中。
//
// @Description: 根据指定的类型将函数添加到不同的任务列表中,以供后续执行。
// 确保自定义任务正确处理上下文取消信号,即可充分发挥超时打断功能。
// @receiver s: sSystemCron的实例代表一个调度系统。
// @param typ: 任务的类型,决定该任务将被添加到哪个列表中。对应不同的时间间隔。
// @param _func: 要添加的任务函数该函数执行时应该返回一个error。
// deprecated: 弃用,请使用 AddCronV2
func (s *sSystemCron) AddCron(typ v1.CronType, _func func() error) {
//转换为带上下文的,提供打断
var _func2 = func(ctx context.Context) error {
return _func()
}
// 老版本计划任务全都是主服务器唯一执行
s.AddCronV2(typ, _func2, true)
}
// AddCronV2 添加一个定时任务到相应的调度列表中。
//
// @Description: 根据指定的类型将函数添加到不同的任务列表中,以供后续执行。
// @receiver s: sSystemCron的实例代表一个调度系统。
// @param typ: 任务的类型,决定该任务将被添加到哪个列表中。对应不同的时间间隔。
// @param _func: 要添加的任务函数该函数执行时应该返回一个error。
// @param _onlyMain: 是否只在主服务器上执行一次,true 唯一执行false 全局执行不判断唯一
func (s *sSystemCron) AddCronV2(typ v1.CronType, _func func(context.Context) error, _onlyMain ...bool) {
//如果传过来的任务是需要主服务器执行一次
if len(_onlyMain) > 0 && _onlyMain[0] {
//判断当前是否为主服务器
if !g.Cfg().MustGet(gctx.New(), "game.cron_main").Bool() {
return
}
}
//加锁
s.Lock.Lock()
defer s.Lock.Unlock()
//
//ctx := gctx.New()
//newFunc := func()
switch typ {
case v1.CronType_SECOND:
s.SecondlyTask = append(s.SecondlyTask, _func) // 将函数添加到每秒执行的任务列表中
case v1.CronType_MINUTE:
s.MinutelyTask = append(s.MinutelyTask, _func) // 将函数添加到每分钟执行的任务列表中
case v1.CronType_HOUR:
s.HourlyTask = append(s.HourlyTask, _func) // 将函数添加到每小时执行的任务列表中
case v1.CronType_DAILY:
s.DailyTask = append(s.DailyTask, _func) // 将函数添加到每日执行的任务列表中
case v1.CronType_WEEK:
s.WeeklyTask = append(s.WeeklyTask, _func) // 将函数添加到每周执行的任务列表中
case v1.CronType_MONTH:
s.MonthlyTask = append(s.MonthlyTask, _func) // 将函数添加到每月执行的任务列表中
case v1.CronType_YEAR:
s.YearlyTask = append(s.YearlyTask, _func) // 将函数添加到每年执行的任务列表中
case v1.CronType_MONDAY:
s.MondayTask = append(s.MondayTask, _func) // 将函数添加到每周一执行的任务列表中
case v1.CronType_TUESDAY:
s.TuesdayTask = append(s.TuesdayTask, _func) // 将函数添加到每周二的任务列表中
case v1.CronType_WEDNESDAY:
s.WednesdayTask = append(s.WednesdayTask, _func) // 将函数添加到每周三执行的任务列表中
case v1.CronType_THURSDAY:
s.ThursdayTask = append(s.ThursdayTask, _func) // 将函数添加到每周四执行的任务列表中
case v1.CronType_FRIDAY:
s.FridayTask = append(s.FridayTask, _func) // 将函数添加到每周五执行的任务列表中
case v1.CronType_SATURDAY:
s.SaturdayTask = append(s.SaturdayTask, _func) // 将函数添加到每周六执行的任务列表中
case v1.CronType_SUNDAY:
s.SundayTask = append(s.SundayTask, _func) // 将函数添加到每周日的任务列表中
}
}
// StartCron 开始计划任务执行
//
// @Description:
// @receiver s
// @return err
func (s *sSystemCron) StartCron() (err error) {
//如果没有数据库配置,跳过计划任务执行
if g.Cfg().MustGet(gctx.New(), "database") == nil {
return
}
//预防重复启动
if startTime != nil {
return
}
startTime = gtime.Now()
g.Log().Debug(gctx.New(), "启动计划任务定时器详情")
//每秒任务
gtimer.SetInterval(gctx.New(), time.Second, func(ctx context.Context) {
//g.Log().Debug(ctx, "每秒定时器")
s.secondlyTask()
})
//每分钟任务
_, err = gcron.AddSingleton(gctx.New(), "0 * * * * *", func(ctx context.Context) {
//g.Log().Debug(ctx, "每分钟定时器")
s.minutelyTask()
})
//每小时任务
_, err = gcron.AddSingleton(gctx.New(), "0 0 * * * *", func(ctx context.Context) {
g.Log().Debug(ctx, "每小时定时器")
s.hourlyTask()
})
//每天任务
_, err = gcron.AddSingleton(gctx.New(), "0 0 0 * * *", func(ctx context.Context) {
g.Log().Debug(ctx, "每日定时器")
s.dailyTask()
})
//每周任务
_, err = gcron.AddSingleton(gctx.New(), "0 0 0 * * 1", func(ctx context.Context) {
g.Log().Debug(ctx, "每周一定时器")
s.weeklyTask(1)
})
//每周二的任务
_, err = gcron.AddSingleton(gctx.New(), "0 0 0 * * 2", func(ctx context.Context) {
g.Log().Debug(ctx, "每周二定时器")
s.weeklyTask(2)
})
//周三任务
_, err = gcron.AddSingleton(gctx.New(), "0 0 0 * * 3", func(ctx context.Context) {
g.Log().Debug(ctx, "周三定时器")
s.weeklyTask(3)
})
//周四任务
_, err = gcron.AddSingleton(gctx.New(), "0 0 0 * * 4", func(ctx context.Context) {
g.Log().Debug(ctx, "周四定时器")
s.weeklyTask(4)
})
//周五任务
_, err = gcron.AddSingleton(gctx.New(), "0 0 0 * * 5", func(ctx context.Context) {
g.Log().Debug(ctx, "周五定时器")
s.weeklyTask(5)
})
//周六任务
_, err = gcron.AddSingleton(gctx.New(), "0 0 0 * * 6", func(ctx context.Context) {
g.Log().Debug(ctx, "周六定时器")
s.weeklyTask(6)
})
//周日任务
_, err = gcron.AddSingleton(gctx.New(), "0 0 0 * * 0", func(ctx context.Context) {
g.Log().Debug(ctx, "周日定时器")
s.weeklyTask(7)
})
//每月任务
_, err = gcron.AddSingleton(gctx.New(), "0 0 0 1 * *", func(ctx context.Context) {
g.Log().Debug(ctx, "每月定时器")
s.monthlyTask()
})
//每年任务
_, err = gcron.AddSingleton(gctx.New(), "0 0 0 1 1 *", func(ctx context.Context) {
g.Log().Debug(ctx, "每年定时器")
s.yearlyTask()
})
//统一执行方法
s.RunFuncChan()
return
}
// 每妙任务
func (s *sSystemCron) secondlyTask() {
if len(s.SecondlyTask) == 0 {
return
}
s.AddFuncChan(s.SecondlyTask)
return
}
// 每分钟任务
func (s *sSystemCron) minutelyTask() {
if len(s.MinutelyTask) == 0 {
return
}
s.AddFuncChan(s.MinutelyTask)
return
}
// 每小时任务
func (s *sSystemCron) hourlyTask() {
if len(s.HourlyTask) == 0 {
return
}
s.AddFuncChan(s.HourlyTask)
return
}
// 每天任务
func (s *sSystemCron) dailyTask() {
if len(s.DailyTask) == 0 {
return
}
s.AddFuncChan(s.DailyTask)
return
}
// 每周任务
func (s *sSystemCron) weeklyTask(day int) {
var arr []func(context.Context) error
switch day {
case 1:
arr = s.MondayTask
case 2:
arr = s.TuesdayTask
case 3:
arr = s.WednesdayTask
case 4:
arr = s.ThursdayTask
case 5:
arr = s.FridayTask
case 6:
arr = s.SaturdayTask
case 7:
arr = s.SundayTask
default:
arr = s.WeeklyTask
return
}
if len(arr) == 0 {
return
}
s.AddFuncChan(arr)
return
}
// 每月任务
func (s *sSystemCron) monthlyTask() {
if len(s.MonthlyTask) == 0 {
return
}
s.AddFuncChan(s.MonthlyTask)
return
}
//每年任务
func (s *sSystemCron) yearlyTask() {
if len(s.YearlyTask) == 0 {
return
}
s.AddFuncChan(s.YearlyTask)
}
// AddFuncChan 添加方法到通道
func (s *sSystemCron) AddFuncChan(list []func(context.Context) error) {
for _, v := range list {
s.taskChan <- v
}
}
// RunFuncChan 统一执行方法
func (s *sSystemCron) RunFuncChan() {
go func() {
for task := range s.taskChan {
//ctx := gctx.New()
func() {
//超时释放资源
ctx, cancel := context.WithTimeout(gctx.New(), s.TaskTimeout)
defer cancel()
// 使用匿名函数包裹来捕获 panic
defer func() {
if r := recover(); r != nil {
g.Log().Errorf(gctx.New(), "执行函数时发生 panic: %v", r)
}
}()
done := make(chan error)
go func() {
done <- task(ctx)
}()
//err := task()
//if err != nil {
// g.Log().Error(ctx, err)
//}
select {
case taskErr := <-done:
if taskErr != nil {
// 使用新上下文记录错误
g.Log().Error(gctx.New(), taskErr)
}
case <-ctx.Done(): // 监听上下文取消(包括超时)
g.Log().Errorf(gctx.New(), "task timeout:%v", ctx.Err())
}
}()
}
}()
}
// RunFunc 统一执行方法
// deprecated: 弃用会造成周期任务并发执行to service.SystemCron().AddFuncChan
func (s *sSystemCron) RunFunc(list []func() error) {
for _, _func := range list {
ctx := gctx.New()
func() {
// 使用匿名函数包裹来捕获 panic
defer func() {
if r := recover(); r != nil {
g.Log().Errorf(ctx, "执行函数时发生 panic: %v", r)
}
}()
err := _func()
if err != nil {
g.Log().Error(ctx, err)
}
}()
}
return
}

View File

@@ -0,0 +1,66 @@
package systemLog
import (
"context"
v1 "github.com/ayflying/utility_go/api/admin/v1"
"github.com/ayflying/utility_go/service"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
)
type sSystemLog struct {
ctx context.Context
}
var (
ctx = gctx.New()
//db = dao.AdminSystemLog.Ctx(ctx)
name = "system_log"
)
func init() {
service.RegisterSystemLog(New())
}
func New() *sSystemLog {
return &sSystemLog{}
}
func (s *sSystemLog) List(page int) (list []*v1.SystemLog, max int, err error) {
//var list = []*AdminSystemLog{}
max, _ = g.Model(name).Count()
g.Model(name).OrderDesc("created_at").Page(page, 100).Scan(&list)
return
}
// 写入操作日志
func (s *sSystemLog) AddLog(uid int, url string, ip string, data g.Map) (id int64, err error) {
//跳过空日志
if data == nil {
return
}
//如果存在这些值,直接跳过不写入日志
paichu := []string{
"/api/install",
"/activity/url/log/add",
"/system/update",
"/api/cdkey",
}
for _, item := range paichu {
if item == url {
return
}
}
var post v1.SystemLog
//uid := g.RequestFromCtx(ctx).Header.Get("x-uid")
post.Uid = uid
post.Url = url
post.Ip = ip
post.Data = data
id, err = g.Model(name).InsertAndGetId(post)
return
}

View File

@@ -0,0 +1,18 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityFans is the golang structure of table shiningu_community_fans for DAO operations like Where/Data.
type CommunityFans struct {
g.Meta `orm:"table:shiningu_community_fans, do:true"`
Uid interface{} // 用户编号
Fans interface{} // 粉丝编号
CreatedAt *gtime.Time // 关注时间
}

View File

@@ -0,0 +1,19 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityFeeds is the golang structure of table shiningu_community_feeds for DAO operations like Where/Data.
type CommunityFeeds struct {
g.Meta `orm:"table:shiningu_community_feeds, do:true"`
Id interface{} // 流水
Uid interface{} //
PostId interface{} // 帖子编号
CreatedAt *gtime.Time // 创建时间
}

View File

@@ -0,0 +1,23 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityGift is the golang structure of table shiningu_community_gift for DAO operations like Where/Data.
type CommunityGift struct {
g.Meta `orm:"table:shiningu_community_gift, do:true"`
Id interface{} //
Uid interface{} // 收礼玩家编号
FromUid interface{} // 送礼玩家编号
Type interface{} // 送礼类型
Pid interface{} // 帖子编号
ItemId interface{} // 礼物编号
Count interface{} // 礼物数量
CreatedAt *gtime.Time // 创建时间
}

View File

@@ -0,0 +1,16 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// CommunityMenu is the golang structure of table shiningu_community_menu for DAO operations like Where/Data.
type CommunityMenu struct {
g.Meta `orm:"table:shiningu_community_menu, do:true"`
Id interface{} //
Name interface{} // 栏目名称
}

View File

@@ -0,0 +1,25 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityNotice is the golang structure of table shiningu_community_notice for DAO operations like Where/Data.
type CommunityNotice struct {
g.Meta `orm:"table:shiningu_community_notice, do:true"`
Id interface{} //
Uid interface{} // 用户编号
FromUid interface{} // 对方用户编号
Type interface{} // 类型
Sid interface{} // 来源编号
Content interface{} // 正文
Extend interface{} // 附加属性
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
Status interface{} // 通知状态
}

View File

@@ -0,0 +1,38 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityPosts is the golang structure of table shiningu_community_posts for DAO operations like Where/Data.
type CommunityPosts struct {
g.Meta `orm:"table:shiningu_community_posts, do:true"`
Id interface{} // 帖子编号
Tid interface{} // 帖子栏目
Uid interface{} // 发布者
Click interface{} // 点击数
LikeCount interface{} // 点赞数量
CollectCount interface{} // 收藏数量
Popularity interface{} // 人气度热度
Charm interface{} // 魅力值
Language interface{} // 语言
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
DeletedAt *gtime.Time // 删除时间
Topic1 interface{} // 话题1
Topic2 interface{} // 话题2
Status interface{} // 帖子状态 -1限流 0 正常
Recommend interface{} // 小编推荐
Extend interface{} // 附加信息
At interface{} // 用户的at功能
Period interface{} // 最新期数
Price interface{} // 当前价格
Index interface{} // 索引编号
Gesture interface{} // 手势
CharacterNum interface{} // 角色数量
}

View File

@@ -0,0 +1,28 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// CommunityPosts0 is the golang structure of table shiningu_community_posts_0 for DAO operations like Where/Data.
type CommunityPosts0 struct {
g.Meta `orm:"table:shiningu_community_posts_0, do:true"`
Id interface{} // 帖子编号
Title interface{} // 标题
Content interface{} // 帖子正文
Images interface{} // 帖子图片批量
Image interface{} // 图片
ImagesRatio interface{} // 图片长宽比
Like interface{} // 点赞
Collect interface{} // 收藏
Extend interface{} // 附加信息
At interface{} // at
Data interface{} // 内容属性
UseIds interface{} // 最新期数
Share interface{} // 分享帖子
AiScore interface{} //
}

View File

@@ -0,0 +1,28 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// CommunityPosts1 is the golang structure of table shiningu_community_posts_1 for DAO operations like Where/Data.
type CommunityPosts1 struct {
g.Meta `orm:"table:shiningu_community_posts_1, do:true"`
Id interface{} // 帖子编号
Title interface{} // 标题
Content interface{} // 帖子正文
Images interface{} // 帖子图片批量
Image interface{} // 图片
ImagesRatio interface{} // 图片长宽比
Like interface{} // 点赞
Collect interface{} // 收藏
Extend interface{} // 附加信息
At interface{} // at
Data interface{} // 内容属性
UseIds interface{} // 最新期数
Share interface{} // 分享帖子
AiScore interface{} //
}

View File

@@ -0,0 +1,17 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// CommunityPostsDetails is the golang structure of table shiningu_community_posts_details for DAO operations like Where/Data.
type CommunityPostsDetails struct {
g.Meta `orm:"table:shiningu_community_posts_details, do:true"`
Id interface{} //
Attachment interface{} // 帖子附件
SlotsImg interface{} // 槽位图片
}

View File

@@ -0,0 +1,17 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityPostsHotDel is the golang structure of table shiningu_community_posts_hot_del for DAO operations like Where/Data.
type CommunityPostsHotDel struct {
g.Meta `orm:"table:shiningu_community_posts_hot_del, do:true"`
Id interface{} // 帖子编号
CreatedAt *gtime.Time // 创建时间
}

View File

@@ -0,0 +1,19 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityPostsRecommend is the golang structure of table shiningu_community_posts_recommend for DAO operations like Where/Data.
type CommunityPostsRecommend struct {
g.Meta `orm:"table:shiningu_community_posts_recommend, do:true"`
Pid interface{} // 帖子编号
Type interface{} // 推荐类型
CreatedAt *gtime.Time // 创建时间
EndTime *gtime.Time // 结束时间
}

View File

@@ -0,0 +1,28 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityPostsReply is the golang structure of table shiningu_community_posts_reply for DAO operations like Where/Data.
type CommunityPostsReply struct {
g.Meta `orm:"table:shiningu_community_posts_reply, do:true"`
Id interface{} // 唯一id
Pid interface{} // 主贴id
Uid interface{} //
Uid2 interface{} // 被回复者的uid
Content interface{} // 正文
Extend interface{} // 附加数据
TopId interface{} // 上级id
CreatedAt *gtime.Time // 创建时间
Sort interface{} // 跟帖顺序
AiScore interface{} // 机器评分
Status interface{} // 状态
At interface{} // 用户的at功能
Like interface{} // 回复点赞
}

View File

@@ -0,0 +1,22 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// CommunityUser is the golang structure of table shiningu_community_user for DAO operations like Where/Data.
type CommunityUser struct {
g.Meta `orm:"table:shiningu_community_user, do:true"`
Uid interface{} //
Like interface{} // 点赞
Like2 interface{} // 帖子回复点赞
Collect interface{} // 收藏
FollowNum interface{} // 关注数量
FansNum interface{} // 粉丝数量
Gift interface{} // 礼物值
Blacklist interface{} // 黑名单
}

View File

@@ -0,0 +1,25 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// ConfigAct is the golang structure of table shiningu_config_act for DAO operations like Where/Data.
type ConfigAct struct {
g.Meta `orm:"table:shiningu_config_act, do:true"`
Id interface{} // 流水编号
Type interface{} // 活动类型
Actid interface{} // 活动编号
Name interface{} // 活动名称
Hid interface{} // 活动标识
Data interface{} // 活动数据
StartTime *gtime.Time // 开始时间
EndTime *gtime.Time // 结束时间
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
}

View File

@@ -0,0 +1,32 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// ConfigModalBox is the golang structure of table shiningu_config_modal_box for DAO operations like Where/Data.
type ConfigModalBox struct {
g.Meta `orm:"table:shiningu_config_modal_box, do:true"`
Id interface{} // 主键
ModalBoxId interface{} // 弹框id
UserType interface{} // 特定用户
Tips interface{} // 弹框tips选项
Name interface{} // 名称
Title interface{} // 标题
Content interface{} // 正文
Type interface{} // 类型
Style interface{} // 样式
Weight interface{} // 权重
Attachments interface{} // 附件
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
Status interface{} // 状态 1开始 0关闭
Notes interface{} // 备注
StartTime *gtime.Time // 开始时间
EndTime *gtime.Time // 结束时间
}

View File

@@ -0,0 +1,19 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// GameAct is the golang structure of table shiningu_game_act for DAO operations like Where/Data.
type GameAct struct {
g.Meta `orm:"table:shiningu_game_act, do:true"`
Uid interface{} // 玩家编号
ActId interface{} // 活动编号
Action interface{} // 活动配置
UpdatedAt *gtime.Time // 更新时间
}

View File

@@ -0,0 +1,18 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// GameBag is the golang structure of table shiningu_game_bag for DAO operations like Where/Data.
type GameBag struct {
g.Meta `orm:"table:shiningu_game_bag, do:true"`
Uid interface{} // 用户标识
List interface{} // 道具数据
Book interface{} // 图鉴
Hand interface{} // 手势
}

View File

@@ -0,0 +1,19 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// GameConfig is the golang structure of table shiningu_game_config for DAO operations like Where/Data.
type GameConfig struct {
g.Meta `orm:"table:shiningu_game_config, do:true"`
Name interface{} // 配置名称
Data interface{} // 配置内容
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
}

View File

@@ -0,0 +1,18 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// GameKv is the golang structure of table shiningu_game_kv for DAO operations like Where/Data.
type GameKv struct {
g.Meta `orm:"table:shiningu_game_kv, do:true"`
Uid interface{} // 用户
Kv interface{} // 变量
UpdatedAt *gtime.Time // 更新时间
}

View File

@@ -0,0 +1,27 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// GameMail is the golang structure of table shiningu_game_mail for DAO operations like Where/Data.
type GameMail struct {
g.Meta `orm:"table:shiningu_game_mail, do:true"`
Id interface{} // 流水
Uid interface{} // 用户标识
Type interface{} // 类型
Title interface{} // 标题
Content interface{} // 正文
Items interface{} // 奖励道具
HaveItems interface{} // 是否有附件
CreatedAt *gtime.Time // 创建时间
Sign interface{} // 署名
EndTime *gtime.Time // 结束时间
Extend interface{} // 附加参数
Status interface{} // 状态
}

View File

@@ -0,0 +1,23 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// GameMailMass is the golang structure of table shiningu_game_mail_mass for DAO operations like Where/Data.
type GameMailMass struct {
g.Meta `orm:"table:shiningu_game_mail_mass, do:true"`
Id interface{} // 主键
Title interface{} // 标题
Type interface{} // 类型
Content interface{} // 正文
CreatedAt *gtime.Time // 创建时间
Items interface{} // 奖励
Sign interface{} // 署名
EndTime *gtime.Time // 结束时间
}

View File

@@ -0,0 +1,16 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// GameMailUser is the golang structure of table shiningu_game_mail_user for DAO operations like Where/Data.
type GameMailUser struct {
g.Meta `orm:"table:shiningu_game_mail_user, do:true"`
Uid interface{} //
Mass interface{} // 群发邮件领取列表
}

View File

@@ -0,0 +1,29 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// GamePay is the golang structure of table shiningu_game_pay for DAO operations like Where/Data.
type GamePay struct {
g.Meta `orm:"table:shiningu_game_pay, do:true"`
OrderId interface{} // 订单编号
Uid interface{} //
TerraceOrderId interface{} // 平台订单id
Device interface{} // 设备名称
Channel interface{} // 支付渠道
ShopId interface{} // 商品id
Cent interface{} // 美分(不要使用小数点)
PackageName interface{} // 包名
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
PayTime *gtime.Time // 支付时间
Status interface{} // 状态
Token interface{} // 支付标识
Ip interface{} // ip地址
}

View File

@@ -0,0 +1,25 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// GameRank is the golang structure of table shiningu_game_rank for DAO operations like Where/Data.
type GameRank struct {
g.Meta `orm:"table:shiningu_game_rank, do:true"`
Key interface{} //
RankId interface{} // 排行榜编号
Type interface{} // 排行榜类型
Data interface{} // 数据
CreatedAt *gtime.Time // 排行榜创建时间
StartTime *gtime.Time // 榜单开始时间
EndTime *gtime.Time // 榜单结束时间
Status interface{} //
Image interface{} // 结算封面
FirstUid interface{} // 第一名的用户id
}

View File

@@ -0,0 +1,20 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// GameStage is the golang structure of table shiningu_game_stage for DAO operations like Where/Data.
type GameStage struct {
g.Meta `orm:"table:shiningu_game_stage, do:true"`
Uid interface{} // 用户标识
Chapter interface{} // 章节
WinData interface{} // 通关过的数据
StageData interface{} // 关卡数据
Star interface{} // 章节获得的总星
RwdData interface{} // 通关奖励领取
}

View File

@@ -0,0 +1,21 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// MemberAuthorize is the golang structure of table shiningu_member_authorize for DAO operations like Where/Data.
type MemberAuthorize struct {
g.Meta `orm:"table:shiningu_member_authorize, do:true"`
Code interface{} // 授权码
Uid interface{} // 用户标识
Type interface{} // 认证方式
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
CreateIp interface{} // 创建ip
}

View File

@@ -0,0 +1,18 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// MemberBan is the golang structure of table shiningu_member_ban for DAO operations like Where/Data.
type MemberBan struct {
g.Meta `orm:"table:shiningu_member_ban, do:true"`
Uid interface{} // 用户编号
CreatedAt *gtime.Time // 禁用时间
Type interface{} // 禁用类型
}

View File

@@ -0,0 +1,18 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// MemberFriend is the golang structure of table shiningu_member_friend for DAO operations like Where/Data.
type MemberFriend struct {
g.Meta `orm:"table:shiningu_member_friend, do:true"`
Uid interface{} // 当前用户
Uid2 interface{} // 对方编号
CreatedAt *gtime.Time // 创建时间
}

View File

@@ -0,0 +1,18 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// MemberLimit is the golang structure of table shiningu_member_limit for DAO operations like Where/Data.
type MemberLimit struct {
g.Meta `orm:"table:shiningu_member_limit, do:true"`
Uid interface{} // 用户uid
CreatedAt *gtime.Time // 创建时间
Data interface{} // 玩家权限
}

View File

@@ -0,0 +1,24 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// MemberSave is the golang structure of table shiningu_member_save for DAO operations like Where/Data.
type MemberSave struct {
g.Meta `orm:"table:shiningu_member_save, do:true"`
Uid interface{} // 用户编号
Type interface{} // 存档类型
Slot interface{} // 存档槽位
Data interface{} // 存档内容
S3 interface{} // s3地址
UpdatedAt *gtime.Time // 更新时间
Name interface{} // 自定义名字
Image interface{} // 上传图片
UseIds interface{} // 使用的道具id
}

View File

@@ -0,0 +1,42 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// MemberUser is the golang structure of table shiningu_member_user for DAO operations like Where/Data.
type MemberUser struct {
g.Meta `orm:"table:shiningu_member_user, do:true"`
Uid interface{} // 用户标识
Guid interface{} // 用户本次登录标识
Gid interface{} // 用户组编号
AccountLogin interface{} // 社交账号登录
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
DeletedAt *gtime.Time // 删除时间
Nickname interface{} // 昵称
Phone interface{} // 绑定手机
Email interface{} // 绑定邮箱
Money interface{} // 充值货币
Save interface{} // 储存路径
Slots interface{} // 槽位数量
OnlineDuration interface{} // 在线时长
OnlineStatus interface{} // 在线状态
OnlineTime *gtime.Time // 上线时间
OfflineTime *gtime.Time // 离线时间
CreateIp interface{} // 创号ip地址
UpdateIp interface{} // 更新IP地址
Level interface{} // 等级
Exp interface{} // 经验
Title interface{} // 称号
Avatar interface{} // 头像
AvatarFrame interface{} // 头像框
Popularity interface{} // 人气度
Charm interface{} // 魅力值
Gift interface{} // 礼物值
}

View File

@@ -0,0 +1,15 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// SystemCron is the golang structure of table shiningu_system_cron for DAO operations like Where/Data.
type SystemCron struct {
g.Meta `orm:"table:shiningu_system_cron, do:true"`
Id interface{} // 编号
}

View File

@@ -0,0 +1,21 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SystemLog is the golang structure of table shiningu_system_log for DAO operations like Where/Data.
type SystemLog struct {
g.Meta `orm:"table:shiningu_system_log, do:true"`
Id interface{} // 主键
Uid interface{} // 操作的用户
Url interface{} // 当前访问的url
Data interface{} // 操作数据
CreatedAt *gtime.Time // 创建时间
Ip interface{} // 当前ip地址
}

View File

@@ -0,0 +1,23 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SystemReport is the golang structure of table shiningu_system_report for DAO operations like Where/Data.
type SystemReport struct {
g.Meta `orm:"table:shiningu_system_report, do:true"`
Id interface{} //
Rid interface{} // 举报id
Uid interface{} // 举报人编号
Type interface{} // 举报类型
Desc interface{} // 举报正文
CreatedAt *gtime.Time // 举报时间
DeletedAt *gtime.Time // 删除时间
Status interface{} // 处理状态
}

View File

@@ -0,0 +1,17 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// SystemSetting is the golang structure of table shiningu_system_setting for DAO operations like Where/Data.
type SystemSetting struct {
g.Meta `orm:"table:shiningu_system_setting, do:true"`
Name interface{} // 配置名称
Value interface{} // 配置详情
Type interface{} // 类型
}

View File

@@ -0,0 +1,18 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// SystemStatistics is the golang structure of table shiningu_system_statistics for DAO operations like Where/Data.
type SystemStatistics struct {
g.Meta `orm:"table:shiningu_system_statistics, do:true"`
Id interface{} // 流水号
AppId interface{} // 应用编号
Key interface{} // 唯一缓存key
Data interface{} // 数据
}

View File

@@ -0,0 +1,16 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityFans is the golang structure for table community_fans.
type CommunityFans struct {
Uid int64 `json:"uid" orm:"uid" description:"用户编号"` // 用户编号
Fans int64 `json:"fans" orm:"fans" description:"粉丝编号"` // 粉丝编号
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"关注时间"` // 关注时间
}

View File

@@ -0,0 +1,17 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityFeeds is the golang structure for table community_feeds.
type CommunityFeeds struct {
Id int `json:"id" orm:"id" description:"流水"` // 流水
Uid int64 `json:"uid" orm:"uid" description:""` //
PostId int `json:"post_id" orm:"post_id" description:"帖子编号"` // 帖子编号
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"` // 创建时间
}

View File

@@ -0,0 +1,21 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityGift is the golang structure for table community_gift.
type CommunityGift struct {
Id int `json:"id" orm:"id" description:""` //
Uid int64 `json:"uid" orm:"uid" description:"收礼玩家编号"` // 收礼玩家编号
FromUid int64 `json:"from_uid" orm:"fromUid" description:"送礼玩家编号"` // 送礼玩家编号
Type int `json:"type" orm:"type" description:"送礼类型"` // 送礼类型
Pid int `json:"pid" orm:"pid" description:"帖子编号"` // 帖子编号
ItemId int64 `json:"item_id" orm:"itemId" description:"礼物编号"` // 礼物编号
Count int `json:"count" orm:"count" description:"礼物数量"` // 礼物数量
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"` // 创建时间
}

View File

@@ -0,0 +1,11 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
// CommunityMenu is the golang structure for table community_menu.
type CommunityMenu struct {
Id int `json:"id" orm:"id" description:""` //
Name string `json:"name" orm:"name" description:"栏目名称"` // 栏目名称
}

View File

@@ -0,0 +1,23 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityNotice is the golang structure for table community_notice.
type CommunityNotice struct {
Id int `json:"id" orm:"id" description:""` //
Uid int64 `json:"uid" orm:"uid" description:"用户编号"` // 用户编号
FromUid int64 `json:"from_uid" orm:"from_uid" description:"对方用户编号"` // 对方用户编号
Type int `json:"type" orm:"type" description:"类型"` // 类型
Sid int `json:"sid" orm:"sid" description:"来源编号"` // 来源编号
Content string `json:"content" orm:"content" description:"正文"` // 正文
Extend string `json:"extend" orm:"extend" description:"附加属性"` // 附加属性
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"` // 更新时间
Status int `json:"status" orm:"status" description:"通知状态"` // 通知状态
}

View File

@@ -0,0 +1,36 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityPosts is the golang structure for table community_posts.
type CommunityPosts struct {
Id int `json:"id" orm:"id" description:"帖子编号"` // 帖子编号
Tid int `json:"tid" orm:"tid" description:"帖子栏目"` // 帖子栏目
Uid int64 `json:"uid" orm:"uid" description:"发布者"` // 发布者
Click int64 `json:"click" orm:"click" description:"点击数"` // 点击数
LikeCount int `json:"like_count" orm:"like_count" description:"点赞数量"` // 点赞数量
CollectCount int `json:"collect_count" orm:"collect_count" description:"收藏数量"` // 收藏数量
Popularity int `json:"popularity" orm:"popularity" description:"人气度热度"` // 人气度热度
Charm int `json:"charm" orm:"charm" description:"魅力值"` // 魅力值
Language string `json:"language" orm:"language" description:"语言"` // 语言
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"` // 更新时间
DeletedAt *gtime.Time `json:"deleted_at" orm:"deleted_at" description:"删除时间"` // 删除时间
Topic1 int `json:"topic_1" orm:"topic1" description:"话题1"` // 话题1
Topic2 int `json:"topic_2" orm:"topic2" description:"话题2"` // 话题2
Status int `json:"status" orm:"status" description:"帖子状态 -1限流 0 正常"` // 帖子状态 -1限流 0 正常
Recommend int `json:"recommend" orm:"recommend" description:"小编推荐"` // 小编推荐
Extend string `json:"extend" orm:"extend" description:"附加信息"` // 附加信息
At string `json:"at" orm:"at" description:"用户的at功能"` // 用户的at功能
Period int `json:"period" orm:"period" description:"最新期数"` // 最新期数
Price int `json:"price" orm:"price" description:"当前价格"` // 当前价格
Index int `json:"index" orm:"index" description:"索引编号"` // 索引编号
Gesture int `json:"gesture" orm:"gesture" description:"手势"` // 手势
CharacterNum int `json:"character_num" orm:"character_num" description:"角色数量"` // 角色数量
}

View File

@@ -0,0 +1,23 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
// CommunityPosts0 is the golang structure for table community_posts_0.
type CommunityPosts0 struct {
Id int `json:"id" orm:"id" description:"帖子编号"` // 帖子编号
Title string `json:"title" orm:"title" description:"标题"` // 标题
Content string `json:"content" orm:"content" description:"帖子正文"` // 帖子正文
Images string `json:"images" orm:"images" description:"帖子图片批量"` // 帖子图片批量
Image string `json:"image" orm:"image" description:"图片"` // 图片
ImagesRatio string `json:"images_ratio" orm:"images_ratio" description:"图片长宽比"` // 图片长宽比
Like string `json:"like" orm:"like" description:"点赞"` // 点赞
Collect string `json:"collect" orm:"collect" description:"收藏"` // 收藏
Extend string `json:"extend" orm:"extend" description:"附加信息"` // 附加信息
At string `json:"at" orm:"at" description:"at"` // at
Data string `json:"data" orm:"data" description:"内容属性"` // 内容属性
UseIds string `json:"use_ids" orm:"use_ids" description:"最新期数"` // 最新期数
Share string `json:"share" orm:"share" description:"分享帖子"` // 分享帖子
AiScore int `json:"ai_score" orm:"ai_score" description:""` //
}

Some files were not shown because too many files have changed in this diff Show More