This commit is contained in:
孟帅
2025-10-25 00:35:30 +08:00
parent 5ebc33f28b
commit 7313d22cdb
168 changed files with 2349 additions and 1455 deletions

View File

@@ -6,13 +6,13 @@
</p> </p>
<p align="center"> <p align="center">
<a href="https://goframe.org/pages/viewpage.action?pageId=1114119" target="_blank"> <a href="https://goframe.org/pages/viewpage.action?pageId=1114119" target="_blank">
<img src="https://img.shields.io/badge/goframe-2.9.0-green" alt="goframe"> <img src="https://img.shields.io/badge/goframe-2.9.4-green" alt="goframe">
</a> </a>
<a href="https://v3.vuejs.org/" target="_blank"> <a href="https://v3.vuejs.org/" target="_blank">
<img src="https://img.shields.io/badge/vue.js-vue3.4-green" alt="vue"> <img src="https://img.shields.io/badge/vue.js-vue3.4-green" alt="vue">
</a> </a>
<a href="https://www.naiveui.com" target="_blank"> <a href="https://www.naiveui.com" target="_blank">
<img src="https://img.shields.io/badge/naiveui-%3E2.42.0-blue" alt="naiveui"> <img src="https://img.shields.io/badge/naiveui-%3E2.43.1-blue" alt="naiveui">
</a> </a>
<a href="https://www.tslang.cn/" target="_blank"> <a href="https://www.tslang.cn/" target="_blank">
<img src="https://img.shields.io/badge/typescript-%3E4.0.0-blue" alt="typescript"> <img src="https://img.shields.io/badge/typescript-%3E4.0.0-blue" alt="typescript">
@@ -136,7 +136,7 @@
* 本项目包含的第三方源码和二进制文件之版权信息另行标注。 * 本项目包含的第三方源码和二进制文件之版权信息另行标注。
* 版权所有Copyright © 2020-2025 by Ms (https://github.com/bufanyun/hotgo) * 版权所有Copyright © 2020-2026 by Ms (https://github.com/bufanyun/hotgo)
* All rights reserved。 * All rights reserved。
@@ -158,7 +158,7 @@
## License ## License
[MIT © HotGo-2025](./LICENSE) [MIT © HotGo-2026](./LICENSE)

View File

@@ -27,6 +27,7 @@
- [WebSocket服务器](sys-websocket-server.md) - [WebSocket服务器](sys-websocket-server.md)
- [TCP服务器](sys-tcp-server.md) - [TCP服务器](sys-tcp-server.md)
- [SaaS多租户](sys-tenant.md) - [SaaS多租户](sys-tenant.md)
- [国际化](sys-i18n.md)
- [单元测试](sys-test.md) - [单元测试](sys-test.md)

View File

@@ -12,6 +12,19 @@
> 如果升级(覆盖)代码后打开会出现 sql 报错, 请检查更新的数据库格式或自行调整 > 如果升级(覆盖)代码后打开会出现 sql 报错, 请检查更新的数据库格式或自行调整
### v2.18.6
updated 2025.10.25
- 新增国际化i18n支持内置简体中文、繁体中文、英文三种语言包
- 新增:附件管理支持外链图片转存至系统存储驱动
- 优化:全局微信公众号实例初始化逻辑,`AccessToken` 获取方式调整为稳定版接口
- 优化:菜单权限搜索功能,支持按菜单名称或路由地址进行检索
- 优化:角色权限管理中的菜单权限分配交互体验
- 优化naive-ui版本升级到2.43.1
- 优化gf版本升级到v2.9.4
- 修复:删除角色导致关联用户无法登录的问题,新增角色删除前置校验(检查是否存在关联用户)
### v2.17.8 ### v2.17.8
updated 2025.7.13 updated 2025.7.13

View File

@@ -0,0 +1,73 @@
## 国际化
目录
- 介绍
- 配置文件
- 服务端使用
- Web端使用
- 更多文档
### 介绍
`v2.18.6`版本开始HotGo 提供了完善的国际化i18n支持内置简体中文、繁体中文和英文三种语言包默认语言为简体中文。目前已对后台管理首页进行了多语言适配开发者可基于该机制扩展实现业务模块的多语言功能。
### 配置文件
国际化配置位于 `server/manifest/config/config.yaml` 文件中:
```yaml
# hotgo系统配置
system:
# ...
# 国际化
i18n:
switch: true # 国际化功能开关可选值false|true默认true
defaultLanguage: "zh-CN" # 默认语言可选值zh-CN|zh-TW|en默认zh-CN
```
### 服务端使用
多语言配置文件存放目录:`server/manifest/i18n`,您可以在该目录下添加自定义的语言映射文件。
**使用示例:**
```go
// 设置当前上下文的语言为英文
ctx := gctx.New()
gi18n.WithLanguage(ctx, "en")
// 基础翻译
gi18n.T(ctx, "你好,美丽世界")
// 输出Hello, Beautiful World
// 格式化翻译(支持参数替换)
gi18n.Tf(ctx, "剩余%v余额", 100)
// 输出Remaining 100 Balance
```
### Web端使用
多语言配置文件存放目录:`web/src/locale`,您可以在该目录下添加自定义的语言映射文件。
> 提示:启用国际化功能后,后台管理界面右上角将显示语言切换选项。
**使用示例(假设当前语言为英文):**
```vue
<!-- 基础翻译 -->
<div>{{ t('你好,美丽世界') }}</div>
<!-- 输出Hello, Beautiful World -->
<!-- 格式化翻译支持参数替换 -->
<div>{{ t('剩余{num}余额', {num:100}) }}</div>
<!-- 输出Remaining 100 Balance -->
```
### 更多文档
- [gi18n](https://goframe.org/docs/core/gi18n)
- [vie-i18n](https://vue-i18n.intlify.dev)

View File

@@ -77,6 +77,9 @@ type SiteLoginConfigReq struct {
type SiteLoginConfigRes struct { type SiteLoginConfigRes struct {
*model.LoginConfig *model.LoginConfig
I18nSwitch bool `json:"i18nSwitch" dc:"国际化开关"`
DefaultLanguage string `json:"defaultLanguage" dc:"默认语言设置"`
ProjectName string `json:"projectName" dc:"项目名称"`
} }
// SitePingReq ping // SitePingReq ping

View File

@@ -36,3 +36,13 @@ type UploadPartReq struct {
type UploadPartRes struct { type UploadPartRes struct {
*sysin.UploadPartModel *sysin.UploadPartModel
} }
// ImageTransferStorageReq 图片链接转存
type ImageTransferStorageReq struct {
g.Meta `path:"/upload/imageTransferStorage" tags:"附件" method:"post" summary:"图片链接转存"`
sysin.ImageTransferStorageInp
}
type ImageTransferStorageRes struct {
*sysin.ImageTransferStorageModel
}

View File

@@ -1,9 +1,9 @@
// Package optiontreedemo // Package optiontreedemo
// @Link https://github.com/bufanyun/hotgo // @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2024 HotGo CLI // @Copyright Copyright (c) 2025 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
// @AutoGenerate Version 2.15.7 // @AutoGenerate Version 2.17.8
package optiontreedemo package optiontreedemo
import ( import (

View File

@@ -14,17 +14,18 @@ require (
github.com/forgoer/openssl v1.6.1 github.com/forgoer/openssl v1.6.1
github.com/go-pay/crypto v0.0.1 github.com/go-pay/crypto v0.0.1
github.com/go-pay/gopay v1.5.114 github.com/go-pay/gopay v1.5.114
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.0 github.com/go-pay/smap v0.0.2
github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.0 github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.4
github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.4
github.com/gogf/gf/contrib/trace/jaeger/v2 v2.7.4 github.com/gogf/gf/contrib/trace/jaeger/v2 v2.7.4
github.com/gogf/gf/v2 v2.9.1-0.20250624075347-5fa656d1cc92 github.com/gogf/gf/v2 v2.9.4
github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f
github.com/golang-jwt/jwt/v5 v5.2.2 github.com/golang-jwt/jwt/v5 v5.2.2
github.com/gorilla/websocket v1.5.3 github.com/gorilla/websocket v1.5.3
github.com/kayon/iploc v0.0.0-20200312105652-bda3e968a794 github.com/kayon/iploc v0.0.0-20200312105652-bda3e968a794
github.com/minio/minio-go/v7 v7.0.94 github.com/minio/minio-go/v7 v7.0.94
github.com/mojocn/base64Captcha v1.3.8 github.com/mojocn/base64Captcha v1.3.8
github.com/olekukonko/tablewriter v0.0.5 github.com/olekukonko/tablewriter v1.1.0
github.com/qiniu/go-sdk/v7 v7.25.4 github.com/qiniu/go-sdk/v7 v7.25.4
github.com/schollz/progressbar/v3 v3.18.0 github.com/schollz/progressbar/v3 v3.18.0
github.com/shirou/gopsutil/v3 v3.24.5 github.com/shirou/gopsutil/v3 v3.24.5
@@ -34,16 +35,16 @@ require (
github.com/tencentyun/cos-go-sdk-v5 v0.7.66 github.com/tencentyun/cos-go-sdk-v5 v0.7.66
github.com/ufilesdk-dev/ufile-gosdk v1.0.6 github.com/ufilesdk-dev/ufile-gosdk v1.0.6
github.com/xuri/excelize/v2 v2.9.1 github.com/xuri/excelize/v2 v2.9.1
go.opentelemetry.io/otel v1.37.0 go.opentelemetry.io/otel v1.38.0
golang.org/x/mod v0.25.0 golang.org/x/mod v0.26.0
golang.org/x/net v0.41.0 golang.org/x/net v0.43.0
golang.org/x/tools v0.34.0 golang.org/x/tools v0.35.0
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1
) )
require ( require (
aead.dev/minisign v0.2.0 // indirect aead.dev/minisign v0.2.0 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect github.com/BurntSushi/toml v1.5.0 // indirect
github.com/alex-ant/gomath v0.0.0-20160516115720-89013a210a82 // indirect github.com/alex-ant/gomath v0.0.0-20160516115720-89013a210a82 // indirect
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.5 // indirect github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.5 // indirect
github.com/alibabacloud-go/debug v1.0.1 // indirect github.com/alibabacloud-go/debug v1.0.1 // indirect
@@ -66,14 +67,13 @@ require (
github.com/emirpasic/gods v1.18.1 // indirect github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/color v1.18.0 // indirect github.com/fatih/color v1.18.0 // indirect
github.com/fatih/structs v1.1.0 // indirect github.com/fatih/structs v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/gammazero/toposort v0.1.1 // indirect github.com/gammazero/toposort v0.1.1 // indirect
github.com/go-ini/ini v1.67.0 // indirect github.com/go-ini/ini v1.67.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-pay/errgroup v0.0.3 // indirect github.com/go-pay/errgroup v0.0.3 // indirect
github.com/go-pay/smap v0.0.2 // indirect
github.com/go-pay/util v0.0.4 // indirect github.com/go-pay/util v0.0.4 // indirect
github.com/go-pay/xlog v0.0.3 // indirect github.com/go-pay/xlog v0.0.3 // indirect
github.com/go-pay/xtime v0.0.2 // indirect github.com/go-pay/xtime v0.0.2 // indirect
@@ -100,8 +100,8 @@ require (
github.com/klauspost/compress v1.18.0 // indirect github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.10 // indirect github.com/klauspost/cpuid/v2 v2.2.10 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/magiconair/properties v1.8.9 // indirect github.com/magiconair/properties v1.8.10 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/minio/crc64nvme v1.0.1 // indirect github.com/minio/crc64nvme v1.0.1 // indirect
@@ -111,15 +111,15 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mozillazg/go-httpheader v0.2.1 // indirect github.com/mozillazg/go-httpheader v0.2.1 // indirect
github.com/olekukonko/errors v0.0.0-20250405072817-4e6d85265da6 // indirect github.com/olekukonko/errors v1.1.0 // indirect
github.com/olekukonko/ll v0.0.8 // indirect github.com/olekukonko/ll v0.0.9 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect
github.com/pierrec/lz4/v4 v4.1.22 // indirect github.com/pierrec/lz4/v4 v4.1.22 // indirect
github.com/pkg/errors v0.8.1 // indirect github.com/pkg/errors v0.8.1 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/redis/go-redis/v9 v9.7.0 // indirect github.com/redis/go-redis/v9 v9.12.1 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.4 // indirect github.com/richardlehane/msoleps v1.0.4 // indirect
github.com/rivo/uniseg v0.4.7 // indirect github.com/rivo/uniseg v0.4.7 // indirect
@@ -140,17 +140,17 @@ require (
github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.14.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.14.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect go.opentelemetry.io/otel/metric v1.38.0 // indirect
go.opentelemetry.io/otel/sdk v1.32.0 // indirect go.opentelemetry.io/otel/sdk v1.38.0 // indirect
go.opentelemetry.io/otel/trace v1.37.0 // indirect go.opentelemetry.io/otel/trace v1.38.0 // indirect
go.uber.org/atomic v1.5.1 // indirect go.uber.org/atomic v1.5.1 // indirect
golang.org/x/crypto v0.39.0 // indirect golang.org/x/crypto v0.41.0 // indirect
golang.org/x/image v0.25.0 // indirect golang.org/x/image v0.25.0 // indirect
golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect
golang.org/x/sync v0.15.0 // indirect golang.org/x/sync v0.16.0 // indirect
golang.org/x/sys v0.33.0 // indirect golang.org/x/sys v0.35.0 // indirect
golang.org/x/term v0.32.0 // indirect golang.org/x/term v0.34.0 // indirect
golang.org/x/text v0.26.0 // indirect golang.org/x/text v0.28.0 // indirect
golang.org/x/time v0.12.0 // indirect golang.org/x/time v0.12.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect

View File

@@ -4,8 +4,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/IBM/sarama v1.45.2 h1:8m8LcMCu3REcwpa7fCP6v2fuPuzVwXDAM2DOv3CBrKw= github.com/IBM/sarama v1.45.2 h1:8m8LcMCu3REcwpa7fCP6v2fuPuzVwXDAM2DOv3CBrKw=
github.com/IBM/sarama v1.45.2/go.mod h1:ppaoTcVdGv186/z6MEKsMm70A5fwJfRTpstI37kVn3Y= github.com/IBM/sarama v1.45.2/go.mod h1:ppaoTcVdGv186/z6MEKsMm70A5fwJfRTpstI37kVn3Y=
github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM=
@@ -131,8 +131,8 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= 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.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/gammazero/toposort v0.1.1 h1:OivGxsWxF3U3+U80VoLJ+f50HcPU1MIqE1JlKzoJ2Eg= github.com/gammazero/toposort v0.1.1 h1:OivGxsWxF3U3+U80VoLJ+f50HcPU1MIqE1JlKzoJ2Eg=
github.com/gammazero/toposort v0.1.1/go.mod h1:H2cozTnNpMw0hg2VHAYsAxmkHXBYroNangj2NTBQDvw= github.com/gammazero/toposort v0.1.1/go.mod h1:H2cozTnNpMw0hg2VHAYsAxmkHXBYroNangj2NTBQDvw=
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
@@ -173,16 +173,14 @@ 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/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=
github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.0 h1:1f7EeD0lfPHoXfaJDSL7cxRcSRelbsAKgF3MGXY+Uyo= github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.4 h1:ntAPahCjQwQ79CC6tI67QDgj17NTWp+lMd1SaL2jJhs=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.0/go.mod h1:tToO1PjGkLIR+9DbJ0wrKicYma0H/EUHXOpwel6Dw+0= github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.4/go.mod h1:/350+9clTW5ktUvF+hePMN9yDknB2ipslqcx3Y2rLDQ=
github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.0 h1:EEZqu1PNRSmm+7Cqm9A/8+ObgfbMzhE1ps9Z3LD7HgM= github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.4 h1:iKXUQ+8TklSriAqOQjfwioI36zlByqrDqz4ISaRFvm8=
github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.0/go.mod h1:LHrxY+2IzNTHVTPG/s5yaz1VmXbj+CQ7Hr5SeVkHiTw= github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.4/go.mod h1:PYVwyQ0gN+w3wL7zKAoeUpy2WFs4/V8+Ls+eNsy7Uo0=
github.com/gogf/gf/contrib/trace/jaeger/v2 v2.7.4 h1:JnUjXb7C9vmwcZFwXqnxi9H4/I0rir9LmRryIX7xNds= github.com/gogf/gf/contrib/trace/jaeger/v2 v2.7.4 h1:JnUjXb7C9vmwcZFwXqnxi9H4/I0rir9LmRryIX7xNds=
github.com/gogf/gf/contrib/trace/jaeger/v2 v2.7.4/go.mod h1:A3NhV8u45twLq5VdqObhYNhT4szLFLCROw4LzHM+lYg= github.com/gogf/gf/contrib/trace/jaeger/v2 v2.7.4/go.mod h1:A3NhV8u45twLq5VdqObhYNhT4szLFLCROw4LzHM+lYg=
github.com/gogf/gf/v2 v2.9.0 h1:semN5Q5qGjDQEv4620VzxcJzJlSD07gmyJ9Sy9zfbHk= github.com/gogf/gf/v2 v2.9.4 h1:6vleEWypot9WBPncP2GjbpgAUeG6Mzb1YESb9nPMkjY=
github.com/gogf/gf/v2 v2.9.0/go.mod h1:sWGQw+pLILtuHmbOxoe0D+0DdaXxbleT57axOLH2vKI= github.com/gogf/gf/v2 v2.9.4/go.mod h1:Ukl+5HUH9S7puBmNLR4L1zUqeRwi0nrW4OigOknEztU=
github.com/gogf/gf/v2 v2.9.1-0.20250624075347-5fa656d1cc92 h1:ydiVI+0OGCH8eeuAq+P6XzyIX7CCbYose+AFvJdMD7k=
github.com/gogf/gf/v2 v2.9.1-0.20250624075347-5fa656d1cc92/go.mod h1:sWGQw+pLILtuHmbOxoe0D+0DdaXxbleT57axOLH2vKI=
github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f h1:7xfXR/BhG3JDqO1s45n65Oyx9t4E/UqDOXep6jXdLCM= github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f h1:7xfXR/BhG3JDqO1s45n65Oyx9t4E/UqDOXep6jXdLCM=
github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f/go.mod h1:HnYoio6S7VaFJdryKcD/r9HgX+4QzYfr00XiXUo/xz0= github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f/go.mod h1:HnYoio6S7VaFJdryKcD/r9HgX+4QzYfr00XiXUo/xz0=
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
@@ -289,14 +287,12 @@ github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgx
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE=
github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
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 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= 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 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/minio/crc64nvme v1.0.1 h1:DHQPrYPdqK7jQG/Ls5CTBZWeex/2FMS3G5XGkycuFrY= github.com/minio/crc64nvme v1.0.1 h1:DHQPrYPdqK7jQG/Ls5CTBZWeex/2FMS3G5XGkycuFrY=
@@ -325,14 +321,12 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/olekukonko/errors v0.0.0-20250405072817-4e6d85265da6 h1:r3FaAI0NZK3hSmtTDrBVREhKULp8oUeqLT5Eyl2mSPo= github.com/olekukonko/errors v1.1.0 h1:RNuGIh15QdDenh+hNvKrJkmxxjV4hcS50Db478Ou5sM=
github.com/olekukonko/errors v0.0.0-20250405072817-4e6d85265da6/go.mod h1:ppzxA5jBKcO1vIpCXQ9ZqgDh8iwODz6OXIGKU8r5m4Y= github.com/olekukonko/errors v1.1.0/go.mod h1:ppzxA5jBKcO1vIpCXQ9ZqgDh8iwODz6OXIGKU8r5m4Y=
github.com/olekukonko/ll v0.0.8 h1:sbGZ1Fx4QxJXEqL/6IG8GEFnYojUSQ45dJVwN2FH2fc= github.com/olekukonko/ll v0.0.9 h1:Y+1YqDfVkqMWuEQMclsF9HUR5+a82+dxJuL1HHSRpxI=
github.com/olekukonko/ll v0.0.8/go.mod h1:En+sEW0JNETl26+K8eZ6/W4UQ7CYSrrgg/EdIYT2H8g= github.com/olekukonko/ll v0.0.9/go.mod h1:En+sEW0JNETl26+K8eZ6/W4UQ7CYSrrgg/EdIYT2H8g=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v1.1.0 h1:N0LHrshF4T39KvI96fn6GT8HEjXRXYNDrDjKFDB7RIY=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/olekukonko/tablewriter v1.1.0/go.mod h1:5c+EBPeSqvXnLLgkm9isDdzR3wjfBkHR9Nhfp3NWrzo=
github.com/olekukonko/tablewriter v1.0.8 h1:f6wJzHg4QUtJdvrVPKco4QTrAylgaU0+b9br/lJxEiQ=
github.com/olekukonko/tablewriter v1.0.8/go.mod h1:H428M+HzoUXC6JU2Abj9IT9ooRmdq9CxuDmKMtrOCMs=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
@@ -364,8 +358,8 @@ github.com/qiniu/go-sdk/v7 v7.25.4/go.mod h1:dmKtJ2ahhPWFVi9o1D5GemmWoh/ctuB9peq
github.com/qiniu/x v1.10.5/go.mod h1:03Ni9tj+N2h2aKnAz+6N0Xfl8FwMEDRC2PAlxekASDs= github.com/qiniu/x v1.10.5/go.mod h1:03Ni9tj+N2h2aKnAz+6N0Xfl8FwMEDRC2PAlxekASDs=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E= github.com/redis/go-redis/v9 v9.12.1 h1:k5iquqv27aBtnTm2tIkROUDp8JBXhXZIVu1InSgvovg=
github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw= github.com/redis/go-redis/v9 v9.12.1/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw=
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM= 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/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg= github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
@@ -415,8 +409,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.563/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.563/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1200/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1200/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1202 h1:3QTQZXLLGLALyHNHs6WAsFCWvElMEXfOdaFM01/3Zjo= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1202 h1:3QTQZXLLGLALyHNHs6WAsFCWvElMEXfOdaFM01/3Zjo=
@@ -462,18 +456,22 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
go.opentelemetry.io/otel/exporters/jaeger v1.14.0 h1:CjbUNd4iN2hHmWekmOqZ+zSCU+dzZppG8XsV+A3oc8Q= go.opentelemetry.io/otel/exporters/jaeger v1.14.0 h1:CjbUNd4iN2hHmWekmOqZ+zSCU+dzZppG8XsV+A3oc8Q=
go.opentelemetry.io/otel/exporters/jaeger v1.14.0/go.mod h1:4Ay9kk5vELRrbg5z4cpP9EtmQRFap2Wb0woPG4lujZA= go.opentelemetry.io/otel/exporters/jaeger v1.14.0/go.mod h1:4Ay9kk5vELRrbg5z4cpP9EtmQRFap2Wb0woPG4lujZA=
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= 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.5.1 h1:rsqfU5vBkVknbhUGbAUwQKR2H4ItV8tjJ+6kJX4cxHM= go.uber.org/atomic v1.5.1 h1:rsqfU5vBkVknbhUGbAUwQKR2H4ItV8tjJ+6kJX4cxHM=
go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
@@ -492,8 +490,8 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM= golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/image v0.23.0/go.mod h1:wJJBTdLfCCf3tiHa1fNxpZmUI4mmoZvwMCPP0ddoNKY= golang.org/x/image v0.23.0/go.mod h1:wJJBTdLfCCf3tiHa1fNxpZmUI4mmoZvwMCPP0ddoNKY=
golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ= golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ=
@@ -510,8 +508,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg=
golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -539,8 +537,8 @@ golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -554,8 +552,8 @@ golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -581,7 +579,6 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -593,8 +590,8 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -608,8 +605,8 @@ golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4=
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
@@ -622,8 +619,8 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -641,8 +638,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0=
golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

View File

@@ -1,6 +1,6 @@
// Package consts // Package consts
// @Link https://github.com/bufanyun/hotgo // @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2025 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package consts package consts
@@ -9,11 +9,12 @@ package consts
const ( const (
DemoTips = "演示系统已隐藏" // 演示系统敏感数据打码 DemoTips = "演示系统已隐藏" // 演示系统敏感数据打码
NilJsonToString = "{}" // 空json初始化值 NilJsonToString = "{}" // 空json初始化值
RegionSpilt = " / " // 地区分隔符 RegionSpilt = " / " // 地区分隔符
Unknown = "Unknown" // Unknown Unknown = "Unknown" // Unknown
SuperRoleKey = "super" // 超管角色唯一标识符,通过角色验证超管 SuperRoleKey = "super" // 超管角色唯一标识符,通过角色验证超管
MaxServeLogContentLen = 2048 // 最大保留服务日志内容大小 MaxServeLogContentLen = 2048 // 最大保留服务日志内容大小
SysDefaultLanguage = "zh_CN" // 系统默认语言,当配置文件没有国际化配置时生效
) )
// curd. // curd.

View File

@@ -1,11 +1,11 @@
// Package consts // Package consts
// @Link https://github.com/bufanyun/hotgo // @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2025 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package consts package consts
// VersionApp HotGo版本 // VersionApp HotGo版本
const ( const (
VersionApp = "2.17.8" VersionApp = "2.18.6"
) )

View File

@@ -7,6 +7,7 @@ package common
import ( import (
"context" "context"
"github.com/gogf/gf/v2/i18n/gi18n"
"hotgo/api/admin/common" "hotgo/api/admin/common"
"hotgo/internal/consts" "hotgo/internal/consts"
"hotgo/internal/library/captcha" "hotgo/internal/library/captcha"
@@ -90,6 +91,9 @@ func (c *cSite) LoginConfig(ctx context.Context, _ *common.SiteLoginConfigReq) (
} }
res.LoginConfig = login res.LoginConfig = login
res.I18nSwitch = g.Cfg().MustGet(ctx, "system.i18n.switch", true).Bool()
res.DefaultLanguage = g.Cfg().MustGet(ctx, "system.i18n.defaultLanguage", consts.SysDefaultLanguage).String()
res.ProjectName = gi18n.T(ctx, "HotGo管理系统")
return return
} }

View File

@@ -57,3 +57,10 @@ func (c *cUpload) UploadPart(ctx context.Context, req *common.UploadPartReq) (re
res.UploadPartModel = data res.UploadPartModel = data
return return
} }
// ImageTransferStorage 图片链接转存
func (c *cUpload) ImageTransferStorage(ctx context.Context, req *common.ImageTransferStorageReq) (res *common.ImageTransferStorageRes, err error) {
res = new(common.ImageTransferStorageRes)
res.ImageTransferStorageModel, err = service.CommonUpload().ImageTransferStorage(ctx, &req.ImageTransferStorageInp)
return
}

View File

@@ -1,9 +1,9 @@
// Package sys // Package sys
// @Link https://github.com/bufanyun/hotgo // @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2024 HotGo CLI // @Copyright Copyright (c) 2025 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
// @AutoGenerate Version 2.15.7 // @AutoGenerate Version 2.17.8
package sys package sys
import ( import (

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAddonHgexampleTableDao is internal type for wrapping internal DAO implements. // addonHgexampleTableDao is the data access object for the table hg_addon_hgexample_table.
type internalAddonHgexampleTableDao = *internal.AddonHgexampleTableDao // You can define custom methods on it to extend its functionality as needed.
// addonHgexampleTableDao is the data access object for table hg_addon_hgexample_table.
// You can define custom methods on it to extend its functionality as you wish.
type addonHgexampleTableDao struct { type addonHgexampleTableDao struct {
internalAddonHgexampleTableDao *internal.AddonHgexampleTableDao
} }
var ( var (
// AddonHgexampleTable is globally public accessible object for table hg_addon_hgexample_table operations. // AddonHgexampleTable is a globally accessible object for table hg_addon_hgexample_table operations.
AddonHgexampleTable = addonHgexampleTableDao{ AddonHgexampleTable = addonHgexampleTableDao{internal.NewAddonHgexampleTableDao()}
internal.NewAddonHgexampleTableDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAddonHgexampleTenantOrderDao is internal type for wrapping internal DAO implements. // addonHgexampleTenantOrderDao is the data access object for the table hg_addon_hgexample_tenant_order.
type internalAddonHgexampleTenantOrderDao = *internal.AddonHgexampleTenantOrderDao // You can define custom methods on it to extend its functionality as needed.
// addonHgexampleTenantOrderDao is the data access object for table hg_addon_hgexample_tenant_order.
// You can define custom methods on it to extend its functionality as you wish.
type addonHgexampleTenantOrderDao struct { type addonHgexampleTenantOrderDao struct {
internalAddonHgexampleTenantOrderDao *internal.AddonHgexampleTenantOrderDao
} }
var ( var (
// AddonHgexampleTenantOrder is globally public accessible object for table hg_addon_hgexample_tenant_order operations. // AddonHgexampleTenantOrder is a globally accessible object for table hg_addon_hgexample_tenant_order operations.
AddonHgexampleTenantOrder = addonHgexampleTenantOrderDao{ AddonHgexampleTenantOrder = addonHgexampleTenantOrderDao{internal.NewAddonHgexampleTenantOrderDao()}
internal.NewAddonHgexampleTenantOrderDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminCashDao is internal type for wrapping internal DAO implements. // adminCashDao is the data access object for the table hg_admin_cash.
type internalAdminCashDao = *internal.AdminCashDao // You can define custom methods on it to extend its functionality as needed.
// adminCashDao is the data access object for table hg_admin_cash.
// You can define custom methods on it to extend its functionality as you wish.
type adminCashDao struct { type adminCashDao struct {
internalAdminCashDao *internal.AdminCashDao
} }
var ( var (
// AdminCash is globally public accessible object for table hg_admin_cash operations. // AdminCash is a globally accessible object for table hg_admin_cash operations.
AdminCash = adminCashDao{ AdminCash = adminCashDao{internal.NewAdminCashDao()}
internal.NewAdminCashDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminCreditsLogDao is internal type for wrapping internal DAO implements. // adminCreditsLogDao is the data access object for the table hg_admin_credits_log.
type internalAdminCreditsLogDao = *internal.AdminCreditsLogDao // You can define custom methods on it to extend its functionality as needed.
// adminCreditsLogDao is the data access object for table hg_admin_credits_log.
// You can define custom methods on it to extend its functionality as you wish.
type adminCreditsLogDao struct { type adminCreditsLogDao struct {
internalAdminCreditsLogDao *internal.AdminCreditsLogDao
} }
var ( var (
// AdminCreditsLog is globally public accessible object for table hg_admin_credits_log operations. // AdminCreditsLog is a globally accessible object for table hg_admin_credits_log operations.
AdminCreditsLog = adminCreditsLogDao{ AdminCreditsLog = adminCreditsLogDao{internal.NewAdminCreditsLogDao()}
internal.NewAdminCreditsLogDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminDeptDao is internal type for wrapping internal DAO implements. // adminDeptDao is the data access object for the table hg_admin_dept.
type internalAdminDeptDao = *internal.AdminDeptDao // You can define custom methods on it to extend its functionality as needed.
// adminDeptDao is the data access object for table hg_admin_dept.
// You can define custom methods on it to extend its functionality as you wish.
type adminDeptDao struct { type adminDeptDao struct {
internalAdminDeptDao *internal.AdminDeptDao
} }
var ( var (
// AdminDept is globally public accessible object for table hg_admin_dept operations. // AdminDept is a globally accessible object for table hg_admin_dept operations.
AdminDept = adminDeptDao{ AdminDept = adminDeptDao{internal.NewAdminDeptDao()}
internal.NewAdminDeptDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminMemberDao is internal type for wrapping internal DAO implements. // adminMemberDao is the data access object for the table hg_admin_member.
type internalAdminMemberDao = *internal.AdminMemberDao // You can define custom methods on it to extend its functionality as needed.
// adminMemberDao is the data access object for table hg_admin_member.
// You can define custom methods on it to extend its functionality as you wish.
type adminMemberDao struct { type adminMemberDao struct {
internalAdminMemberDao *internal.AdminMemberDao
} }
var ( var (
// AdminMember is globally public accessible object for table hg_admin_member operations. // AdminMember is a globally accessible object for table hg_admin_member operations.
AdminMember = adminMemberDao{ AdminMember = adminMemberDao{internal.NewAdminMemberDao()}
internal.NewAdminMemberDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminMemberPostDao is internal type for wrapping internal DAO implements. // adminMemberPostDao is the data access object for the table hg_admin_member_post.
type internalAdminMemberPostDao = *internal.AdminMemberPostDao // You can define custom methods on it to extend its functionality as needed.
// adminMemberPostDao is the data access object for table hg_admin_member_post.
// You can define custom methods on it to extend its functionality as you wish.
type adminMemberPostDao struct { type adminMemberPostDao struct {
internalAdminMemberPostDao *internal.AdminMemberPostDao
} }
var ( var (
// AdminMemberPost is globally public accessible object for table hg_admin_member_post operations. // AdminMemberPost is a globally accessible object for table hg_admin_member_post operations.
AdminMemberPost = adminMemberPostDao{ AdminMemberPost = adminMemberPostDao{internal.NewAdminMemberPostDao()}
internal.NewAdminMemberPostDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminMemberRoleDao is internal type for wrapping internal DAO implements. // adminMemberRoleDao is the data access object for the table hg_admin_member_role.
type internalAdminMemberRoleDao = *internal.AdminMemberRoleDao // You can define custom methods on it to extend its functionality as needed.
// adminMemberRoleDao is the data access object for table hg_admin_member_role.
// You can define custom methods on it to extend its functionality as you wish.
type adminMemberRoleDao struct { type adminMemberRoleDao struct {
internalAdminMemberRoleDao *internal.AdminMemberRoleDao
} }
var ( var (
// AdminMemberRole is globally public accessible object for table hg_admin_member_role operations. // AdminMemberRole is a globally accessible object for table hg_admin_member_role operations.
AdminMemberRole = adminMemberRoleDao{ AdminMemberRole = adminMemberRoleDao{internal.NewAdminMemberRoleDao()}
internal.NewAdminMemberRoleDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminMenuDao is internal type for wrapping internal DAO implements. // adminMenuDao is the data access object for the table hg_admin_menu.
type internalAdminMenuDao = *internal.AdminMenuDao // You can define custom methods on it to extend its functionality as needed.
// adminMenuDao is the data access object for table hg_admin_menu.
// You can define custom methods on it to extend its functionality as you wish.
type adminMenuDao struct { type adminMenuDao struct {
internalAdminMenuDao *internal.AdminMenuDao
} }
var ( var (
// AdminMenu is globally public accessible object for table hg_admin_menu operations. // AdminMenu is a globally accessible object for table hg_admin_menu operations.
AdminMenu = adminMenuDao{ AdminMenu = adminMenuDao{internal.NewAdminMenuDao()}
internal.NewAdminMenuDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminNoticeDao is internal type for wrapping internal DAO implements. // adminNoticeDao is the data access object for the table hg_admin_notice.
type internalAdminNoticeDao = *internal.AdminNoticeDao // You can define custom methods on it to extend its functionality as needed.
// adminNoticeDao is the data access object for table hg_admin_notice.
// You can define custom methods on it to extend its functionality as you wish.
type adminNoticeDao struct { type adminNoticeDao struct {
internalAdminNoticeDao *internal.AdminNoticeDao
} }
var ( var (
// AdminNotice is globally public accessible object for table hg_admin_notice operations. // AdminNotice is a globally accessible object for table hg_admin_notice operations.
AdminNotice = adminNoticeDao{ AdminNotice = adminNoticeDao{internal.NewAdminNoticeDao()}
internal.NewAdminNoticeDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminNoticeReadDao is internal type for wrapping internal DAO implements. // adminNoticeReadDao is the data access object for the table hg_admin_notice_read.
type internalAdminNoticeReadDao = *internal.AdminNoticeReadDao // You can define custom methods on it to extend its functionality as needed.
// adminNoticeReadDao is the data access object for table hg_admin_notice_read.
// You can define custom methods on it to extend its functionality as you wish.
type adminNoticeReadDao struct { type adminNoticeReadDao struct {
internalAdminNoticeReadDao *internal.AdminNoticeReadDao
} }
var ( var (
// AdminNoticeRead is globally public accessible object for table hg_admin_notice_read operations. // AdminNoticeRead is a globally accessible object for table hg_admin_notice_read operations.
AdminNoticeRead = adminNoticeReadDao{ AdminNoticeRead = adminNoticeReadDao{internal.NewAdminNoticeReadDao()}
internal.NewAdminNoticeReadDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminOauthDao is internal type for wrapping internal DAO implements. // adminOauthDao is the data access object for the table hg_admin_oauth.
type internalAdminOauthDao = *internal.AdminOauthDao // You can define custom methods on it to extend its functionality as needed.
// adminOauthDao is the data access object for table hg_admin_oauth.
// You can define custom methods on it to extend its functionality as you wish.
type adminOauthDao struct { type adminOauthDao struct {
internalAdminOauthDao *internal.AdminOauthDao
} }
var ( var (
// AdminOauth is globally public accessible object for table hg_admin_oauth operations. // AdminOauth is a globally accessible object for table hg_admin_oauth operations.
AdminOauth = adminOauthDao{ AdminOauth = adminOauthDao{internal.NewAdminOauthDao()}
internal.NewAdminOauthDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminOrderDao is internal type for wrapping internal DAO implements. // adminOrderDao is the data access object for the table hg_admin_order.
type internalAdminOrderDao = *internal.AdminOrderDao // You can define custom methods on it to extend its functionality as needed.
// adminOrderDao is the data access object for table hg_admin_order.
// You can define custom methods on it to extend its functionality as you wish.
type adminOrderDao struct { type adminOrderDao struct {
internalAdminOrderDao *internal.AdminOrderDao
} }
var ( var (
// AdminOrder is globally public accessible object for table hg_admin_order operations. // AdminOrder is a globally accessible object for table hg_admin_order operations.
AdminOrder = adminOrderDao{ AdminOrder = adminOrderDao{internal.NewAdminOrderDao()}
internal.NewAdminOrderDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminPostDao is internal type for wrapping internal DAO implements. // adminPostDao is the data access object for the table hg_admin_post.
type internalAdminPostDao = *internal.AdminPostDao // You can define custom methods on it to extend its functionality as needed.
// adminPostDao is the data access object for table hg_admin_post.
// You can define custom methods on it to extend its functionality as you wish.
type adminPostDao struct { type adminPostDao struct {
internalAdminPostDao *internal.AdminPostDao
} }
var ( var (
// AdminPost is globally public accessible object for table hg_admin_post operations. // AdminPost is a globally accessible object for table hg_admin_post operations.
AdminPost = adminPostDao{ AdminPost = adminPostDao{internal.NewAdminPostDao()}
internal.NewAdminPostDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminRoleDao is internal type for wrapping internal DAO implements. // adminRoleDao is the data access object for the table hg_admin_role.
type internalAdminRoleDao = *internal.AdminRoleDao // You can define custom methods on it to extend its functionality as needed.
// adminRoleDao is the data access object for table hg_admin_role.
// You can define custom methods on it to extend its functionality as you wish.
type adminRoleDao struct { type adminRoleDao struct {
internalAdminRoleDao *internal.AdminRoleDao
} }
var ( var (
// AdminRole is globally public accessible object for table hg_admin_role operations. // AdminRole is a globally accessible object for table hg_admin_role operations.
AdminRole = adminRoleDao{ AdminRole = adminRoleDao{internal.NewAdminRoleDao()}
internal.NewAdminRoleDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminRoleCasbinDao is internal type for wrapping internal DAO implements. // adminRoleCasbinDao is the data access object for the table hg_admin_role_casbin.
type internalAdminRoleCasbinDao = *internal.AdminRoleCasbinDao // You can define custom methods on it to extend its functionality as needed.
// adminRoleCasbinDao is the data access object for table hg_admin_role_casbin.
// You can define custom methods on it to extend its functionality as you wish.
type adminRoleCasbinDao struct { type adminRoleCasbinDao struct {
internalAdminRoleCasbinDao *internal.AdminRoleCasbinDao
} }
var ( var (
// AdminRoleCasbin is globally public accessible object for table hg_admin_role_casbin operations. // AdminRoleCasbin is a globally accessible object for table hg_admin_role_casbin operations.
AdminRoleCasbin = adminRoleCasbinDao{ AdminRoleCasbin = adminRoleCasbinDao{internal.NewAdminRoleCasbinDao()}
internal.NewAdminRoleCasbinDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalAdminRoleMenuDao is internal type for wrapping internal DAO implements. // adminRoleMenuDao is the data access object for the table hg_admin_role_menu.
type internalAdminRoleMenuDao = *internal.AdminRoleMenuDao // You can define custom methods on it to extend its functionality as needed.
// adminRoleMenuDao is the data access object for table hg_admin_role_menu.
// You can define custom methods on it to extend its functionality as you wish.
type adminRoleMenuDao struct { type adminRoleMenuDao struct {
internalAdminRoleMenuDao *internal.AdminRoleMenuDao
} }
var ( var (
// AdminRoleMenu is globally public accessible object for table hg_admin_role_menu operations. // AdminRoleMenu is a globally accessible object for table hg_admin_role_menu operations.
AdminRoleMenu = adminRoleMenuDao{ AdminRoleMenu = adminRoleMenuDao{internal.NewAdminRoleMenuDao()}
internal.NewAdminRoleMenuDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalPayLogDao is internal type for wrapping internal DAO implements. // payLogDao is the data access object for the table hg_pay_log.
type internalPayLogDao = *internal.PayLogDao // You can define custom methods on it to extend its functionality as needed.
// payLogDao is the data access object for table hg_pay_log.
// You can define custom methods on it to extend its functionality as you wish.
type payLogDao struct { type payLogDao struct {
internalPayLogDao *internal.PayLogDao
} }
var ( var (
// PayLog is globally public accessible object for table hg_pay_log operations. // PayLog is a globally accessible object for table hg_pay_log operations.
PayLog = payLogDao{ PayLog = payLogDao{internal.NewPayLogDao()}
internal.NewPayLogDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalPayRefundDao is internal type for wrapping internal DAO implements. // payRefundDao is the data access object for the table hg_pay_refund.
type internalPayRefundDao = *internal.PayRefundDao // You can define custom methods on it to extend its functionality as needed.
// payRefundDao is the data access object for table hg_pay_refund.
// You can define custom methods on it to extend its functionality as you wish.
type payRefundDao struct { type payRefundDao struct {
internalPayRefundDao *internal.PayRefundDao
} }
var ( var (
// PayRefund is globally public accessible object for table hg_pay_refund operations. // PayRefund is a globally accessible object for table hg_pay_refund operations.
PayRefund = payRefundDao{ PayRefund = payRefundDao{internal.NewPayRefundDao()}
internal.NewPayRefundDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysAddonsConfigDao is internal type for wrapping internal DAO implements. // sysAddonsConfigDao is the data access object for the table hg_sys_addons_config.
type internalSysAddonsConfigDao = *internal.SysAddonsConfigDao // You can define custom methods on it to extend its functionality as needed.
// sysAddonsConfigDao is the data access object for table hg_sys_addons_config.
// You can define custom methods on it to extend its functionality as you wish.
type sysAddonsConfigDao struct { type sysAddonsConfigDao struct {
internalSysAddonsConfigDao *internal.SysAddonsConfigDao
} }
var ( var (
// SysAddonsConfig is globally public accessible object for table hg_sys_addons_config operations. // SysAddonsConfig is a globally accessible object for table hg_sys_addons_config operations.
SysAddonsConfig = sysAddonsConfigDao{ SysAddonsConfig = sysAddonsConfigDao{internal.NewSysAddonsConfigDao()}
internal.NewSysAddonsConfigDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysAttachmentDao is internal type for wrapping internal DAO implements. // sysAttachmentDao is the data access object for the table hg_sys_attachment.
type internalSysAttachmentDao = *internal.SysAttachmentDao // You can define custom methods on it to extend its functionality as needed.
// sysAttachmentDao is the data access object for table hg_sys_attachment.
// You can define custom methods on it to extend its functionality as you wish.
type sysAttachmentDao struct { type sysAttachmentDao struct {
internalSysAttachmentDao *internal.SysAttachmentDao
} }
var ( var (
// SysAttachment is globally public accessible object for table hg_sys_attachment operations. // SysAttachment is a globally accessible object for table hg_sys_attachment operations.
SysAttachment = sysAttachmentDao{ SysAttachment = sysAttachmentDao{internal.NewSysAttachmentDao()}
internal.NewSysAttachmentDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysBlacklistDao is internal type for wrapping internal DAO implements. // sysBlacklistDao is the data access object for the table hg_sys_blacklist.
type internalSysBlacklistDao = *internal.SysBlacklistDao // You can define custom methods on it to extend its functionality as needed.
// sysBlacklistDao is the data access object for table hg_sys_blacklist.
// You can define custom methods on it to extend its functionality as you wish.
type sysBlacklistDao struct { type sysBlacklistDao struct {
internalSysBlacklistDao *internal.SysBlacklistDao
} }
var ( var (
// SysBlacklist is globally public accessible object for table hg_sys_blacklist operations. // SysBlacklist is a globally accessible object for table hg_sys_blacklist operations.
SysBlacklist = sysBlacklistDao{ SysBlacklist = sysBlacklistDao{internal.NewSysBlacklistDao()}
internal.NewSysBlacklistDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysConfigDao is internal type for wrapping internal DAO implements. // sysConfigDao is the data access object for the table hg_sys_config.
type internalSysConfigDao = *internal.SysConfigDao // You can define custom methods on it to extend its functionality as needed.
// sysConfigDao is the data access object for table hg_sys_config.
// You can define custom methods on it to extend its functionality as you wish.
type sysConfigDao struct { type sysConfigDao struct {
internalSysConfigDao *internal.SysConfigDao
} }
var ( var (
// SysConfig is globally public accessible object for table hg_sys_config operations. // SysConfig is a globally accessible object for table hg_sys_config operations.
SysConfig = sysConfigDao{ SysConfig = sysConfigDao{internal.NewSysConfigDao()}
internal.NewSysConfigDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysCronDao is internal type for wrapping internal DAO implements. // sysCronDao is the data access object for the table hg_sys_cron.
type internalSysCronDao = *internal.SysCronDao // You can define custom methods on it to extend its functionality as needed.
// sysCronDao is the data access object for table hg_sys_cron.
// You can define custom methods on it to extend its functionality as you wish.
type sysCronDao struct { type sysCronDao struct {
internalSysCronDao *internal.SysCronDao
} }
var ( var (
// SysCron is globally public accessible object for table hg_sys_cron operations. // SysCron is a globally accessible object for table hg_sys_cron operations.
SysCron = sysCronDao{ SysCron = sysCronDao{internal.NewSysCronDao()}
internal.NewSysCronDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysCronGroupDao is internal type for wrapping internal DAO implements. // sysCronGroupDao is the data access object for the table hg_sys_cron_group.
type internalSysCronGroupDao = *internal.SysCronGroupDao // You can define custom methods on it to extend its functionality as needed.
// sysCronGroupDao is the data access object for table hg_sys_cron_group.
// You can define custom methods on it to extend its functionality as you wish.
type sysCronGroupDao struct { type sysCronGroupDao struct {
internalSysCronGroupDao *internal.SysCronGroupDao
} }
var ( var (
// SysCronGroup is globally public accessible object for table hg_sys_cron_group operations. // SysCronGroup is a globally accessible object for table hg_sys_cron_group operations.
SysCronGroup = sysCronGroupDao{ SysCronGroup = sysCronGroupDao{internal.NewSysCronGroupDao()}
internal.NewSysCronGroupDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysDictDataDao is internal type for wrapping internal DAO implements. // sysDictDataDao is the data access object for the table hg_sys_dict_data.
type internalSysDictDataDao = *internal.SysDictDataDao // You can define custom methods on it to extend its functionality as needed.
// sysDictDataDao is the data access object for table hg_sys_dict_data.
// You can define custom methods on it to extend its functionality as you wish.
type sysDictDataDao struct { type sysDictDataDao struct {
internalSysDictDataDao *internal.SysDictDataDao
} }
var ( var (
// SysDictData is globally public accessible object for table hg_sys_dict_data operations. // SysDictData is a globally accessible object for table hg_sys_dict_data operations.
SysDictData = sysDictDataDao{ SysDictData = sysDictDataDao{internal.NewSysDictDataDao()}
internal.NewSysDictDataDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysDictTypeDao is internal type for wrapping internal DAO implements. // sysDictTypeDao is the data access object for the table hg_sys_dict_type.
type internalSysDictTypeDao = *internal.SysDictTypeDao // You can define custom methods on it to extend its functionality as needed.
// sysDictTypeDao is the data access object for table hg_sys_dict_type.
// You can define custom methods on it to extend its functionality as you wish.
type sysDictTypeDao struct { type sysDictTypeDao struct {
internalSysDictTypeDao *internal.SysDictTypeDao
} }
var ( var (
// SysDictType is globally public accessible object for table hg_sys_dict_type operations. // SysDictType is a globally accessible object for table hg_sys_dict_type operations.
SysDictType = sysDictTypeDao{ SysDictType = sysDictTypeDao{internal.NewSysDictTypeDao()}
internal.NewSysDictTypeDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysEmsLogDao is internal type for wrapping internal DAO implements. // sysEmsLogDao is the data access object for the table hg_sys_ems_log.
type internalSysEmsLogDao = *internal.SysEmsLogDao // You can define custom methods on it to extend its functionality as needed.
// sysEmsLogDao is the data access object for table hg_sys_ems_log.
// You can define custom methods on it to extend its functionality as you wish.
type sysEmsLogDao struct { type sysEmsLogDao struct {
internalSysEmsLogDao *internal.SysEmsLogDao
} }
var ( var (
// SysEmsLog is globally public accessible object for table hg_sys_ems_log operations. // SysEmsLog is a globally accessible object for table hg_sys_ems_log operations.
SysEmsLog = sysEmsLogDao{ SysEmsLog = sysEmsLogDao{internal.NewSysEmsLogDao()}
internal.NewSysEmsLogDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysGenCodesDao is internal type for wrapping internal DAO implements. // sysGenCodesDao is the data access object for the table hg_sys_gen_codes.
type internalSysGenCodesDao = *internal.SysGenCodesDao // You can define custom methods on it to extend its functionality as needed.
// sysGenCodesDao is the data access object for table hg_sys_gen_codes.
// You can define custom methods on it to extend its functionality as you wish.
type sysGenCodesDao struct { type sysGenCodesDao struct {
internalSysGenCodesDao *internal.SysGenCodesDao
} }
var ( var (
// SysGenCodes is globally public accessible object for table hg_sys_gen_codes operations. // SysGenCodes is a globally accessible object for table hg_sys_gen_codes operations.
SysGenCodes = sysGenCodesDao{ SysGenCodes = sysGenCodesDao{internal.NewSysGenCodesDao()}
internal.NewSysGenCodesDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysGenCurdDemoDao is internal type for wrapping internal DAO implements. // sysGenCurdDemoDao is the data access object for the table hg_sys_gen_curd_demo.
type internalSysGenCurdDemoDao = *internal.SysGenCurdDemoDao // You can define custom methods on it to extend its functionality as needed.
// sysGenCurdDemoDao is the data access object for table hg_sys_gen_curd_demo.
// You can define custom methods on it to extend its functionality as you wish.
type sysGenCurdDemoDao struct { type sysGenCurdDemoDao struct {
internalSysGenCurdDemoDao *internal.SysGenCurdDemoDao
} }
var ( var (
// SysGenCurdDemo is globally public accessible object for table hg_sys_gen_curd_demo operations. // SysGenCurdDemo is a globally accessible object for table hg_sys_gen_curd_demo operations.
SysGenCurdDemo = sysGenCurdDemoDao{ SysGenCurdDemo = sysGenCurdDemoDao{internal.NewSysGenCurdDemoDao()}
internal.NewSysGenCurdDemoDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysGenTreeDemoDao is internal type for wrapping internal DAO implements. // sysGenTreeDemoDao is the data access object for the table hg_sys_gen_tree_demo.
type internalSysGenTreeDemoDao = *internal.SysGenTreeDemoDao // You can define custom methods on it to extend its functionality as needed.
// sysGenTreeDemoDao is the data access object for table hg_sys_gen_tree_demo.
// You can define custom methods on it to extend its functionality as you wish.
type sysGenTreeDemoDao struct { type sysGenTreeDemoDao struct {
internalSysGenTreeDemoDao *internal.SysGenTreeDemoDao
} }
var ( var (
// SysGenTreeDemo is globally public accessible object for table hg_sys_gen_tree_demo operations. // SysGenTreeDemo is a globally accessible object for table hg_sys_gen_tree_demo operations.
SysGenTreeDemo = sysGenTreeDemoDao{ SysGenTreeDemo = sysGenTreeDemoDao{internal.NewSysGenTreeDemoDao()}
internal.NewSysGenTreeDemoDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysLogDao is internal type for wrapping internal DAO implements. // sysLogDao is the data access object for the table hg_sys_log.
type internalSysLogDao = *internal.SysLogDao // You can define custom methods on it to extend its functionality as needed.
// sysLogDao is the data access object for table hg_sys_log.
// You can define custom methods on it to extend its functionality as you wish.
type sysLogDao struct { type sysLogDao struct {
internalSysLogDao *internal.SysLogDao
} }
var ( var (
// SysLog is globally public accessible object for table hg_sys_log operations. // SysLog is a globally accessible object for table hg_sys_log operations.
SysLog = sysLogDao{ SysLog = sysLogDao{internal.NewSysLogDao()}
internal.NewSysLogDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysLoginLogDao is internal type for wrapping internal DAO implements. // sysLoginLogDao is the data access object for the table hg_sys_login_log.
type internalSysLoginLogDao = *internal.SysLoginLogDao // You can define custom methods on it to extend its functionality as needed.
// sysLoginLogDao is the data access object for table hg_sys_login_log.
// You can define custom methods on it to extend its functionality as you wish.
type sysLoginLogDao struct { type sysLoginLogDao struct {
internalSysLoginLogDao *internal.SysLoginLogDao
} }
var ( var (
// SysLoginLog is globally public accessible object for table hg_sys_login_log operations. // SysLoginLog is a globally accessible object for table hg_sys_login_log operations.
SysLoginLog = sysLoginLogDao{ SysLoginLog = sysLoginLogDao{internal.NewSysLoginLogDao()}
internal.NewSysLoginLogDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysProvincesDao is internal type for wrapping internal DAO implements. // sysProvincesDao is the data access object for the table hg_sys_provinces.
type internalSysProvincesDao = *internal.SysProvincesDao // You can define custom methods on it to extend its functionality as needed.
// sysProvincesDao is the data access object for table hg_sys_provinces.
// You can define custom methods on it to extend its functionality as you wish.
type sysProvincesDao struct { type sysProvincesDao struct {
internalSysProvincesDao *internal.SysProvincesDao
} }
var ( var (
// SysProvinces is globally public accessible object for table hg_sys_provinces operations. // SysProvinces is a globally accessible object for table hg_sys_provinces operations.
SysProvinces = sysProvincesDao{ SysProvinces = sysProvincesDao{internal.NewSysProvincesDao()}
internal.NewSysProvincesDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysServeLicenseDao is internal type for wrapping internal DAO implements. // sysServeLicenseDao is the data access object for the table hg_sys_serve_license.
type internalSysServeLicenseDao = *internal.SysServeLicenseDao // You can define custom methods on it to extend its functionality as needed.
// sysServeLicenseDao is the data access object for table hg_sys_serve_license.
// You can define custom methods on it to extend its functionality as you wish.
type sysServeLicenseDao struct { type sysServeLicenseDao struct {
internalSysServeLicenseDao *internal.SysServeLicenseDao
} }
var ( var (
// SysServeLicense is globally public accessible object for table hg_sys_serve_license operations. // SysServeLicense is a globally accessible object for table hg_sys_serve_license operations.
SysServeLicense = sysServeLicenseDao{ SysServeLicense = sysServeLicenseDao{internal.NewSysServeLicenseDao()}
internal.NewSysServeLicenseDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysServeLogDao is internal type for wrapping internal DAO implements. // sysServeLogDao is the data access object for the table hg_sys_serve_log.
type internalSysServeLogDao = *internal.SysServeLogDao // You can define custom methods on it to extend its functionality as needed.
// sysServeLogDao is the data access object for table hg_sys_serve_log.
// You can define custom methods on it to extend its functionality as you wish.
type sysServeLogDao struct { type sysServeLogDao struct {
internalSysServeLogDao *internal.SysServeLogDao
} }
var ( var (
// SysServeLog is globally public accessible object for table hg_sys_serve_log operations. // SysServeLog is a globally accessible object for table hg_sys_serve_log operations.
SysServeLog = sysServeLogDao{ SysServeLog = sysServeLogDao{internal.NewSysServeLogDao()}
internal.NewSysServeLogDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalSysSmsLogDao is internal type for wrapping internal DAO implements. // sysSmsLogDao is the data access object for the table hg_sys_sms_log.
type internalSysSmsLogDao = *internal.SysSmsLogDao // You can define custom methods on it to extend its functionality as needed.
// sysSmsLogDao is the data access object for table hg_sys_sms_log.
// You can define custom methods on it to extend its functionality as you wish.
type sysSmsLogDao struct { type sysSmsLogDao struct {
internalSysSmsLogDao *internal.SysSmsLogDao
} }
var ( var (
// SysSmsLog is globally public accessible object for table hg_sys_sms_log operations. // SysSmsLog is a globally accessible object for table hg_sys_sms_log operations.
SysSmsLog = sysSmsLogDao{ SysSmsLog = sysSmsLogDao{internal.NewSysSmsLogDao()}
internal.NewSysSmsLogDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -1,5 +1,5 @@
// ================================================================================= // =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. // This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// ================================================================================= // =================================================================================
package dao package dao
@@ -8,20 +8,15 @@ import (
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
) )
// internalTestCategoryDao is internal type for wrapping internal DAO implements. // testCategoryDao is the data access object for the table hg_test_category.
type internalTestCategoryDao = *internal.TestCategoryDao // You can define custom methods on it to extend its functionality as needed.
// testCategoryDao is the data access object for table hg_test_category.
// You can define custom methods on it to extend its functionality as you wish.
type testCategoryDao struct { type testCategoryDao struct {
internalTestCategoryDao *internal.TestCategoryDao
} }
var ( var (
// TestCategory is globally public accessible object for table hg_test_category operations. // TestCategory is a globally accessible object for table hg_test_category operations.
TestCategory = testCategoryDao{ TestCategory = testCategoryDao{internal.NewTestCategoryDao()}
internal.NewTestCategoryDao(),
}
) )
// Fill with you ideas below. // Add your custom methods and functionality below.

View File

@@ -30,12 +30,10 @@ import (
"hotgo/internal/library/hggen/internal/utility/mlog" "hotgo/internal/library/hggen/internal/utility/mlog"
) )
var ( var Build = cBuild{
Build = cBuild{ nodeNameInConfigFile: "gfcli.build",
nodeNameInConfigFile: "gfcli.build", packedGoFileName: "internal/packed/build_pack_data.go",
packedGoFileName: "internal/packed/build_pack_data.go", }
}
)
type cBuild struct { type cBuild struct {
g.Meta `name:"build" brief:"{cBuildBrief}" dc:"{cBuildDc}" eg:"{cBuildEg}" ad:"{cBuildAd}"` g.Meta `name:"build" brief:"{cBuildBrief}" dc:"{cBuildDc}" eg:"{cBuildEg}" ad:"{cBuildAd}"`
@@ -65,45 +63,67 @@ It provides much more features for building binary:
` `
cBuildAd = ` cBuildAd = `
PLATFORMS PLATFORMS
aix ppc64
android 386,amd64,arm,arm64
darwin amd64,arm64 darwin amd64,arm64
dragonfly amd64
freebsd 386,amd64,arm freebsd 386,amd64,arm
linux 386,amd64,arm,arm64,ppc64,ppc64le,mips,mipsle,mips64,mips64le illumos amd64
ios arm64
js wasm
linux 386,amd64,arm,arm64,loong64,mips,mipsle,mips64,mips64le,ppc64,ppc64le,riscv64,s390x
netbsd 386,amd64,arm netbsd 386,amd64,arm
openbsd 386,amd64,arm openbsd 386,amd64,arm,arm64
windows 386,amd64 plan9 386,amd64,arm
solaris amd64
wasip1 wasm
windows 386,amd64,arm,arm64
` `
// https://golang.google.cn/doc/install/source // https://golang.google.cn/doc/install/source
cBuildPlatforms = ` cBuildPlatforms = `
aix ppc64
android 386
android amd64
android arm
android arm64
darwin amd64 darwin amd64
darwin arm64 darwin arm64
ios amd64 dragonfly amd64
ios arm64
freebsd 386 freebsd 386
freebsd amd64 freebsd amd64
freebsd arm freebsd arm
illumos amd64
ios arm64
js wasm
linux 386 linux 386
linux amd64 linux amd64
linux arm linux arm
linux arm64 linux arm64
linux ppc64 linux loong64
linux ppc64le
linux mips linux mips
linux mipsle linux mipsle
linux mips64 linux mips64
linux mips64le linux mips64le
linux ppc64
linux ppc64le
linux riscv64
linux s390x
netbsd 386 netbsd 386
netbsd amd64 netbsd amd64
netbsd arm netbsd arm
openbsd 386 openbsd 386
openbsd amd64 openbsd amd64
openbsd arm openbsd arm
windows 386 openbsd arm64
windows amd64
android arm
dragonfly amd64
plan9 386 plan9 386
plan9 amd64 plan9 amd64
plan9 arm
solaris amd64 solaris amd64
wasip1 wasm
windows 386
windows amd64
windows arm
windows arm64
` `
) )

View File

@@ -11,6 +11,8 @@ import (
"context" "context"
"github.com/olekukonko/tablewriter" "github.com/olekukonko/tablewriter"
"github.com/olekukonko/tablewriter/renderer"
"github.com/olekukonko/tablewriter/tw"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gproc" "github.com/gogf/gf/v2/os/gproc"
@@ -61,10 +63,23 @@ func (c cEnv) Index(ctx context.Context, in cEnvInput) (out *cEnvOutput, err err
} }
array = append(array, []string{gstr.Trim(match[1]), gstr.Trim(match[2])}) array = append(array, []string{gstr.Trim(match[1]), gstr.Trim(match[2])})
} }
tw := tablewriter.NewWriter(buffer) table := tablewriter.NewTable(buffer,
tw.SetColumnAlignment([]int{tablewriter.ALIGN_LEFT, tablewriter.ALIGN_LEFT}) tablewriter.WithRenderer(renderer.NewBlueprint(tw.Rendition{
tw.AppendBulk(array) Settings: tw.Settings{
tw.Render() Separators: tw.Separators{BetweenRows: tw.Off, BetweenColumns: tw.On},
},
Symbols: tw.NewSymbols(tw.StyleASCII),
})),
tablewriter.WithConfig(tablewriter.Config{
Row: tw.CellConfig{
Formatting: tw.CellFormatting{AutoWrap: tw.WrapNone},
Alignment: tw.CellAlignment{PerColumn: []tw.Align{tw.AlignLeft, tw.AlignLeft}},
ColMaxWidths: tw.CellWidth{Global: 84},
},
}),
)
table.Bulk(array)
table.Render()
mlog.Print(buffer.String()) mlog.Print(buffer.String())
return return
} }

View File

@@ -13,6 +13,7 @@ import (
"path/filepath" "path/filepath"
"runtime" "runtime"
"strings" "strings"
"time"
"github.com/gogf/gf/v2/container/gtype" "github.com/gogf/gf/v2/container/gtype"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
@@ -26,9 +27,7 @@ import (
"hotgo/internal/library/hggen/internal/utility/mlog" "hotgo/internal/library/hggen/internal/utility/mlog"
) )
var ( var Run = cRun{}
Run = cRun{}
)
type cRun struct { type cRun struct {
g.Meta `name:"run" usage:"{cRunUsage}" brief:"{cRunBrief}" eg:"{cRunEg}" dc:"{cRunDc}"` g.Meta `name:"run" usage:"{cRunUsage}" brief:"{cRunBrief}" eg:"{cRunEg}" dc:"{cRunDc}"`
@@ -62,9 +61,7 @@ which compiles and runs the go codes asynchronously when codes change.
cRunWatchPathsBrief = `watch additional paths for live reload, separated by ",". i.e. "manifest/config/*.yaml"` cRunWatchPathsBrief = `watch additional paths for live reload, separated by ",". i.e. "manifest/config/*.yaml"`
) )
var ( var process *gproc.Process
process *gproc.Process
)
func init() { func init() {
gtag.Sets(g.MapStrStr{ gtag.Sets(g.MapStrStr{
@@ -118,8 +115,12 @@ func (c cRun) Index(ctx context.Context, in cRunInput) (out *cRunOutput, err err
} }
dirty := gtype.NewBool() dirty := gtype.NewBool()
var outputPath = app.genOutputPath() outputPath := app.genOutputPath()
callbackFunc := func(event *gfsnotify.Event) { callbackFunc := func(event *gfsnotify.Event) {
if !event.IsWrite() && !event.IsCreate() && !event.IsRemove() && !event.IsRename() {
return
}
if gfile.ExtName(event.Path) != "go" { if gfile.ExtName(event.Path) != "go" {
return return
} }
@@ -207,8 +208,37 @@ func (app *cRunApp) End(ctx context.Context, sig os.Signal, outputPath string) {
// Delete the binary file. // Delete the binary file.
// firstly, kill the process. // firstly, kill the process.
if process != nil { if process != nil {
if err := process.Kill(); err != nil { if sig != nil && runtime.GOOS != "windows" {
mlog.Debugf("kill process error: %s", err.Error()) if err := process.Signal(sig); err != nil {
mlog.Debugf("send signal to process error: %s", err.Error())
if err := process.Kill(); err != nil {
mlog.Debugf("kill process error: %s", err.Error())
}
} else {
waitCtx, cancel := context.WithTimeout(ctx, 30*time.Second)
defer cancel()
done := make(chan error, 1)
go func() {
select {
case <-waitCtx.Done():
done <- waitCtx.Err()
case done <- process.Wait():
}
}()
err := <-done
if err != nil {
mlog.Debugf("process wait error: %s", err.Error())
if err := process.Kill(); err != nil {
mlog.Debugf("kill process error: %s", err.Error())
}
} else {
mlog.Debug("process exited gracefully")
}
}
} else {
if err := process.Kill(); err != nil {
mlog.Debugf("kill process error: %s", err.Error())
}
} }
} }
if err := gfile.RemoveFile(outputPath); err != nil { if err := gfile.RemoveFile(outputPath); err != nil {

View File

@@ -15,6 +15,7 @@ import (
"github.com/gogf/gf/v2/container/gset" "github.com/gogf/gf/v2/container/gset"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/genv"
"github.com/gogf/gf/v2/os/gfile" "github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gproc" "github.com/gogf/gf/v2/os/gproc"
"github.com/gogf/gf/v2/text/gstr" "github.com/gogf/gf/v2/text/gstr"
@@ -39,7 +40,11 @@ gf up
gf up -a gf up -a
gf up -c gf up -c
gf up -cf gf up -cf
gf up -a -m=install
gf up -a -m=install -p=github.com/gogf/gf/cmd/gf/v2@latest
` `
cliMethodHttpDownload = "http"
cliMethodGoInstall = "install"
) )
func init() { func init() {
@@ -49,10 +54,14 @@ func init() {
} }
type cUpInput struct { type cUpInput struct {
g.Meta `name:"up" config:"gfcli.up"` g.Meta `name:"up" config:"gfcli.up"`
All bool `name:"all" short:"a" brief:"upgrade both version and cli, auto fix codes" orphan:"true"` All bool `name:"all" short:"a" brief:"upgrade both version and cli, auto fix codes" orphan:"true"`
Cli bool `name:"cli" short:"c" brief:"also upgrade CLI tool" orphan:"true"` Cli bool `name:"cli" short:"c" brief:"also upgrade CLI tool" orphan:"true"`
Fix bool `name:"fix" short:"f" brief:"auto fix codes(it only make sense if cli is to be upgraded)" orphan:"true"` Fix bool `name:"fix" short:"f" brief:"auto fix codes(it only make sense if cli is to be upgraded)" orphan:"true"`
CliDownloadingMethod string `name:"cli-download-method" short:"m" brief:"cli upgrade method: http=download binary via HTTP GET, install=upgrade via go install" d:"http"`
// CliModulePath specifies the module path for CLI installation via go install.
// This is used when CliDownloadingMethod is set to "install".
CliModulePath string `name:"cli-module-path" short:"p" brief:"custom cli module path for upgrade CLI tool with go install method" d:"github.com/gogf/gf/cmd/gf/v2@latest"`
} }
type cUpOutput struct{} type cUpOutput struct{}
@@ -76,7 +85,7 @@ func (c cUp) Index(ctx context.Context, in cUpInput) (out *cUpOutput, err error)
} }
if in.Cli { if in.Cli {
if err = c.doUpgradeCLI(ctx); err != nil { if err = c.doUpgradeCLI(ctx, in); err != nil {
return nil, err return nil, err
} }
} }
@@ -170,8 +179,22 @@ func (c cUp) doUpgradeVersion(ctx context.Context, in cUpInput) (out *doUpgradeV
} }
// doUpgradeCLI downloads the new version binary with process. // doUpgradeCLI downloads the new version binary with process.
func (c cUp) doUpgradeCLI(ctx context.Context) (err error) { func (c cUp) doUpgradeCLI(ctx context.Context, in cUpInput) (err error) {
mlog.Print(`start upgrading cli...`) mlog.Print(`start upgrading cli...`)
fmt.Println(` cli upgrade method:`, in.CliDownloadingMethod)
switch in.CliDownloadingMethod {
case cliMethodHttpDownload:
return c.doUpgradeCLIWithHttpDownload(ctx)
case cliMethodGoInstall:
return c.doUpgradeCLIWithGoInstall(ctx, in)
default:
mlog.Fatalf(`invalid cli upgrade method: "%s", please use "http" or "install"`, in.CliDownloadingMethod)
}
return
}
func (c cUp) doUpgradeCLIWithHttpDownload(ctx context.Context) (err error) {
mlog.Print(`start upgrading cli with http get download...`)
var ( var (
downloadUrl = fmt.Sprintf( downloadUrl = fmt.Sprintf(
`https://github.com/gogf/gf/releases/latest/download/gf_%s_%s`, `https://github.com/gogf/gf/releases/latest/download/gf_%s_%s`,
@@ -213,6 +236,41 @@ func (c cUp) doUpgradeCLI(ctx context.Context) (err error) {
return return
} }
func (c cUp) doUpgradeCLIWithGoInstall(ctx context.Context, in cUpInput) (err error) {
mlog.Print(`upgrading cli with go install...`)
if !genv.Contains("GOPATH") {
mlog.Fatal(`"GOPATH" environment variable does not exist, please check your go installation`)
}
command := fmt.Sprintf(`go install %s`, in.CliModulePath)
mlog.Printf(`running command: %s`, command)
err = gproc.ShellRun(ctx, command)
if err != nil {
return err
}
cliFilePath := gfile.Join(genv.Get("GOPATH").String(), "bin/gf")
if runtime.GOOS == "windows" {
cliFilePath += ".exe"
}
// It fails if file not exist or its size is less than 1MB.
if !gfile.Exists(cliFilePath) || gfile.Size(cliFilePath) < 1024*1024 {
mlog.Fatalf(`go install %s failed, "%s" does not exist or its size is less than 1MB`, in.CliModulePath, cliFilePath)
}
newFile, err := gfile.Open(cliFilePath)
if err != nil {
return err
}
// selfupdate
err = selfupdate.Apply(newFile, selfupdate.Options{})
if err != nil {
return err
}
return
}
func (c cUp) doAutoFixing(ctx context.Context, dirPath string, version string) (err error) { func (c cUp) doAutoFixing(ctx context.Context, dirPath string, version string) (err error) {
mlog.Printf(`auto fixing directory path "%s" from version "%s" ...`, dirPath, version) mlog.Printf(`auto fixing directory path "%s" from version "%s" ...`, dirPath, version)
command := fmt.Sprintf(`gf fix -p %s`, dirPath) command := fmt.Sprintf(`gf fix -p %s`, dirPath)

View File

@@ -15,6 +15,7 @@ import (
"github.com/gogf/gf/v2/os/gtime" "github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/util/gconv" "github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gtag" "github.com/gogf/gf/v2/util/gtag"
"hotgo/internal/library/hggen/internal/utility/mlog" "hotgo/internal/library/hggen/internal/utility/mlog"
) )

View File

@@ -11,6 +11,9 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/olekukonko/tablewriter"
"github.com/olekukonko/tablewriter/renderer"
"github.com/olekukonko/tablewriter/tw"
"golang.org/x/mod/modfile" "golang.org/x/mod/modfile"
"github.com/gogf/gf/v2/container/garray" "github.com/gogf/gf/v2/container/garray"
@@ -44,8 +47,10 @@ type (
JsonCase string `name:"jsonCase" short:"j" brief:"{CGenDaoBriefJsonCase}" d:"CamelLower"` JsonCase string `name:"jsonCase" short:"j" brief:"{CGenDaoBriefJsonCase}" d:"CamelLower"`
ImportPrefix string `name:"importPrefix" short:"i" brief:"{CGenDaoBriefImportPrefix}"` ImportPrefix string `name:"importPrefix" short:"i" brief:"{CGenDaoBriefImportPrefix}"`
DaoPath string `name:"daoPath" short:"d" brief:"{CGenDaoBriefDaoPath}" d:"dao"` DaoPath string `name:"daoPath" short:"d" brief:"{CGenDaoBriefDaoPath}" d:"dao"`
TablePath string `name:"tablePath" short:"tp" brief:"{CGenDaoBriefTablePath}" d:"table"`
DoPath string `name:"doPath" short:"o" brief:"{CGenDaoBriefDoPath}" d:"model/do"` DoPath string `name:"doPath" short:"o" brief:"{CGenDaoBriefDoPath}" d:"model/do"`
EntityPath string `name:"entityPath" short:"e" brief:"{CGenDaoBriefEntityPath}" d:"model/entity"` EntityPath string `name:"entityPath" short:"e" brief:"{CGenDaoBriefEntityPath}" d:"model/entity"`
TplDaoTablePath string `name:"tplDaoTablePath" short:"t0" brief:"{CGenDaoBriefTplDaoTablePath}"`
TplDaoIndexPath string `name:"tplDaoIndexPath" short:"t1" brief:"{CGenDaoBriefTplDaoIndexPath}"` TplDaoIndexPath string `name:"tplDaoIndexPath" short:"t1" brief:"{CGenDaoBriefTplDaoIndexPath}"`
TplDaoInternalPath string `name:"tplDaoInternalPath" short:"t2" brief:"{CGenDaoBriefTplDaoInternalPath}"` TplDaoInternalPath string `name:"tplDaoInternalPath" short:"t2" brief:"{CGenDaoBriefTplDaoInternalPath}"`
TplDaoDoPath string `name:"tplDaoDoPath" short:"t3" brief:"{CGenDaoBriefTplDaoDoPathPath}"` TplDaoDoPath string `name:"tplDaoDoPath" short:"t3" brief:"{CGenDaoBriefTplDaoDoPathPath}"`
@@ -58,6 +63,7 @@ type (
NoJsonTag bool `name:"noJsonTag" short:"k" brief:"{CGenDaoBriefNoJsonTag}" orphan:"true"` NoJsonTag bool `name:"noJsonTag" short:"k" brief:"{CGenDaoBriefNoJsonTag}" orphan:"true"`
NoModelComment bool `name:"noModelComment" short:"m" brief:"{CGenDaoBriefNoModelComment}" orphan:"true"` NoModelComment bool `name:"noModelComment" short:"m" brief:"{CGenDaoBriefNoModelComment}" orphan:"true"`
Clear bool `name:"clear" short:"a" brief:"{CGenDaoBriefClear}" orphan:"true"` Clear bool `name:"clear" short:"a" brief:"{CGenDaoBriefClear}" orphan:"true"`
GenTable bool `name:"genTable" short:"gt" brief:"{CGenDaoBriefGenTable}" orphan:"true"`
TypeMapping map[DBFieldTypeName]CustomAttributeType `name:"typeMapping" short:"y" brief:"{CGenDaoBriefTypeMapping}" orphan:"true"` TypeMapping map[DBFieldTypeName]CustomAttributeType `name:"typeMapping" short:"y" brief:"{CGenDaoBriefTypeMapping}" orphan:"true"`
FieldMapping map[DBTableFieldName]CustomAttributeType `name:"fieldMapping" short:"fm" brief:"{CGenDaoBriefFieldMapping}" orphan:"true"` FieldMapping map[DBTableFieldName]CustomAttributeType `name:"fieldMapping" short:"fm" brief:"{CGenDaoBriefFieldMapping}" orphan:"true"`
@@ -99,6 +105,20 @@ var (
Type: "float64", Type: "float64",
}, },
} }
// tablewriter Options
twRenderer = tablewriter.WithRenderer(renderer.NewBlueprint(tw.Rendition{
Borders: tw.Border{Top: tw.Off, Bottom: tw.Off, Left: tw.Off, Right: tw.Off},
Settings: tw.Settings{
Separators: tw.Separators{BetweenRows: tw.Off, BetweenColumns: tw.Off},
},
Symbols: tw.NewSymbols(tw.StyleASCII),
}))
twConfig = tablewriter.WithConfig(tablewriter.Config{
Row: tw.CellConfig{
Formatting: tw.CellFormatting{AutoWrap: tw.WrapNone},
},
})
) )
func (c CGenDao) Dao(ctx context.Context, in CGenDaoInput) (out *CGenDaoOutput, err error) { func (c CGenDao) Dao(ctx context.Context, in CGenDaoInput) (out *CGenDaoOutput, err error) {
@@ -177,8 +197,29 @@ func doGenDaoForArray(ctx context.Context, index int, in CGenDaoInput) {
// Table excluding. // Table excluding.
if in.TablesEx != "" { if in.TablesEx != "" {
array := garray.NewStrArrayFrom(tableNames) array := garray.NewStrArrayFrom(tableNames)
for _, v := range gstr.SplitAndTrim(in.TablesEx, ",") { for _, p := range gstr.SplitAndTrim(in.TablesEx, ",") {
array.RemoveValue(v) if gstr.Contains(p, "*") || gstr.Contains(p, "?") {
p = gstr.ReplaceByMap(p, map[string]string{
"\r": "",
"\n": "",
})
p = gstr.ReplaceByMap(p, map[string]string{
"*": "\r",
"?": "\n",
})
p = gregex.Quote(p)
p = gstr.ReplaceByMap(p, map[string]string{
"\r": ".*",
"\n": ".",
})
for _, v := range array.Clone().Slice() {
if gregex.IsMatchString(p, v) {
array.RemoveValue(v)
}
}
} else {
array.RemoveValue(p)
}
} }
tableNames = array.Slice() tableNames = array.Slice()
} }
@@ -223,14 +264,18 @@ func doGenDaoForArray(ctx context.Context, index int, in CGenDaoInput) {
tableNames[i] = "" tableNames[i] = ""
continue continue
} }
shardingNewTableSet.Add(newTableName) // Add prefix to sharding table name, if not, the isSharding check would not match.
shardingNewTableSet.Add(in.Prefix + newTableName)
} }
} }
newTableName = in.Prefix + newTableName newTableName = in.Prefix + newTableName
newTableNames[i] = newTableName if tableNames[i] != "" {
// If shardingNewTableSet contains newTableName (tableName is empty), it should not be added to tableNames, make it empty and filter later.
newTableNames[i] = newTableName
}
} }
tableNames = garray.NewStrArrayFrom(tableNames).FilterEmpty().Slice() tableNames = garray.NewStrArrayFrom(tableNames).FilterEmpty().Slice()
newTableNames = garray.NewStrArrayFrom(newTableNames).FilterEmpty().Slice() // Filter empty table names. make sure that newTableNames and tableNames have the same length.
in.genItems.Scale() in.genItems.Scale()
// Dao: index and internal. // Dao: index and internal.
@@ -241,6 +286,14 @@ func doGenDaoForArray(ctx context.Context, index int, in CGenDaoInput) {
NewTableNames: newTableNames, NewTableNames: newTableNames,
ShardingTableSet: shardingNewTableSet, ShardingTableSet: shardingNewTableSet,
}) })
// Table: table fields.
generateTable(ctx, CGenDaoInternalInput{
CGenDaoInput: in,
DB: db,
TableNames: tableNames,
NewTableNames: newTableNames,
ShardingTableSet: shardingNewTableSet,
})
// Do. // Do.
generateDo(ctx, CGenDaoInternalInput{ generateDo(ctx, CGenDaoInternalInput{
CGenDaoInput: in, CGenDaoInput: in,

View File

@@ -127,6 +127,7 @@ func generateDaoIndex(in generateDaoIndexInput) {
tplView.ClearAssigns() tplView.ClearAssigns()
tplView.Assigns(gview.Params{ tplView.Assigns(gview.Params{
tplVarTableSharding: in.IsSharding, tplVarTableSharding: in.IsSharding,
tplVarTableShardingPrefix: in.NewTableName + "_",
tplVarImportPrefix: in.ImportPrefix, tplVarImportPrefix: in.ImportPrefix,
tplVarTableName: in.TableName, tplVarTableName: in.TableName,
tplVarTableNameCamelCase: in.TableNameCamelCase, tplVarTableNameCamelCase: in.TableNameCamelCase,
@@ -210,13 +211,9 @@ func generateColumnNamesForDao(fieldMap map[string]*gdb.TableField, removeFieldP
fmt.Sprintf(` #"%s",`, field.Name), fmt.Sprintf(` #"%s",`, field.Name),
} }
} }
tw := tablewriter.NewWriter(buffer) table := tablewriter.NewTable(buffer, twRenderer, twConfig)
tw.SetBorder(false) table.Bulk(array)
tw.SetRowLine(false) table.Render()
tw.SetAutoWrapText(false)
tw.SetColumnSeparator("")
tw.AppendBulk(array)
tw.Render()
namesContent := buffer.String() namesContent := buffer.String()
// Let's do this hack of table writer for indent! // Let's do this hack of table writer for indent!
namesContent = gstr.Replace(namesContent, " #", "") namesContent = gstr.Replace(namesContent, " #", "")
@@ -251,13 +248,9 @@ func generateColumnDefinitionForDao(fieldMap map[string]*gdb.TableField, removeF
" #" + fmt.Sprintf(`// %s`, comment), " #" + fmt.Sprintf(`// %s`, comment),
} }
} }
tw := tablewriter.NewWriter(buffer) table := tablewriter.NewTable(buffer, twRenderer, twConfig)
tw.SetBorder(false) table.Bulk(array)
tw.SetRowLine(false) table.Render()
tw.SetAutoWrapText(false)
tw.SetColumnSeparator("")
tw.AppendBulk(array)
tw.Render()
defineContent := buffer.String() defineContent := buffer.String()
// Let's do this hack of table writer for indent! // Let's do this hack of table writer for indent!
defineContent = gstr.Replace(defineContent, " #", "") defineContent = gstr.Replace(defineContent, " #", "")

View File

@@ -45,14 +45,14 @@ func generateDo(ctx context.Context, in CGenDaoInternalInput) {
IsDo: true, IsDo: true,
}) })
) )
// replace all types to interface{}. // replace all types to any.
structDefinition, _ = gregex.ReplaceStringFuncMatch( structDefinition, _ = gregex.ReplaceStringFuncMatch(
"([A-Z]\\w*?)\\s+([\\w\\*\\.]+?)\\s+(//)", "([A-Z]\\w*?)\\s+([\\w\\*\\.]+?)\\s+(//)",
structDefinition, structDefinition,
func(match []string) string { func(match []string) string {
// If the type is already a pointer/slice/map, it does nothing. // If the type is already a pointer/slice/map, it does nothing.
if !gstr.HasPrefix(match[2], "*") && !gstr.HasPrefix(match[2], "[]") && !gstr.HasPrefix(match[2], "map") { if !gstr.HasPrefix(match[2], "*") && !gstr.HasPrefix(match[2], "[]") && !gstr.HasPrefix(match[2], "map") {
return fmt.Sprintf(`%s interface{} %s`, match[1], match[3]) return fmt.Sprintf(`%s any %s`, match[1], match[3])
} }
return match[0] return match[0]
}, },

View File

@@ -41,28 +41,55 @@ func generateStructDefinition(ctx context.Context, in generateStructDefinitionIn
appendImports = append(appendImports, imports) appendImports = append(appendImports, imports)
} }
} }
tw := tablewriter.NewWriter(buffer) table := tablewriter.NewTable(buffer, twRenderer, twConfig)
tw.SetBorder(false) table.Bulk(array)
tw.SetRowLine(false) table.Render()
tw.SetAutoWrapText(false)
tw.SetColumnSeparator("")
tw.AppendBulk(array)
tw.Render()
stContent := buffer.String() stContent := buffer.String()
// Let's do this hack of table writer for indent! // Let's do this hack of table writer for indent!
stContent = gstr.Replace(stContent, " #", "") stContent = gstr.Replace(stContent, " #", "")
stContent = gstr.Replace(stContent, "` ", "`") stContent = gstr.Replace(stContent, "` ", "`")
stContent = gstr.Replace(stContent, "``", "") stContent = gstr.Replace(stContent, "``", "")
buffer.Reset() buffer.Reset()
buffer.WriteString(fmt.Sprintf("type %s struct {\n", in.StructName)) fmt.Fprintf(buffer, "type %s struct {\n", in.StructName)
if in.IsDo { if in.IsDo {
buffer.WriteString(fmt.Sprintf("g.Meta `orm:\"table:%s, do:true\"`\n", in.TableName)) fmt.Fprintf(buffer, "g.Meta `orm:\"table:%s, do:true\"`\n", in.TableName)
} }
buffer.WriteString(stContent) buffer.WriteString(stContent)
buffer.WriteString("}") buffer.WriteString("}")
return buffer.String(), appendImports return buffer.String(), appendImports
} }
func getTypeMappingInfo(
ctx context.Context, fieldType string, inTypeMapping map[DBFieldTypeName]CustomAttributeType,
) (typeNameStr, importStr string) {
if typeMapping, ok := inTypeMapping[strings.ToLower(fieldType)]; ok {
typeNameStr = typeMapping.Type
importStr = typeMapping.Import
return
}
tryTypeMatch, _ := gregex.MatchString(`(.+?)\(([^\(\)]+)\)([\s\)]*)`, fieldType)
var (
tryTypeName string
moreTry bool
)
if len(tryTypeMatch) == 4 {
tryTypeMatch3, _ := gregex.ReplaceString(`\s+`, "", tryTypeMatch[3])
tryTypeName = gstr.Trim(tryTypeMatch[1]) + tryTypeMatch3
moreTry = tryTypeMatch3 != ""
} else {
tryTypeName = gstr.Split(fieldType, " ")[0]
}
if tryTypeName != "" {
if typeMapping, ok := inTypeMapping[strings.ToLower(tryTypeName)]; ok {
typeNameStr = typeMapping.Type
importStr = typeMapping.Import
} else if moreTry {
typeNameStr, importStr = getTypeMappingInfo(ctx, tryTypeName, inTypeMapping)
}
}
return
}
// generateStructFieldDefinition generates and returns the attribute definition for specified field. // generateStructFieldDefinition generates and returns the attribute definition for specified field.
func generateStructFieldDefinition( func generateStructFieldDefinition(
ctx context.Context, field *gdb.TableField, in generateStructDefinitionInput, ctx context.Context, field *gdb.TableField, in generateStructDefinitionInput,
@@ -75,21 +102,7 @@ func generateStructFieldDefinition(
) )
if in.TypeMapping != nil && len(in.TypeMapping) > 0 { if in.TypeMapping != nil && len(in.TypeMapping) > 0 {
var ( localTypeNameStr, appendImport = getTypeMappingInfo(ctx, field.Type, in.TypeMapping)
tryTypeName string
)
tryTypeMatch, _ := gregex.MatchString(`(.+?)\((.+)\)`, field.Type)
if len(tryTypeMatch) == 3 {
tryTypeName = gstr.Trim(tryTypeMatch[1])
} else {
tryTypeName = gstr.Split(field.Type, " ")[0]
}
if tryTypeName != "" {
if typeMapping, ok := in.TypeMapping[strings.ToLower(tryTypeName)]; ok {
localTypeNameStr = typeMapping.Type
appendImport = typeMapping.Import
}
}
} }
if localTypeNameStr == "" { if localTypeNameStr == "" {

View File

@@ -0,0 +1,147 @@
// Copyright GoFrame gf Author(https://goframe.org). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://github.com/gogf/gf.
package gendao
import (
"bytes"
"context"
"path/filepath"
"sort"
"strconv"
"strings"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gview"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/internal/library/hggen/internal/consts"
"hotgo/internal/library/hggen/internal/utility/mlog"
"hotgo/internal/library/hggen/internal/utility/utils"
)
// generateTable generates dao files for given tables.
func generateTable(ctx context.Context, in CGenDaoInternalInput) {
dirPathTable := gfile.Join(in.Path, in.TablePath)
if !in.GenTable {
if gfile.Exists(dirPathTable) {
in.genItems.AppendDirPath(dirPathTable)
}
return
}
in.genItems.AppendDirPath(dirPathTable)
for i := 0; i < len(in.TableNames); i++ {
var (
realTableName = in.TableNames[i]
newTableName = in.NewTableNames[i]
)
generateTableSingle(ctx, generateTableSingleInput{
CGenDaoInternalInput: in,
TableName: realTableName,
NewTableName: newTableName,
DirPathTable: dirPathTable,
})
}
}
// generateTableSingleInput is the input parameter for generateTableSingle.
type generateTableSingleInput struct {
CGenDaoInternalInput
// TableName specifies the table name of the table.
TableName string
// NewTableName specifies the prefix-stripped or custom edited name of the table.
NewTableName string
DirPathTable string
}
// generateTableSingle generates dao files for a single table.
func generateTableSingle(ctx context.Context, in generateTableSingleInput) {
// Generating table data preparing.
fieldMap, err := in.DB.TableFields(ctx, in.TableName)
if err != nil {
mlog.Fatalf(`fetching tables fields failed for table "%s": %+v`, in.TableName, err)
}
tableNameSnakeCase := gstr.CaseSnake(in.NewTableName)
fileName := gstr.Trim(tableNameSnakeCase, "-_.")
if len(fileName) > 5 && fileName[len(fileName)-5:] == "_test" {
// Add suffix to avoid the table name which contains "_test",
// which would make the go file a testing file.
fileName += "_table"
}
path := filepath.FromSlash(gfile.Join(in.DirPathTable, fileName+".go"))
in.genItems.AppendGeneratedFilePath(path)
if in.OverwriteDao || !gfile.Exists(path) {
var (
ctx = context.Background()
tplContent = getTemplateFromPathOrDefault(
in.TplDaoTablePath, consts.TemplateGenTableContent,
)
)
tplView.ClearAssigns()
tplView.Assigns(gview.Params{
tplVarGroupName: in.Group,
tplVarTableName: in.TableName,
tplVarTableNameCamelCase: formatFieldName(in.NewTableName, FieldNameCaseCamel),
tplVarPackageName: filepath.Base(in.TablePath),
tplVarTableFields: generateTableFields(fieldMap),
})
indexContent, err := tplView.ParseContent(ctx, tplContent)
if err != nil {
mlog.Fatalf("parsing template content failed: %v", err)
}
if err = gfile.PutContents(path, strings.TrimSpace(indexContent)); err != nil {
mlog.Fatalf("writing content to '%s' failed: %v", path, err)
} else {
utils.GoFmt(path)
mlog.Print("generated:", gfile.RealPath(path))
}
}
}
// generateTableFields generates and returns the field definition content for specified table.
func generateTableFields(fields map[string]*gdb.TableField) string {
var buf bytes.Buffer
fieldNames := make([]string, 0, len(fields))
for fieldName := range fields {
fieldNames = append(fieldNames, fieldName)
}
sort.Slice(fieldNames, func(i, j int) bool {
return fields[fieldNames[i]].Index < fields[fieldNames[j]].Index // asc
})
for index, fieldName := range fieldNames {
field := fields[fieldName]
buf.WriteString(" " + strconv.Quote(field.Name) + ": {\n")
buf.WriteString(" Index: " + gconv.String(field.Index) + ",\n")
buf.WriteString(" Name: " + strconv.Quote(field.Name) + ",\n")
buf.WriteString(" Type: " + strconv.Quote(field.Type) + ",\n")
buf.WriteString(" Null: " + gconv.String(field.Null) + ",\n")
buf.WriteString(" Key: " + strconv.Quote(field.Key) + ",\n")
buf.WriteString(" Default: " + generateDefaultValue(field.Default) + ",\n")
buf.WriteString(" Extra: " + strconv.Quote(field.Extra) + ",\n")
buf.WriteString(" Comment: " + strconv.Quote(field.Comment) + ",\n")
buf.WriteString(" },")
if index != len(fieldNames)-1 {
buf.WriteString("\n")
}
}
return buf.String()
}
// generateDefaultValue generates and returns the default value definition for specified field.
func generateDefaultValue(value interface{}) string {
if value == nil {
return "nil"
}
switch v := value.(type) {
case string:
return strconv.Quote(v)
default:
return gconv.String(v)
}
}

View File

@@ -60,6 +60,7 @@ CONFIGURATION SUPPORT
CGenDaoBriefGJsonSupport = `use gJsonSupport to use *gjson.Json instead of string for generated json fields of tables` CGenDaoBriefGJsonSupport = `use gJsonSupport to use *gjson.Json instead of string for generated json fields of tables`
CGenDaoBriefImportPrefix = `custom import prefix for generated go files` CGenDaoBriefImportPrefix = `custom import prefix for generated go files`
CGenDaoBriefDaoPath = `directory path for storing generated dao files under path` CGenDaoBriefDaoPath = `directory path for storing generated dao files under path`
CGenDaoBriefTablePath = `directory path for storing generated table files under path`
CGenDaoBriefDoPath = `directory path for storing generated do files under path` CGenDaoBriefDoPath = `directory path for storing generated do files under path`
CGenDaoBriefEntityPath = `directory path for storing generated entity files under path` CGenDaoBriefEntityPath = `directory path for storing generated entity files under path`
CGenDaoBriefOverwriteDao = `overwrite all dao files both inside/outside internal folder` CGenDaoBriefOverwriteDao = `overwrite all dao files both inside/outside internal folder`
@@ -69,6 +70,7 @@ CONFIGURATION SUPPORT
CGenDaoBriefNoJsonTag = `no json tag will be added for each field` CGenDaoBriefNoJsonTag = `no json tag will be added for each field`
CGenDaoBriefNoModelComment = `no model comment will be added for each field` CGenDaoBriefNoModelComment = `no model comment will be added for each field`
CGenDaoBriefClear = `delete all generated go files that do not exist in database` CGenDaoBriefClear = `delete all generated go files that do not exist in database`
CGenDaoBriefGenTable = `generate table files`
CGenDaoBriefTypeMapping = `custom local type mapping for generated struct attributes relevant to fields of table` CGenDaoBriefTypeMapping = `custom local type mapping for generated struct attributes relevant to fields of table`
CGenDaoBriefFieldMapping = `custom local type mapping for generated struct attributes relevant to specific fields of table` CGenDaoBriefFieldMapping = `custom local type mapping for generated struct attributes relevant to specific fields of table`
CGenDaoBriefShardingPattern = `sharding pattern for table name, e.g. "users_?" will be replace tables "users_001,users_002,..." to "users" dao` CGenDaoBriefShardingPattern = `sharding pattern for table name, e.g. "users_?" will be replace tables "users_001,users_002,..." to "users" dao`
@@ -97,6 +99,8 @@ generated json tag case for model struct, cases are as follows:
tplVarTableNameCamelCase = `TplTableNameCamelCase` tplVarTableNameCamelCase = `TplTableNameCamelCase`
tplVarTableNameCamelLowerCase = `TplTableNameCamelLowerCase` tplVarTableNameCamelLowerCase = `TplTableNameCamelLowerCase`
tplVarTableSharding = `TplTableSharding` tplVarTableSharding = `TplTableSharding`
tplVarTableShardingPrefix = `TplTableShardingPrefix`
tplVarTableFields = `TplTableFields`
tplVarPackageImports = `TplPackageImports` tplVarPackageImports = `TplPackageImports`
tplVarImportPrefix = `TplImportPrefix` tplVarImportPrefix = `TplImportPrefix`
tplVarStructDefine = `TplStructDefine` tplVarStructDefine = `TplStructDefine`
@@ -125,6 +129,7 @@ func init() {
`CGenDaoBriefStdTime`: CGenDaoBriefStdTime, `CGenDaoBriefStdTime`: CGenDaoBriefStdTime,
`CGenDaoBriefWithTime`: CGenDaoBriefWithTime, `CGenDaoBriefWithTime`: CGenDaoBriefWithTime,
`CGenDaoBriefDaoPath`: CGenDaoBriefDaoPath, `CGenDaoBriefDaoPath`: CGenDaoBriefDaoPath,
`CGenDaoBriefTablePath`: CGenDaoBriefTablePath,
`CGenDaoBriefDoPath`: CGenDaoBriefDoPath, `CGenDaoBriefDoPath`: CGenDaoBriefDoPath,
`CGenDaoBriefEntityPath`: CGenDaoBriefEntityPath, `CGenDaoBriefEntityPath`: CGenDaoBriefEntityPath,
`CGenDaoBriefGJsonSupport`: CGenDaoBriefGJsonSupport, `CGenDaoBriefGJsonSupport`: CGenDaoBriefGJsonSupport,
@@ -136,6 +141,7 @@ func init() {
`CGenDaoBriefNoJsonTag`: CGenDaoBriefNoJsonTag, `CGenDaoBriefNoJsonTag`: CGenDaoBriefNoJsonTag,
`CGenDaoBriefNoModelComment`: CGenDaoBriefNoModelComment, `CGenDaoBriefNoModelComment`: CGenDaoBriefNoModelComment,
`CGenDaoBriefClear`: CGenDaoBriefClear, `CGenDaoBriefClear`: CGenDaoBriefClear,
`CGenDaoBriefGenTable`: CGenDaoBriefGenTable,
`CGenDaoBriefTypeMapping`: CGenDaoBriefTypeMapping, `CGenDaoBriefTypeMapping`: CGenDaoBriefTypeMapping,
`CGenDaoBriefFieldMapping`: CGenDaoBriefFieldMapping, `CGenDaoBriefFieldMapping`: CGenDaoBriefFieldMapping,
`CGenDaoBriefShardingPattern`: CGenDaoBriefShardingPattern, `CGenDaoBriefShardingPattern`: CGenDaoBriefShardingPattern,

View File

@@ -113,12 +113,12 @@ func (p *EnumsParser) ParsePackage(pkg *packages.Package) {
} }
func (p *EnumsParser) Export() string { func (p *EnumsParser) Export() string {
var typeEnumMap = make(map[string][]interface{}) var typeEnumMap = make(map[string][]any)
for _, enum := range p.enums { for _, enum := range p.enums {
if typeEnumMap[enum.Type] == nil { if typeEnumMap[enum.Type] == nil {
typeEnumMap[enum.Type] = make([]interface{}, 0) typeEnumMap[enum.Type] = make([]any, 0)
} }
var value interface{} var value any
switch enum.Kind { switch enum.Kind {
case constant.Int: case constant.Int:
value = gconv.Int64(enum.Value) value = gconv.Int64(enum.Value)

View File

@@ -109,7 +109,7 @@ func (c CGenPb) tagCommentIntoListMap(comment string, lineTagMap *gmap.ListMap)
func (c CGenPb) listMapToStructTag(lineTagMap *gmap.ListMap) string { func (c CGenPb) listMapToStructTag(lineTagMap *gmap.ListMap) string {
var tag string var tag string
lineTagMap.Iterator(func(key, value interface{}) bool { lineTagMap.Iterator(func(key, value any) bool {
if tag != "" { if tag != "" {
tag += " " tag += " "
} }

View File

@@ -15,6 +15,8 @@ import (
"strings" "strings"
"github.com/olekukonko/tablewriter" "github.com/olekukonko/tablewriter"
"github.com/olekukonko/tablewriter/renderer"
"github.com/olekukonko/tablewriter/tw"
"github.com/gogf/gf/v2/container/garray" "github.com/gogf/gf/v2/container/garray"
"github.com/gogf/gf/v2/container/gset" "github.com/gogf/gf/v2/container/gset"
@@ -37,18 +39,19 @@ type (
CGenPbEntity struct{} CGenPbEntity struct{}
CGenPbEntityInput struct { CGenPbEntityInput struct {
g.Meta `name:"pbentity" config:"{CGenPbEntityConfig}" brief:"{CGenPbEntityBrief}" eg:"{CGenPbEntityEg}" ad:"{CGenPbEntityAd}"` g.Meta `name:"pbentity" config:"{CGenPbEntityConfig}" brief:"{CGenPbEntityBrief}" eg:"{CGenPbEntityEg}" ad:"{CGenPbEntityAd}"`
Path string `name:"path" short:"p" brief:"{CGenPbEntityBriefPath}" d:"manifest/protobuf/pbentity"` Path string `name:"path" short:"p" brief:"{CGenPbEntityBriefPath}" d:"manifest/protobuf/pbentity"`
Package string `name:"package" short:"k" brief:"{CGenPbEntityBriefPackage}"` Package string `name:"package" short:"k" brief:"{CGenPbEntityBriefPackage}"`
GoPackage string `name:"goPackage" short:"g" brief:"{CGenPbEntityBriefGoPackage}"` GoPackage string `name:"goPackage" short:"g" brief:"{CGenPbEntityBriefGoPackage}"`
Link string `name:"link" short:"l" brief:"{CGenPbEntityBriefLink}"` Link string `name:"link" short:"l" brief:"{CGenPbEntityBriefLink}"`
Tables string `name:"tables" short:"t" brief:"{CGenPbEntityBriefTables}"` Tables string `name:"tables" short:"t" brief:"{CGenPbEntityBriefTables}"`
Prefix string `name:"prefix" short:"f" brief:"{CGenPbEntityBriefPrefix}"` Prefix string `name:"prefix" short:"f" brief:"{CGenPbEntityBriefPrefix}"`
RemovePrefix string `name:"removePrefix" short:"r" brief:"{CGenPbEntityBriefRemovePrefix}"` RemovePrefix string `name:"removePrefix" short:"r" brief:"{CGenPbEntityBriefRemovePrefix}"`
RemoveFieldPrefix string `name:"removeFieldPrefix" short:"rf" brief:"{CGenPbEntityBriefRemoveFieldPrefix}"` RemoveFieldPrefix string `name:"removeFieldPrefix" short:"rf" brief:"{CGenPbEntityBriefRemoveFieldPrefix}"`
TablesEx string `name:"tablesEx" short:"x" brief:"{CGenDaoBriefTablesEx}"` TablesEx string `name:"tablesEx" short:"x" brief:"{CGenDaoBriefTablesEx}"`
NameCase string `name:"nameCase" short:"n" brief:"{CGenPbEntityBriefNameCase}" d:"Camel"` NameCase string `name:"nameCase" short:"n" brief:"{CGenPbEntityBriefNameCase}" d:"Camel"`
JsonCase string `name:"jsonCase" short:"j" brief:"{CGenPbEntityBriefJsonCase}" d:"none"` JsonCase string `name:"jsonCase" short:"j" brief:"{CGenPbEntityBriefJsonCase}" d:"none"`
Option string `name:"option" short:"o" brief:"{CGenPbEntityBriefOption}"` Option string `name:"option" short:"o" brief:"{CGenPbEntityBriefOption}"`
ShardingPattern []string `name:"shardingPattern" short:"sp" brief:"{CGenDaoBriefShardingPattern}"`
TypeMapping map[DBFieldTypeName]CustomAttributeType `name:"typeMapping" short:"y" brief:"{CGenPbEntityBriefTypeMapping}" orphan:"true"` TypeMapping map[DBFieldTypeName]CustomAttributeType `name:"typeMapping" short:"y" brief:"{CGenPbEntityBriefTypeMapping}" orphan:"true"`
FieldMapping map[DBTableFieldName]CustomAttributeType `name:"fieldMapping" short:"fm" brief:"{CGenPbEntityBriefFieldMapping}" orphan:"true"` FieldMapping map[DBTableFieldName]CustomAttributeType `name:"fieldMapping" short:"fm" brief:"{CGenPbEntityBriefFieldMapping}" orphan:"true"`
@@ -122,6 +125,7 @@ CONFIGURATION SUPPORT
CGenPbEntityBriefTablesEx = `generate all models exclude the specified tables, multiple prefix separated with ','` CGenPbEntityBriefTablesEx = `generate all models exclude the specified tables, multiple prefix separated with ','`
CGenPbEntityBriefRemoveFieldPrefix = `remove specified prefix of the field, multiple prefix separated with ','` CGenPbEntityBriefRemoveFieldPrefix = `remove specified prefix of the field, multiple prefix separated with ','`
CGenPbEntityBriefOption = `extra protobuf options` CGenPbEntityBriefOption = `extra protobuf options`
CGenPbEntityBriefShardingPattern = `sharding pattern for table name, e.g. "users_?" will replace tables "users_001,users_002,..." to "users" pbentity`
CGenPbEntityBriefGroup = ` CGenPbEntityBriefGroup = `
specifying the configuration group name of database for generated ORM instance, specifying the configuration group name of database for generated ORM instance,
it's not necessary and the default value is "default" it's not necessary and the default value is "default"
@@ -252,6 +256,7 @@ func init() {
`CGenPbEntityBriefNameCase`: CGenPbEntityBriefNameCase, `CGenPbEntityBriefNameCase`: CGenPbEntityBriefNameCase,
`CGenPbEntityBriefJsonCase`: CGenPbEntityBriefJsonCase, `CGenPbEntityBriefJsonCase`: CGenPbEntityBriefJsonCase,
`CGenPbEntityBriefOption`: CGenPbEntityBriefOption, `CGenPbEntityBriefOption`: CGenPbEntityBriefOption,
`CGenPbEntityBriefShardingPattern`: CGenPbEntityBriefShardingPattern,
`CGenPbEntityBriefTypeMapping`: CGenPbEntityBriefTypeMapping, `CGenPbEntityBriefTypeMapping`: CGenPbEntityBriefTypeMapping,
`CGenPbEntityBriefFieldMapping`: CGenPbEntityBriefFieldMapping, `CGenPbEntityBriefFieldMapping`: CGenPbEntityBriefFieldMapping,
}) })
@@ -321,6 +326,7 @@ func doGenPbEntityForArray(ctx context.Context, index int, in CGenPbEntityInput)
} }
tableNames := ([]string)(nil) tableNames := ([]string)(nil)
shardingNewTableSet := gset.NewStrSet()
if in.Tables != "" { if in.Tables != "" {
tableNames = gstr.SplitAndTrim(in.Tables, ",") tableNames = gstr.SplitAndTrim(in.Tables, ",")
} else { } else {
@@ -348,6 +354,31 @@ func doGenPbEntityForArray(ctx context.Context, index int, in CGenPbEntityInput)
for _, v := range removePrefixArray { for _, v := range removePrefixArray {
newTableName = gstr.TrimLeftStr(newTableName, v, 1) newTableName = gstr.TrimLeftStr(newTableName, v, 1)
} }
var shardingTableName string
if len(in.ShardingPattern) > 0 {
for _, pattern := range in.ShardingPattern {
var (
match []string
regPattern = gstr.Replace(pattern, "?", `(.+)`)
)
match, err = gregex.MatchString(regPattern, newTableName)
if err != nil {
mlog.Fatalf(`invalid sharding pattern "%s": %+v`, pattern, err)
}
if len(match) < 2 {
continue
}
shardingTableName = gstr.Replace(pattern, "?", "")
shardingTableName = gstr.Trim(shardingTableName, `_.-`)
}
}
if shardingTableName != "" {
if shardingNewTableSet.Contains(shardingTableName) {
continue
}
shardingNewTableSet.Add(shardingTableName)
newTableName = shardingTableName
}
generatePbEntityContentFile(ctx, CGenPbEntityInternalInput{ generatePbEntityContentFile(ctx, CGenPbEntityInternalInput{
CGenPbEntityInput: in, CGenPbEntityInput: in,
DB: db, DB: db,
@@ -414,13 +445,22 @@ func generateEntityMessageDefinition(entityName string, fieldMap map[string]*gdb
appendImports = append(appendImports, imports) appendImports = append(appendImports, imports)
} }
} }
tw := tablewriter.NewWriter(buffer) table := tablewriter.NewTable(buffer,
tw.SetBorder(false) tablewriter.WithRenderer(renderer.NewBlueprint(tw.Rendition{
tw.SetRowLine(false) Borders: tw.Border{Top: tw.Off, Bottom: tw.Off, Left: tw.On, Right: tw.Off},
tw.SetAutoWrapText(false) Settings: tw.Settings{
tw.SetColumnSeparator("") Separators: tw.Separators{BetweenRows: tw.Off, BetweenColumns: tw.Off},
tw.AppendBulk(array) },
tw.Render() Symbols: tw.NewSymbolCustom("Proto").WithColumn(" "),
})),
tablewriter.WithConfig(tablewriter.Config{
Row: tw.CellConfig{
Formatting: tw.CellFormatting{AutoWrap: tw.WrapNone},
},
}),
)
table.Bulk(array)
table.Render()
stContent := buffer.String() stContent := buffer.String()
// Let's do this hack of table writer for indent! // Let's do this hack of table writer for indent!
stContent = regexp.MustCompile(`\s+\n`).ReplaceAllString(gstr.Replace(stContent, " #", ""), "\n") stContent = regexp.MustCompile(`\s+\n`).ReplaceAllString(gstr.Replace(stContent, " #", ""), "\n")
@@ -441,14 +481,23 @@ func generateMessageFieldForPbEntity(index int, field *gdb.TableField, in CGenPb
err error err error
ctx = gctx.GetInitCtx() ctx = gctx.GetInitCtx()
) )
if in.TypeMapping != nil && len(in.TypeMapping) > 0 { if in.TypeMapping != nil && len(in.TypeMapping) > 0 {
// match typeMapping after local type transform.
// eg: double => string, varchar => string etc.
localTypeName, err = in.DB.CheckLocalTypeForField(ctx, field.Type, nil) localTypeName, err = in.DB.CheckLocalTypeForField(ctx, field.Type, nil)
if err != nil { if err != nil {
panic(err) panic(err)
} }
if localTypeName != "" { if localTypeName != "" {
if typeMapping, ok := in.TypeMapping[strings.ToLower(string(localTypeName))]; ok { if typeMappingLocal, localOk := in.TypeMapping[strings.ToLower(string(localTypeName))]; localOk {
localTypeNameStr = typeMappingLocal.Type
appendImport = typeMappingLocal.Import
}
}
// Try match unknown / string localTypeName with db type.
if localTypeName == "" || localTypeName == gdb.LocalTypeString {
formattedFieldType, _ := in.DB.GetFormattedDBTypeNameForField(field.Type)
if typeMapping, ok := in.TypeMapping[strings.ToLower(formattedFieldType)]; ok {
localTypeNameStr = typeMapping.Type localTypeNameStr = typeMapping.Type
appendImport = typeMapping.Import appendImport = typeMapping.Import
} }

View File

@@ -23,6 +23,7 @@ import (
"github.com/gogf/gf/v2/text/gstr" "github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv" "github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gtag" "github.com/gogf/gf/v2/util/gtag"
"hotgo/internal/library/hggen/internal/utility/mlog" "hotgo/internal/library/hggen/internal/utility/mlog"
"hotgo/internal/library/hggen/internal/utility/utils" "hotgo/internal/library/hggen/internal/utility/utils"
) )

View File

@@ -33,7 +33,7 @@ func (c CGenService) generateType(generatedContent *bytes.Buffer, srcStructFunct
generatedContent.WriteString("type(") generatedContent.WriteString("type(")
generatedContent.WriteString("\n") generatedContent.WriteString("\n")
srcStructFunctions.Iterator(func(key, value interface{}) bool { srcStructFunctions.Iterator(func(key, value any) bool {
var ( var (
funcContents = make([]string, 0) funcContents = make([]string, 0)
funcContent string funcContent string
@@ -71,7 +71,7 @@ func (c CGenService) generateVar(generatedContent *bytes.Buffer, srcStructFuncti
// Generating variable and register definitions. // Generating variable and register definitions.
var variableContent string var variableContent string
srcStructFunctions.Iterator(func(key, value interface{}) bool { srcStructFunctions.Iterator(func(key, value any) bool {
structName := key.(string) structName := key.(string)
variableContent += gstr.Trim(gstr.ReplaceByMap(consts.TemplateGenServiceContentVariable, g.MapStrStr{ variableContent += gstr.Trim(gstr.ReplaceByMap(consts.TemplateGenServiceContentVariable, g.MapStrStr{
"{StructName}": structName, "{StructName}": structName,
@@ -93,7 +93,7 @@ func (c CGenService) generateVar(generatedContent *bytes.Buffer, srcStructFuncti
// See: const.TemplateGenServiceContentRegister // See: const.TemplateGenServiceContentRegister
func (c CGenService) generateFunc(generatedContent *bytes.Buffer, srcStructFunctions *gmap.ListMap) { func (c CGenService) generateFunc(generatedContent *bytes.Buffer, srcStructFunctions *gmap.ListMap) {
// Variable register function definitions. // Variable register function definitions.
srcStructFunctions.Iterator(func(key, value interface{}) bool { srcStructFunctions.Iterator(func(key, value any) bool {
structName := key.(string) structName := key.(string)
generatedContent.WriteString(gstr.Trim(gstr.ReplaceByMap(consts.TemplateGenServiceContentRegister, g.MapStrStr{ generatedContent.WriteString(gstr.Trim(gstr.ReplaceByMap(consts.TemplateGenServiceContentRegister, g.MapStrStr{
"{StructName}": structName, "{StructName}": structName,

View File

@@ -27,7 +27,7 @@ var (
// {{.TplTableNameCamelCase}} is a globally accessible object for table {{.TplTableName}} operations. // {{.TplTableNameCamelCase}} is a globally accessible object for table {{.TplTableName}} operations.
{{.TplTableNameCamelCase}} = {{.TplTableNameCamelLowerCase}}Dao{ {{.TplTableNameCamelCase}} = {{.TplTableNameCamelLowerCase}}Dao{
{{- if .TplTableSharding -}} {{- if .TplTableSharding -}}
internal.New{{.TplTableNameCamelCase}}Dao(userShardingHandler), internal.New{{.TplTableNameCamelCase}}Dao({{.TplTableNameCamelLowerCase}}ShardingHandler),
{{- else -}} {{- else -}}
internal.New{{.TplTableNameCamelCase}}Dao(), internal.New{{.TplTableNameCamelCase}}Dao(),
{{- end -}} {{- end -}}
@@ -35,13 +35,13 @@ var (
) )
{{if .TplTableSharding -}} {{if .TplTableSharding -}}
// userShardingHandler is the handler for sharding operations. // {{.TplTableNameCamelLowerCase}}ShardingHandler is the handler for sharding operations.
// You can fill this sharding handler with your custom implementation. // You can fill this sharding handler with your custom implementation.
func userShardingHandler(m *gdb.Model) *gdb.Model { func {{.TplTableNameCamelLowerCase}}ShardingHandler(m *gdb.Model) *gdb.Model {
m = m.Sharding(gdb.ShardingConfig{ m = m.Sharding(gdb.ShardingConfig{
Table: gdb.ShardingTableConfig{ Table: gdb.ShardingTableConfig{
Enable: true, Enable: true,
Prefix: "", Prefix: "{{.TplTableShardingPrefix}}",
// Replace Rule field with your custom sharding rule. // Replace Rule field with your custom sharding rule.
// Or you can use "&gdb.DefaultShardingRule{}" for default sharding rule. // Or you can use "&gdb.DefaultShardingRule{}" for default sharding rule.
Rule: nil, Rule: nil,

View File

@@ -0,0 +1,35 @@
// Copyright GoFrame gf Author(https://goframe.org). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://github.com/gogf/gf.
package consts
const TemplateGenTableContent = `
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package {{.TplPackageName}}
import (
"context"
"github.com/gogf/gf/v2/database/gdb"
)
// {{.TplTableNameCamelCase}} defines the fields of table "{{.TplTableName}}" with their properties.
// This map is used internally by GoFrame ORM to understand table structure.
var {{.TplTableNameCamelCase}} = map[string]*gdb.TableField{
{{.TplTableFields}}
}
// Set{{.TplTableNameCamelCase}}TableFields registers the table fields definition to the database instance.
// db: database instance that implements gdb.DB interface.
// schema: optional schema/namespace name, especially for databases that support schemas.
func Set{{.TplTableNameCamelCase}}TableFields(ctx context.Context, db gdb.DB, schema ...string) error {
return db.GetCore().SetTableFields(ctx, "{{.TplTableName}}", {{.TplTableNameCamelCase}}, schema...)
}
`

View File

@@ -1,7 +0,0 @@
// Copyright GoFrame gf Author(https://goframe.org). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://github.com/gogf/gf.
package packed

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -51,26 +51,26 @@ func SetHeaderPrint(enabled bool) {
} }
} }
func Print(v ...interface{}) { func Print(v ...any) {
logger.Print(ctx, v...) logger.Print(ctx, v...)
} }
func Printf(format string, v ...interface{}) { func Printf(format string, v ...any) {
logger.Printf(ctx, format, v...) logger.Printf(ctx, format, v...)
} }
func Fatal(v ...interface{}) { func Fatal(v ...any) {
logger.Fatal(ctx, v...) logger.Fatal(ctx, v...)
} }
func Fatalf(format string, v ...interface{}) { func Fatalf(format string, v ...any) {
logger.Fatalf(ctx, format, v...) logger.Fatalf(ctx, format, v...)
} }
func Debug(v ...interface{}) { func Debug(v ...any) {
logger.Debug(ctx, v...) logger.Debug(ctx, v...)
} }
func Debugf(format string, v ...interface{}) { func Debugf(format string, v ...any) {
logger.Debugf(ctx, format, v...) logger.Debugf(ctx, format, v...)
} }

View File

@@ -16,6 +16,7 @@ import (
"github.com/gogf/gf/v2/os/gproc" "github.com/gogf/gf/v2/os/gproc"
"github.com/gogf/gf/v2/text/gregex" "github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v2/text/gstr" "github.com/gogf/gf/v2/text/gstr"
"hotgo/internal/library/hggen/internal/consts" "hotgo/internal/library/hggen/internal/consts"
"hotgo/internal/library/hggen/internal/utility/mlog" "hotgo/internal/library/hggen/internal/utility/mlog"
) )

View File

@@ -1,23 +0,0 @@
// Copyright GoFrame gf Author(https://goframe.org). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://github.com/gogf/gf.
package utils_test
import (
"fmt"
"testing"
"github.com/gogf/gf/v2/test/gtest"
"hotgo/internal/library/hggen/internal/utility/utils"
)
func Test_GetModPath(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
goModPath := utils.GetModPath()
fmt.Println(goModPath)
})
}

View File

@@ -9,6 +9,8 @@ import (
"bytes" "bytes"
"context" "context"
"fmt" "fmt"
"github.com/olekukonko/tablewriter/renderer"
"github.com/olekukonko/tablewriter/tw"
"strings" "strings"
"hotgo/internal/dao" "hotgo/internal/dao"
@@ -33,6 +35,22 @@ const (
EditInpValidatorYaml = "if err := validate.ValidateYAML(in.%s); err != nil {\n\t\treturn gerror.Newf(\"%s必须为有效的YAML格式: %%s\", err.Error())\n\t}\n" EditInpValidatorYaml = "if err := validate.ValidateYAML(in.%s); err != nil {\n\t\treturn gerror.Newf(\"%s必须为有效的YAML格式: %%s\", err.Error())\n\t}\n"
) )
var (
// tablewriter Options
twRenderer = tablewriter.WithRenderer(renderer.NewBlueprint(tw.Rendition{
Borders: tw.Border{Top: tw.Off, Bottom: tw.Off, Left: tw.Off, Right: tw.Off},
Settings: tw.Settings{
Separators: tw.Separators{BetweenRows: tw.Off, BetweenColumns: tw.Off},
},
Symbols: tw.NewSymbols(tw.StyleASCII),
}))
twConfig = tablewriter.WithConfig(tablewriter.Config{
Row: tw.CellConfig{
Formatting: tw.CellFormatting{AutoWrap: tw.WrapNone},
},
})
)
func (l *gCurd) inputTplData(ctx context.Context, in *CurdPreviewInput) (data g.Map, err error) { func (l *gCurd) inputTplData(ctx context.Context, in *CurdPreviewInput) (data g.Map, err error) {
data = make(g.Map) data = make(g.Map)
data["listInpColumns"] = l.generateInputListColumns(ctx, in, InputTypeListInp) data["listInpColumns"] = l.generateInputListColumns(ctx, in, InputTypeListInp)
@@ -68,13 +86,9 @@ func (l *gCurd) generateInputViewColumns(ctx context.Context, in *CurdPreviewInp
} }
} }
tw := tablewriter.NewWriter(buffer) table := tablewriter.NewTable(buffer, twRenderer, twConfig)
tw.SetBorder(false) table.Bulk(array)
tw.SetRowLine(false) table.Render()
tw.SetAutoWrapText(false)
tw.SetColumnSeparator("")
tw.AppendBulk(array)
tw.Render()
stContent := buffer.String() stContent := buffer.String()
// Let's do this hack of table writer for indent! // Let's do this hack of table writer for indent!
stContent = gstr.Replace(stContent, " #", "") stContent = gstr.Replace(stContent, " #", "")
@@ -132,13 +146,9 @@ func (l *gCurd) generateInputListColumns(ctx context.Context, in *CurdPreviewInp
} }
} }
tw := tablewriter.NewWriter(buffer) table := tablewriter.NewTable(buffer, twRenderer, twConfig)
tw.SetBorder(false) table.Bulk(array)
tw.SetRowLine(false) table.Render()
tw.SetAutoWrapText(false)
tw.SetColumnSeparator("")
tw.AppendBulk(array)
tw.Render()
stContent := buffer.String() stContent := buffer.String()
// Let's do this hack of table writer for indent! // Let's do this hack of table writer for indent!
stContent = gstr.Replace(stContent, " #", "") stContent = gstr.Replace(stContent, " #", "")

View File

@@ -182,12 +182,12 @@ func IsUnique(ctx context.Context, dao daoInstance, where g.Map, message string,
m = m.WhereNot(field, pkId[0]) m = m.WhereNot(field, pkId[0])
} }
count, err := m.Count(1) exist, err := m.Exist()
if err != nil { if err != nil {
return err return err
} }
if count > 0 { if exist {
if message == "" { if message == "" {
for k := range where { for k := range where {
message = fmt.Sprintf("in the table%s, %v not uniqued", dao.Table(), where[k]) message = fmt.Sprintf("in the table%s, %v not uniqued", dao.Table(), where[k])

View File

@@ -1,6 +1,6 @@
// Package wechat // Package wechat
// @Link https://github.com/bufanyun/hotgo // @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2025 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package wechat package wechat

View File

@@ -1,18 +1,64 @@
// Package wechat // Package wechat
// @Link https://github.com/bufanyun/hotgo // @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2025 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package wechat package wechat
import "hotgo/internal/model" import (
"context"
"github.com/gogf/gf/v2/os/gctx"
"github.com/silenceper/wechat/v2"
"github.com/silenceper/wechat/v2/officialaccount"
offConfig "github.com/silenceper/wechat/v2/officialaccount/config"
officialJs "github.com/silenceper/wechat/v2/officialaccount/js"
"hotgo/internal/model"
)
var config *model.WechatConfig var (
config *model.WechatConfig
officialAccount *officialaccount.OfficialAccount // 微信公众号
)
func SetConfig(c *model.WechatConfig) { func SetConfig(c *model.WechatConfig) {
config = c config = c
ctx := gctx.GetInitCtx()
GetOfficialAccount(ctx, true)
} }
func GetConfig() *model.WechatConfig { func GetConfig() *model.WechatConfig {
return config return config
} }
// NewOfficialAccount 微信公众号实例
func NewOfficialAccount(ctx context.Context) *officialaccount.OfficialAccount {
cfg := &offConfig.Config{
AppID: config.OfficialAppID,
AppSecret: config.OfficialAppSecret,
Token: config.OfficialToken,
EncodingAESKey: config.OfficialEncodingAESKey,
Cache: NewCache(ctx),
UseStableAK: true,
}
wc := wechat.NewWechat()
return wc.GetOfficialAccount(cfg)
}
// GetOfficialAccount 微信公众号实例
func GetOfficialAccount(ctx context.Context, refresh ...bool) *officialaccount.OfficialAccount {
isRefresh := false
if len(refresh) > 0 {
isRefresh = refresh[0]
}
if officialAccount != nil && !isRefresh {
return officialAccount
}
officialAccount = NewOfficialAccount(ctx)
return officialAccount
}
// GetJsConfig 获取js配置
func GetJsConfig(ctx context.Context, uri string) (config *officialJs.Config, err error) {
return GetOfficialAccount(ctx).GetJs().GetConfig(uri)
}

View File

@@ -1,6 +1,6 @@
// Package wechat // Package wechat
// @Link https://github.com/bufanyun/hotgo // @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2025 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package wechat package wechat
@@ -8,91 +8,26 @@ package wechat
import ( import (
"context" "context"
"github.com/gogf/gf/v2/errors/gerror" "github.com/gogf/gf/v2/errors/gerror"
"github.com/silenceper/wechat/v2"
"github.com/silenceper/wechat/v2/officialaccount"
offConfig "github.com/silenceper/wechat/v2/officialaccount/config"
officialJs "github.com/silenceper/wechat/v2/officialaccount/js"
officialOauth "github.com/silenceper/wechat/v2/officialaccount/oauth" officialOauth "github.com/silenceper/wechat/v2/officialaccount/oauth"
"github.com/silenceper/wechat/v2/openplatform"
openConfig "github.com/silenceper/wechat/v2/openplatform/config"
"hotgo/internal/consts"
) )
// NewOfficialAccount 微信公众号实例
func NewOfficialAccount(ctx context.Context) *officialaccount.OfficialAccount {
cfg := &offConfig.Config{
AppID: config.OfficialAppID,
AppSecret: config.OfficialAppSecret,
Token: config.OfficialToken,
EncodingAESKey: config.OfficialEncodingAESKey,
Cache: NewCache(ctx),
}
return wechat.NewWechat().GetOfficialAccount(cfg)
}
// NewOpenPlatform 开放平台实例
func NewOpenPlatform(ctx context.Context) *openplatform.OpenPlatform {
cfg := &openConfig.Config{
AppID: config.OpenAppID,
AppSecret: config.OpenAppSecret,
Token: config.OpenToken,
EncodingAESKey: config.OpenEncodingAESKey,
Cache: NewCache(ctx),
}
return wechat.NewWechat().GetOpenPlatform(cfg)
}
// GetOpenOauthURL 代第三方公众号 - 获取网页授权地址
func GetOpenOauthURL(ctx context.Context, redirectURI, scope, state string) (location string, err error) {
op := NewOpenPlatform(ctx)
appid := config.OfficialAppID // 公众号appid
oauth := op.GetOfficialAccount(appid).PlatformOauth()
if scope == "" {
scope = consts.WechatScopeBase
}
location, err = oauth.GetRedirectURL(redirectURI, scope, state, appid)
return
}
// GetOpenUserAccessToken 代第三方公众号 - 通过网页授权的code 换取access_token
func GetOpenUserAccessToken(ctx context.Context, code string) (accessToken officialOauth.ResAccessToken, err error) {
op := NewOpenPlatform(ctx)
appid := config.OfficialAppID // 公众号appid
officialAccount := op.GetOfficialAccount(appid)
componentAccessToken, err := op.GetComponentAccessToken()
if err != nil {
return
}
accessToken, err = officialAccount.PlatformOauth().GetUserAccessToken(code, appid, componentAccessToken)
if err != nil {
return
}
if accessToken.ErrCode > 0 {
err = gerror.Newf("GetOpenUserAccessToken err:%+v", accessToken.ErrMsg)
return
}
return
}
// GetUserInfo 获取用户信息 // GetUserInfo 获取用户信息
func GetUserInfo(ctx context.Context, token officialOauth.ResAccessToken) (info officialOauth.UserInfo, err error) { func GetUserInfo(ctx context.Context, token officialOauth.ResAccessToken) (info officialOauth.UserInfo, err error) {
oauth := NewOfficialAccount(ctx).GetOauth() oauth := GetOfficialAccount(ctx).GetOauth()
info, err = oauth.GetUserInfo(token.AccessToken, token.OpenID, "") info, err = oauth.GetUserInfo(token.AccessToken, token.OpenID, "")
return return
} }
// GetOauthURL 获取网页授权地址 // GetOauthURL 获取网页授权地址
func GetOauthURL(ctx context.Context, redirectURI, scope, state string) (location string, err error) { func GetOauthURL(ctx context.Context, redirectURI, scope, state string) (location string, err error) {
oauth := NewOfficialAccount(ctx).GetOauth() oauth := GetOfficialAccount(ctx).GetOauth()
location, err = oauth.GetRedirectURL(redirectURI, scope, state) location, err = oauth.GetRedirectURL(redirectURI, scope, state)
return return
} }
// GetUserAccessToken 通过网页授权的code 换取access_token // GetUserAccessToken 通过网页授权的code 换取access_token
func GetUserAccessToken(ctx context.Context, code string) (accessToken officialOauth.ResAccessToken, err error) { func GetUserAccessToken(ctx context.Context, code string) (accessToken officialOauth.ResAccessToken, err error) {
oauth := NewOfficialAccount(ctx).GetOauth() oauth := GetOfficialAccount(ctx).GetOauth()
accessToken, err = oauth.GetUserAccessToken(code) accessToken, err = oauth.GetUserAccessToken(code)
if err != nil { if err != nil {
return return
@@ -104,8 +39,3 @@ func GetUserAccessToken(ctx context.Context, code string) (accessToken officialO
} }
return return
} }
// GetJsConfig 获取js配置
func GetJsConfig(ctx context.Context, uri string) (config *officialJs.Config, err error) {
return NewOfficialAccount(ctx).GetJs().GetConfig(uri)
}

View File

@@ -1,6 +1,6 @@
// Package admin // Package admin
// @Link https://github.com/bufanyun/hotgo // @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2025 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package admin package admin
@@ -231,16 +231,26 @@ func (s *sAdminRole) Delete(ctx context.Context, in *adminin.RoleDeleteInp) (err
return gerror.New("超管角色禁止删除!") return gerror.New("超管角色禁止删除!")
} }
has, err := dao.AdminRole.Ctx(ctx).Where("pid", models.Id).One() exist, err := dao.AdminRole.Ctx(ctx).Where("pid", models.Id).Exist()
if err != nil { if err != nil {
err = gerror.Wrap(err, consts.ErrorORM) err = gerror.Wrap(err, consts.ErrorORM)
return return
} }
if !has.IsEmpty() { if exist {
return gerror.New("请先删除该角色下得所有子级!") return gerror.New("请先删除该角色下得所有子级!")
} }
exist, err = dao.AdminMember.Ctx(ctx).Where("role_id", models.Id).Exist()
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
if exist {
return gerror.New("请先删除该角色下得所有用户账号!")
}
if _, err = dao.AdminRole.Ctx(ctx).Where("id", in.Id).Delete(); err != nil { if _, err = dao.AdminRole.Ctx(ctx).Where("id", in.Id).Delete(); err != nil {
err = gerror.Wrap(err, consts.ErrorORM) err = gerror.Wrap(err, consts.ErrorORM)
} }

View File

@@ -1,17 +1,24 @@
// Package common // Package common
// @Link https://github.com/bufanyun/hotgo // @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2025 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package common package common
import ( import (
"context" "context"
"github.com/gogf/gf/v2/net/ghttp"
"hotgo/internal/library/storager" "hotgo/internal/library/storager"
"hotgo/internal/model/input/sysin" "hotgo/internal/model/input/sysin"
"hotgo/internal/service" "hotgo/internal/service"
"hotgo/utility/file"
"hotgo/utility/format" "hotgo/utility/format"
"time"
"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"
"github.com/gogf/gf/v2/util/grand"
) )
type sCommonUpload struct{} type sCommonUpload struct{}
@@ -60,3 +67,38 @@ func (s *sCommonUpload) UploadPart(ctx context.Context, in *sysin.UploadPartInp)
res.UploadPartModel = data res.UploadPartModel = data
return return
} }
// ImageTransferStorage 图片链接转存
func (s *sCommonUpload) ImageTransferStorage(ctx context.Context, in *sysin.ImageTransferStorageInp) (res *sysin.ImageTransferStorageModel, err error) {
if !gstr.HasPrefix(in.Url, "http://") && !gstr.HasPrefix(in.Url, "https://") {
return nil, gerror.New("仅支持 HTTP/HTTPS 协议的图片链接")
}
resp, err := g.Client().SetTimeout(time.Second*30).Get(ctx, in.Url)
if err != nil {
return nil, err
}
defer resp.Close()
if resp.StatusCode != 200 {
return nil, gerror.Newf("请求图片资源失败, StatusCode:%v", resp.StatusCode)
}
contentType := gstr.ToLower(resp.Header.Get("Content-Type"))
if !gstr.HasPrefix(contentType, "image/") {
return nil, gerror.New("资源不是图片类型")
}
content := resp.ReadAll()
if len(content) == 0 {
return nil, gerror.New("图片内容为空")
}
res = new(sysin.ImageTransferStorageModel)
fileHeader, err := file.NewMultipartFileHeader("its-"+grand.Letters(8)+".png", content)
if err != nil {
return nil, gerror.Newf("创建文件头失败:%v", err)
}
res.AttachmentListModel, err = s.UploadFile(ctx, storager.KindImg, &ghttp.UploadFile{FileHeader: fileHeader})
return
}

View File

@@ -1,6 +1,6 @@
// Package middleware // Package middleware
// @Link https://github.com/bufanyun/hotgo // @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2025 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package middleware package middleware
@@ -11,6 +11,7 @@ import (
"github.com/gogf/gf/v2/encoding/gjson" "github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/errors/gcode" "github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/i18n/gi18n"
"github.com/gogf/gf/v2/net/ghttp" "github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/net/gtrace" "github.com/gogf/gf/v2/net/gtrace"
"github.com/gogf/gf/v2/os/gctx" "github.com/gogf/gf/v2/os/gctx"
@@ -56,6 +57,10 @@ func NewMiddleware() *sMiddleware {
// Ctx 初始化请求上下文 // Ctx 初始化请求上下文
func (s *sMiddleware) Ctx(r *ghttp.Request) { func (s *sMiddleware) Ctx(r *ghttp.Request) {
// 国际化
r.SetCtx(gi18n.WithLanguage(r.Context(), simple.GetHeaderLocale(r.Context())))
// 链路追踪
if g.Cfg().MustGet(r.Context(), "jaeger.switch").Bool() { if g.Cfg().MustGet(r.Context(), "jaeger.switch").Bool() {
ctx, span := gtrace.NewSpan(r.Context(), "middleware.ctx") ctx, span := gtrace.NewSpan(r.Context(), "middleware.ctx")
span.SetAttributes(attribute.KeyValue{ span.SetAttributes(attribute.KeyValue{

View File

@@ -1,9 +1,9 @@
// Package sys // Package sys
// @Link https://github.com/bufanyun/hotgo // @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2024 HotGo CLI // @Copyright Copyright (c) 2025 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
// @AutoGenerate Version 2.15.7 // @AutoGenerate Version 2.17.8
package sys package sys
import ( import (

View File

@@ -13,40 +13,40 @@ import (
// AddonHgexampleTable is the golang structure of table hg_addon_hgexample_table for DAO operations like Where/Data. // AddonHgexampleTable is the golang structure of table hg_addon_hgexample_table for DAO operations like Where/Data.
type AddonHgexampleTable struct { type AddonHgexampleTable struct {
g.Meta `orm:"table:hg_addon_hgexample_table, do:true"` g.Meta `orm:"table:hg_addon_hgexample_table, do:true"`
Id interface{} // ID Id any // ID
Pid interface{} // 上级ID Pid any // 上级ID
Level interface{} // 树等级 Level any // 树等级
Tree interface{} // 关系树 Tree any // 关系树
CategoryId interface{} // 分类ID CategoryId any // 分类ID
Flag *gjson.Json // 标签 Flag *gjson.Json // 标签
Title interface{} // 标题 Title any // 标题
Description interface{} // 描述 Description any // 描述
Content interface{} // 内容 Content any // 内容
Image interface{} // 单图 Image any // 单图
Images *gjson.Json // 多图 Images *gjson.Json // 多图
Attachfile interface{} // 附件 Attachfile any // 附件
Attachfiles *gjson.Json // 多附件 Attachfiles *gjson.Json // 多附件
Map *gjson.Json // 动态键值对 Map *gjson.Json // 动态键值对
Star interface{} // 推荐星 Star any // 推荐星
Price interface{} // 价格 Price any // 价格
Views interface{} // 浏览次数 Views any // 浏览次数
ActivityAt *gtime.Time // 活动时间 ActivityAt *gtime.Time // 活动时间
StartAt *gtime.Time // 开启时间 StartAt *gtime.Time // 开启时间
EndAt *gtime.Time // 结束时间 EndAt *gtime.Time // 结束时间
Switch interface{} // 开关 Switch any // 开关
Sort interface{} // 排序 Sort any // 排序
Avatar interface{} // 头像 Avatar any // 头像
Sex interface{} // 性别 Sex any // 性别
Qq interface{} // qq Qq any // qq
Email interface{} // 邮箱 Email any // 邮箱
Mobile interface{} // 手机号码 Mobile any // 手机号码
Hobby *gjson.Json // 爱好 Hobby *gjson.Json // 爱好
Channel interface{} // 渠道 Channel any // 渠道
CityId interface{} // 所在城市 CityId any // 所在城市
Remark interface{} // 备注 Remark any // 备注
Status interface{} // 状态 Status any // 状态
CreatedBy interface{} // 创建者 CreatedBy any // 创建者
UpdatedBy interface{} // 更新者 UpdatedBy any // 更新者
CreatedAt *gtime.Time // 创建时间 CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 修改时间 UpdatedAt *gtime.Time // 修改时间
DeletedAt *gtime.Time // 删除时间 DeletedAt *gtime.Time // 删除时间

View File

@@ -12,15 +12,15 @@ import (
// AddonHgexampleTenantOrder is the golang structure of table hg_addon_hgexample_tenant_order for DAO operations like Where/Data. // AddonHgexampleTenantOrder is the golang structure of table hg_addon_hgexample_tenant_order for DAO operations like Where/Data.
type AddonHgexampleTenantOrder struct { type AddonHgexampleTenantOrder struct {
g.Meta `orm:"table:hg_addon_hgexample_tenant_order, do:true"` g.Meta `orm:"table:hg_addon_hgexample_tenant_order, do:true"`
Id interface{} // 主键 Id any // 主键
TenantId interface{} // 租户ID TenantId any // 租户ID
MerchantId interface{} // 商户ID MerchantId any // 商户ID
UserId interface{} // 用户ID UserId any // 用户ID
ProductName interface{} // 购买产品 ProductName any // 购买产品
OrderSn interface{} // 订单号 OrderSn any // 订单号
Money interface{} // 充值金额 Money any // 充值金额
Remark interface{} // 备注 Remark any // 备注
Status interface{} // 订单状态 Status any // 订单状态
CreatedAt *gtime.Time // 创建时间 CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 修改时间 UpdatedAt *gtime.Time // 修改时间
} }

View File

@@ -12,14 +12,14 @@ import (
// AdminCash is the golang structure of table hg_admin_cash for DAO operations like Where/Data. // AdminCash is the golang structure of table hg_admin_cash for DAO operations like Where/Data.
type AdminCash struct { type AdminCash struct {
g.Meta `orm:"table:hg_admin_cash, do:true"` g.Meta `orm:"table:hg_admin_cash, do:true"`
Id interface{} // ID Id any // ID
MemberId interface{} // 管理员ID MemberId any // 管理员ID
Money interface{} // 提现金额 Money any // 提现金额
Fee interface{} // 手续费 Fee any // 手续费
LastMoney interface{} // 最终到账金额 LastMoney any // 最终到账金额
Ip interface{} // 申请人IP Ip any // 申请人IP
Status interface{} // 状态码 Status any // 状态码
Msg interface{} // 处理结果 Msg any // 处理结果
HandleAt *gtime.Time // 处理时间 HandleAt *gtime.Time // 处理时间
CreatedAt *gtime.Time // 申请时间 CreatedAt *gtime.Time // 申请时间
} }

View File

@@ -12,19 +12,19 @@ import (
// AdminCreditsLog is the golang structure of table hg_admin_credits_log for DAO operations like Where/Data. // AdminCreditsLog is the golang structure of table hg_admin_credits_log for DAO operations like Where/Data.
type AdminCreditsLog struct { type AdminCreditsLog struct {
g.Meta `orm:"table:hg_admin_credits_log, do:true"` g.Meta `orm:"table:hg_admin_credits_log, do:true"`
Id interface{} // 变动ID Id any // 变动ID
MemberId interface{} // 管理员ID MemberId any // 管理员ID
AppId interface{} // 应用id AppId any // 应用id
AddonsName interface{} // 插件名称 AddonsName any // 插件名称
CreditType interface{} // 变动类型 CreditType any // 变动类型
CreditGroup interface{} // 变动组别 CreditGroup any // 变动组别
BeforeNum interface{} // 变动前 BeforeNum any // 变动前
Num interface{} // 变动数据 Num any // 变动数据
AfterNum interface{} // 变动后 AfterNum any // 变动后
Remark interface{} // 备注 Remark any // 备注
Ip interface{} // 操作人IP Ip any // 操作人IP
MapId interface{} // 关联ID MapId any // 关联ID
Status interface{} // 状态 Status any // 状态
CreatedAt *gtime.Time // 创建时间 CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 修改时间 UpdatedAt *gtime.Time // 修改时间
} }

View File

@@ -12,18 +12,18 @@ import (
// AdminDept is the golang structure of table hg_admin_dept for DAO operations like Where/Data. // AdminDept is the golang structure of table hg_admin_dept for DAO operations like Where/Data.
type AdminDept struct { type AdminDept struct {
g.Meta `orm:"table:hg_admin_dept, do:true"` g.Meta `orm:"table:hg_admin_dept, do:true"`
Id interface{} // 部门ID Id any // 部门ID
Pid interface{} // 父部门ID Pid any // 父部门ID
Name interface{} // 部门名称 Name any // 部门名称
Code interface{} // 部门编码 Code any // 部门编码
Type interface{} // 部门类型 Type any // 部门类型
Leader interface{} // 负责人 Leader any // 负责人
Phone interface{} // 联系电话 Phone any // 联系电话
Email interface{} // 邮箱 Email any // 邮箱
Level interface{} // 关系树等级 Level any // 关系树等级
Tree interface{} // 关系树 Tree any // 关系树
Sort interface{} // 排序 Sort any // 排序
Status interface{} // 部门状态 Status any // 部门状态
CreatedAt *gtime.Time // 创建时间 CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间 UpdatedAt *gtime.Time // 更新时间
} }

View File

@@ -13,32 +13,32 @@ import (
// AdminMember is the golang structure of table hg_admin_member for DAO operations like Where/Data. // AdminMember is the golang structure of table hg_admin_member for DAO operations like Where/Data.
type AdminMember struct { type AdminMember struct {
g.Meta `orm:"table:hg_admin_member, do:true"` g.Meta `orm:"table:hg_admin_member, do:true"`
Id interface{} // 管理员ID Id any // 管理员ID
DeptId interface{} // 部门ID DeptId any // 部门ID
RoleId interface{} // 角色ID RoleId any // 角色ID
RealName interface{} // 真实姓名 RealName any // 真实姓名
Username interface{} // 帐号 Username any // 帐号
PasswordHash interface{} // 密码 PasswordHash any // 密码
Salt interface{} // 密码盐 Salt any // 密码盐
PasswordResetToken interface{} // 密码重置令牌 PasswordResetToken any // 密码重置令牌
Integral interface{} // 积分 Integral any // 积分
Balance interface{} // 余额 Balance any // 余额
Avatar interface{} // 头像 Avatar any // 头像
Sex interface{} // 性别 Sex any // 性别
Qq interface{} // qq Qq any // qq
Email interface{} // 邮箱 Email any // 邮箱
Mobile interface{} // 手机号码 Mobile any // 手机号码
Birthday *gtime.Time // 生日 Birthday *gtime.Time // 生日
CityId interface{} // 城市编码 CityId any // 城市编码
Address interface{} // 联系地址 Address any // 联系地址
Pid interface{} // 上级管理员ID Pid any // 上级管理员ID
Level interface{} // 关系树等级 Level any // 关系树等级
Tree interface{} // 关系树 Tree any // 关系树
InviteCode interface{} // 邀请码 InviteCode any // 邀请码
Cash *gjson.Json // 提现配置 Cash *gjson.Json // 提现配置
LastActiveAt *gtime.Time // 最后活跃时间 LastActiveAt *gtime.Time // 最后活跃时间
Remark interface{} // 备注 Remark any // 备注
Status interface{} // 状态 Status any // 状态
CreatedAt *gtime.Time // 创建时间 CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 修改时间 UpdatedAt *gtime.Time // 修改时间
} }

View File

@@ -11,6 +11,6 @@ import (
// AdminMemberPost is the golang structure of table hg_admin_member_post for DAO operations like Where/Data. // AdminMemberPost is the golang structure of table hg_admin_member_post for DAO operations like Where/Data.
type AdminMemberPost struct { type AdminMemberPost struct {
g.Meta `orm:"table:hg_admin_member_post, do:true"` g.Meta `orm:"table:hg_admin_member_post, do:true"`
MemberId interface{} // 管理员ID MemberId any // 管理员ID
PostId interface{} // 岗位ID PostId any // 岗位ID
} }

View File

@@ -11,6 +11,6 @@ import (
// AdminMemberRole is the golang structure of table hg_admin_member_role for DAO operations like Where/Data. // AdminMemberRole is the golang structure of table hg_admin_member_role for DAO operations like Where/Data.
type AdminMemberRole struct { type AdminMemberRole struct {
g.Meta `orm:"table:hg_admin_member_role, do:true"` g.Meta `orm:"table:hg_admin_member_role, do:true"`
MemberId interface{} // 管理员ID MemberId any // 管理员ID
RoleId interface{} // 角色ID RoleId any // 角色ID
} }

View File

@@ -12,30 +12,30 @@ import (
// AdminMenu is the golang structure of table hg_admin_menu for DAO operations like Where/Data. // AdminMenu is the golang structure of table hg_admin_menu for DAO operations like Where/Data.
type AdminMenu struct { type AdminMenu struct {
g.Meta `orm:"table:hg_admin_menu, do:true"` g.Meta `orm:"table:hg_admin_menu, do:true"`
Id interface{} // 菜单ID Id any // 菜单ID
Pid interface{} // 父菜单ID Pid any // 父菜单ID
Level interface{} // 关系树等级 Level any // 关系树等级
Tree interface{} // 关系树 Tree any // 关系树
Title interface{} // 菜单名称 Title any // 菜单名称
Name interface{} // 名称编码 Name any // 名称编码
Path interface{} // 路由地址 Path any // 路由地址
Icon interface{} // 菜单图标 Icon any // 菜单图标
Type interface{} // 菜单类型1目录 2菜单 3按钮 Type any // 菜单类型1目录 2菜单 3按钮
Redirect interface{} // 重定向地址 Redirect any // 重定向地址
Permissions interface{} // 菜单包含权限集合 Permissions any // 菜单包含权限集合
PermissionName interface{} // 权限名称 PermissionName any // 权限名称
Component interface{} // 组件路径 Component any // 组件路径
AlwaysShow interface{} // 取消自动计算根路由模式 AlwaysShow any // 取消自动计算根路由模式
ActiveMenu interface{} // 高亮菜单编码 ActiveMenu any // 高亮菜单编码
IsRoot interface{} // 是否跟路由 IsRoot any // 是否跟路由
IsFrame interface{} // 是否内嵌 IsFrame any // 是否内嵌
FrameSrc interface{} // 内联外部地址 FrameSrc any // 内联外部地址
KeepAlive interface{} // 缓存该路由 KeepAlive any // 缓存该路由
Hidden interface{} // 是否隐藏 Hidden any // 是否隐藏
Affix interface{} // 是否固定 Affix any // 是否固定
Sort interface{} // 排序 Sort any // 排序
Remark interface{} // 备注 Remark any // 备注
Status interface{} // 菜单状态 Status any // 菜单状态
UpdatedAt *gtime.Time // 更新时间 UpdatedAt *gtime.Time // 更新时间
CreatedAt *gtime.Time // 创建时间 CreatedAt *gtime.Time // 创建时间
} }

View File

@@ -13,17 +13,17 @@ import (
// AdminNotice is the golang structure of table hg_admin_notice for DAO operations like Where/Data. // AdminNotice is the golang structure of table hg_admin_notice for DAO operations like Where/Data.
type AdminNotice struct { type AdminNotice struct {
g.Meta `orm:"table:hg_admin_notice, do:true"` g.Meta `orm:"table:hg_admin_notice, do:true"`
Id interface{} // 公告ID Id any // 公告ID
Title interface{} // 公告标题 Title any // 公告标题
Type interface{} // 公告类型 Type any // 公告类型
Tag interface{} // 标签 Tag any // 标签
Content interface{} // 公告内容 Content any // 公告内容
Receiver *gjson.Json // 接收者 Receiver *gjson.Json // 接收者
Remark interface{} // 备注 Remark any // 备注
Sort interface{} // 排序 Sort any // 排序
Status interface{} // 公告状态 Status any // 公告状态
CreatedBy interface{} // 发送人 CreatedBy any // 发送人
UpdatedBy interface{} // 修改人 UpdatedBy any // 修改人
CreatedAt *gtime.Time // 创建时间 CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间 UpdatedAt *gtime.Time // 更新时间
DeletedAt *gtime.Time // 删除时间 DeletedAt *gtime.Time // 删除时间

View File

@@ -12,10 +12,10 @@ import (
// AdminNoticeRead is the golang structure of table hg_admin_notice_read for DAO operations like Where/Data. // AdminNoticeRead is the golang structure of table hg_admin_notice_read for DAO operations like Where/Data.
type AdminNoticeRead struct { type AdminNoticeRead struct {
g.Meta `orm:"table:hg_admin_notice_read, do:true"` g.Meta `orm:"table:hg_admin_notice_read, do:true"`
Id interface{} // 记录ID Id any // 记录ID
NoticeId interface{} // 公告ID NoticeId any // 公告ID
MemberId interface{} // 会员ID MemberId any // 会员ID
Clicks interface{} // 已读次数 Clicks any // 已读次数
UpdatedAt *gtime.Time // 更新时间 UpdatedAt *gtime.Time // 更新时间
CreatedAt *gtime.Time // 阅读时间 CreatedAt *gtime.Time // 阅读时间
} }

View File

@@ -12,19 +12,19 @@ import (
// AdminOauth is the golang structure of table hg_admin_oauth for DAO operations like Where/Data. // AdminOauth is the golang structure of table hg_admin_oauth for DAO operations like Where/Data.
type AdminOauth struct { type AdminOauth struct {
g.Meta `orm:"table:hg_admin_oauth, do:true"` g.Meta `orm:"table:hg_admin_oauth, do:true"`
Id interface{} // 主键 Id any // 主键
MemberId interface{} // 用户ID MemberId any // 用户ID
Unionid interface{} // 唯一ID Unionid any // 唯一ID
OauthClient interface{} // 授权组别 OauthClient any // 授权组别
OauthOpenid interface{} // 授权开放ID OauthOpenid any // 授权开放ID
Sex interface{} // 性别 Sex any // 性别
Nickname interface{} // 昵称 Nickname any // 昵称
HeadPortrait interface{} // 头像 HeadPortrait any // 头像
Birthday *gtime.Time // 生日 Birthday *gtime.Time // 生日
Country interface{} // 国家 Country any // 国家
Province interface{} // 省 Province any // 省
City interface{} // 市 City any // 市
Status interface{} // 状态 Status any // 状态
CreatedAt *gtime.Time // 创建时间 CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 修改时间 UpdatedAt *gtime.Time // 修改时间
} }

View File

@@ -12,16 +12,16 @@ import (
// AdminOrder is the golang structure of table hg_admin_order for DAO operations like Where/Data. // AdminOrder is the golang structure of table hg_admin_order for DAO operations like Where/Data.
type AdminOrder struct { type AdminOrder struct {
g.Meta `orm:"table:hg_admin_order, do:true"` g.Meta `orm:"table:hg_admin_order, do:true"`
Id interface{} // 主键 Id any // 主键
MemberId interface{} // 管理员id MemberId any // 管理员id
OrderType interface{} // 订单类型 OrderType any // 订单类型
ProductId interface{} // 产品id ProductId any // 产品id
OrderSn interface{} // 关联订单号 OrderSn any // 关联订单号
Money interface{} // 充值金额 Money any // 充值金额
Remark interface{} // 备注 Remark any // 备注
RefundReason interface{} // 退款原因 RefundReason any // 退款原因
RejectRefundReason interface{} // 拒绝退款原因 RejectRefundReason any // 拒绝退款原因
Status interface{} // 状态 Status any // 状态
CreatedAt *gtime.Time // 创建时间 CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 修改时间 UpdatedAt *gtime.Time // 修改时间
} }

View File

@@ -12,12 +12,12 @@ import (
// AdminPost is the golang structure of table hg_admin_post for DAO operations like Where/Data. // AdminPost is the golang structure of table hg_admin_post for DAO operations like Where/Data.
type AdminPost struct { type AdminPost struct {
g.Meta `orm:"table:hg_admin_post, do:true"` g.Meta `orm:"table:hg_admin_post, do:true"`
Id interface{} // 岗位ID Id any // 岗位ID
Code interface{} // 岗位编码 Code any // 岗位编码
Name interface{} // 岗位名称 Name any // 岗位名称
Remark interface{} // 备注 Remark any // 备注
Sort interface{} // 排序 Sort any // 排序
Status interface{} // 状态 Status any // 状态
CreatedAt *gtime.Time // 创建时间 CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间 UpdatedAt *gtime.Time // 更新时间
} }

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