Compare commits

..

54 Commits

Author SHA1 Message Date
ayflying
1d0661ae40 增加缺少的库 2025-04-02 12:12:13 +08:00
ayflying
69e72283dc 更新 2025-04-02 11:51:25 +08:00
ayflying
a9d84c2db9 增加新的路由器 2025-04-02 11:43:05 +08:00
ayflying
db3a2bf405 增加缓存qps 2025-04-02 11:32:54 +08:00
ayflying
5e18d67747 修改ip库的内容 2025-03-31 18:30:41 +08:00
ayflying
8be47af097 更新说明 2025-03-31 18:04:43 +08:00
ayflying
4c24c4274c 定时器只允许启动一次 2025-03-31 14:57:04 +08:00
ayflying
2a34ce6043 更新g.redis方法的传参 2025-03-27 11:53:19 +08:00
ayflying
e8f94c911c 修稿红点删除缓存清理方式 2025-03-27 11:25:31 +08:00
ayflying
f55b3bc609 更新缓存模块 2025-03-27 11:20:07 +08:00
ayflying
d05d865b0d 去掉重复注册 2025-03-25 16:04:50 +08:00
ayflying
6e19671d06 增加控制器的反向注册 2025-03-25 15:58:20 +08:00
ayflying
f349dca0f7 所有包同意改为pkg 2025-03-25 15:00:54 +08:00
ayflying
58f00b4f8e 跟新mod 2025-03-25 14:24:56 +08:00
ayflying
d9ab1be2e7 更新pb目录 2025-03-25 14:14:48 +08:00
ayflying
4b77cd140d 初始化驱动 2025-03-25 14:06:03 +08:00
ayflying
8d640be472 增加websocket库 2025-03-24 17:39:09 +08:00
ayflying
cc08e830d3 分离websocket 2025-03-21 16:33:44 +08:00
ayflying
696f1bcbdb 导表支持忽略注释行 2025-03-20 16:22:28 +08:00
ayflying
5c45ddb80b 修改引用头部,不是用ctx 2025-03-19 17:41:23 +08:00
ayflying
14de836089 调整缓存key,增加kv持久化方法 2025-03-18 16:16:44 +08:00
ayflying
1c4f804738 修改持久化的顺序 2025-03-17 11:21:37 +08:00
ayflying
5fbe4d5dcf 更新库pkg 2025-03-14 14:26:07 +08:00
ayflying
4963780a32 修改删除结构体方法,支持传递多个数据进行删除 2025-03-13 16:25:28 +08:00
ayflying
70ebaae3d2 增加权重随机 2025-03-13 15:33:13 +08:00
ayflying
9cd286fd92 增加权重随机方法 2025-03-13 14:28:26 +08:00
ayflying
f8ec441241 修复缓存可能遇到的问题 2025-03-10 19:00:29 +08:00
ayflying
92a127e128 包名改回来 2025-03-06 14:38:03 +08:00
ayflying
f654e0feda 更新 2025-03-06 11:53:18 +08:00
ayflying
d44810e174 更新包名 2025-03-06 11:50:17 +08:00
ayflying
843cdc94d4 修改ci 2025-03-06 11:36:17 +08:00
ayflying
dd1d6ce2a6 增加ci文件 2025-03-06 11:16:41 +08:00
ayflying
1df0172acc 忽略目录 2025-03-05 17:27:54 +08:00
ayflying
1a3d79a605 去掉多余文件 2025-03-05 17:22:03 +08:00
ayflying
0e55698a47 使用统一方法pgk进行调用 2025-03-04 18:58:10 +08:00
ayflying
6eeb5a57cd 分离钉钉消息到通知管理 2025-03-04 17:24:10 +08:00
ayflying
6988e99717 修改说明文件 2025-03-04 16:03:19 +08:00
ayflying
754fd11ad2 自动生成支持新版 2025-03-04 14:49:26 +08:00
ayflying
4bd9d101c7 更新其他库 2025-03-04 14:32:00 +08:00
ayflying
eee58c8da8 更新excel版本库 2025-03-04 14:30:18 +08:00
ayflying
c281b4a30d 导表工具增加json格式 2025-03-04 14:10:32 +08:00
ayflying
74a746bc47 修改路径 2025-02-28 17:45:44 +08:00
ayflying
9f337df9de 计划任务延时启动 2025-02-28 15:12:20 +08:00
ayflying
45ffdc37fb 增加ip获取 2025-02-28 14:53:05 +08:00
ayflying
6765eff93f 增加埋点服务 2025-02-28 14:32:12 +08:00
ayflying
fab208c121 系统日志服务写入 2025-02-28 14:21:48 +08:00
ayflying
e45e8c7572 还原到标准service 2025-02-28 12:17:17 +08:00
ayflying
e9540d0971 活动模块,计划任务模块 加入第三方 2025-02-28 12:12:03 +08:00
ayflying
6d2b68a202 修改服务生成造成的错误 2025-02-26 18:14:42 +08:00
ayflying
144e2ffb25 修复配置切片的问题 2025-02-26 16:32:19 +08:00
乔焰阳
0a1c3c436e Create README.md 2025-02-26 16:11:14 +08:00
ayflying
8c6be6f487 make方法增加创建配置文件 2025-02-26 16:09:08 +08:00
ayflying
915d474fea 格式导表兼容冒号 2025-02-26 12:21:18 +08:00
ayflying
0cfaa799f5 时间传入不修改时区 2025-02-25 16:38:35 +08:00
170 changed files with 8081 additions and 590 deletions

1
.gitignore vendored Normal file
View File

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

36
.gitlab-ci.yml Normal file
View File

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

8
.idea/.gitignore generated vendored
View File

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

View File

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

8
.idea/modules.xml generated
View File

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

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

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

6
.idea/vcs.xml generated
View File

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

159
README.md Normal file
View File

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

View File

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

View File

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

View File

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

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

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

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

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

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

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

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

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

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

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

15
aycache/aycache.go Normal file
View File

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

View File

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

View File

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

32
cmd/load.go Normal file
View File

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

View File

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

View File

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

51
cmd/make/config Normal file
View File

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

View File

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

267
cmd/middleware.go Normal file
View File

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

View File

@@ -2,7 +2,7 @@ package cmd
import ( import (
"context" "context"
"github.com/ayflying/utility_go/s3" "github.com/ayflying/utility_go/package/s3"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp" "github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gcfg" "github.com/gogf/gf/v2/os/gcfg"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

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

View File

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

View File

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

62
go.mod
View File

@@ -1,32 +1,51 @@
module github.com/ayflying/utility_go module github.com/ayflying/utility_go
go 1.23.0 go 1.24.0
require ( require (
github.com/apolloconfig/agollo/v4 v4.4.0 github.com/apolloconfig/agollo/v4 v4.4.0
github.com/ayflying/excel2json v1.1.2 github.com/ayflying/excel2json v1.1.3
github.com/elastic/go-elasticsearch/v8 v8.17.0 github.com/elastic/go-elasticsearch/v8 v8.17.1
github.com/gogf/gf/contrib/config/apollo/v2 v2.8.3 github.com/go-pay/crypto v0.0.1
github.com/gogf/gf/v2 v2.8.3 github.com/go-pay/gopay v1.5.109
github.com/go-pay/util v0.0.4
github.com/goccy/go-json v0.10.4
github.com/gogf/gf/contrib/config/apollo/v2 v2.9.0
github.com/gogf/gf/v2 v2.9.0
github.com/google/uuid v1.6.0
github.com/gorilla/websocket v1.5.3
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20241220152942-06eb5c6e8230
github.com/minio/minio-go/v7 v7.0.85 github.com/minio/minio-go/v7 v7.0.85
github.com/prometheus/client_golang v1.21.1
github.com/xuri/excelize/v2 v2.9.0 github.com/xuri/excelize/v2 v2.9.0
golang.org/x/oauth2 v0.24.0
google.golang.org/api v0.44.0
google.golang.org/protobuf v1.36.1
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
) )
require ( require (
cloud.google.com/go v0.81.0 // indirect
github.com/360EntSecGroup-Skylar/excelize v1.4.1 // indirect github.com/360EntSecGroup-Skylar/excelize v1.4.1 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect github.com/BurntSushi/toml v1.4.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/clbanning/mxj/v2 v2.7.0 // indirect github.com/clbanning/mxj/v2 v2.7.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect
github.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect github.com/elastic/elastic-transport-go/v8 v8.6.1 // indirect
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/fsnotify/fsnotify v1.7.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // 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.2 // indirect github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/go-json v0.10.4 // indirect github.com/go-pay/errgroup v0.0.3 // indirect
github.com/google/uuid v1.6.0 // indirect github.com/go-pay/smap v0.0.2 // indirect
github.com/gorilla/websocket v1.5.3 // indirect github.com/go-pay/xlog v0.0.3 // indirect
github.com/go-pay/xtime v0.0.2 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
github.com/grokify/html-strip-tags-go v0.1.0 // indirect github.com/grokify/html-strip-tags-go v0.1.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect github.com/klauspost/compress v1.17.11 // indirect
@@ -38,28 +57,37 @@ require (
github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/md5-simd v1.1.2 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.3 // indirect github.com/pelletier/go-toml v1.9.3 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.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
github.com/rs/xid v1.6.0 // indirect github.com/rs/xid v1.6.0 // indirect
github.com/spf13/afero v1.6.0 // indirect github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.3.1 // indirect github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.8.1 // indirect github.com/spf13/viper v1.8.1 // indirect
github.com/subosito/gotenv v1.2.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d // indirect github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d // indirect
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 // indirect github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect go.opencensus.io v0.23.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect go.opentelemetry.io/otel v1.32.0 // indirect
go.opentelemetry.io/otel/sdk v1.24.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect go.opentelemetry.io/otel/sdk v1.32.0 // indirect
golang.org/x/crypto v0.31.0 // indirect go.opentelemetry.io/otel/trace v1.32.0 // indirect
golang.org/x/crypto v0.33.0 // indirect
golang.org/x/net v0.33.0 // indirect golang.org/x/net v0.33.0 // indirect
golang.org/x/sys v0.28.0 // indirect golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.21.0 // indirect golang.org/x/text v0.22.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
google.golang.org/grpc v1.38.0 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/ini.v1 v1.62.0 // indirect gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect

117
go.sum
View File

@@ -17,6 +17,7 @@ cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKP
cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
cloud.google.com/go v0.81.0 h1:at8Tk2zUz63cLPR0JPWm5vp77pEZmzxEQBEfRKn1VV8=
cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
@@ -51,11 +52,15 @@ github.com/apolloconfig/agollo/v4 v4.4.0/go.mod h1:6WjI68IzqMk/Y6ghMtrj5AX6Uewo2
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/ayflying/excel2json v1.1.2 h1:ERMDUvN2H/9jQmbFo5Rt1XJAvWdMTzIAsI4p4Fp/wRA= github.com/ayflying/excel2json v1.1.3 h1:Qy7HnF5aib7lIknaOqICvvZsSwAieLu6KJFeUccOISo=
github.com/ayflying/excel2json v1.1.2/go.mod h1:aNzB271bUAuRq+P4J+S8a3NAltcghLIGR2HdM6akqFU= github.com/ayflying/excel2json v1.1.3/go.mod h1:aNzB271bUAuRq+P4J+S8a3NAltcghLIGR2HdM6akqFU=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
@@ -72,10 +77,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA= github.com/elastic/elastic-transport-go/v8 v8.6.1 h1:h2jQRqH6eLGiBSN4eZbQnJLtL4bC5b4lfVFRjw2R4e4=
github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= github.com/elastic/elastic-transport-go/v8 v8.6.1/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk=
github.com/elastic/go-elasticsearch/v8 v8.17.0 h1:e9cWksE/Fr7urDRmGPGp47Nsp4/mvNOrU8As1l2HQQ0= github.com/elastic/go-elasticsearch/v8 v8.17.1 h1:bOXChDoCMB4TIwwGqKd031U8OXssmWLT3UrAr9EGs3Q=
github.com/elastic/go-elasticsearch/v8 v8.17.0/go.mod h1:lGMlgKIbYoRvay3xWBeKahAiJOgmFDsjZC39nmO3H64= github.com/elastic/go-elasticsearch/v8 v8.17.1/go.mod h1:MVJCtL+gJJ7x5jFeUmA20O7rvipX8GcQmo5iBcmaJn4=
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
@@ -88,6 +93,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
@@ -102,17 +109,32 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-pay/crypto v0.0.1 h1:B6InT8CLfSLc6nGRVx9VMJRBBazFMjr293+jl0lLXUY=
github.com/go-pay/crypto v0.0.1/go.mod h1:41oEIvHMKbNcYlWUlRWtsnC6+ASgh7u29z0gJXe5bes=
github.com/go-pay/errgroup v0.0.3 h1:DB4s8e8oWYDyETKQ1y1riMJ7y29zE1uIsMCSjEOFSbU=
github.com/go-pay/errgroup v0.0.3/go.mod h1:0+4b8mvFMS71MIzsaC+gVvB4x37I93lRb2dqrwuU8x8=
github.com/go-pay/gopay v1.5.109 h1:rF9bCUaAuz2jWHwgIuIfgrAejFOMufo9UsNENouFVcU=
github.com/go-pay/gopay v1.5.109/go.mod h1:1B4NjEWKwRtJeNk2YhYwjcIJuwtxrOK0nZsh5slqrWI=
github.com/go-pay/smap v0.0.2 h1:kKflYor5T5FgZltPFBMTFfjJvqYMHr5VnIFSEyhVTcA=
github.com/go-pay/smap v0.0.2/go.mod h1:HW9oAo0okuyDYsbpbj5fJFxnNj/BZorRGFw26SxrNWw=
github.com/go-pay/util v0.0.4 h1:TuwSU9o3Qd7m9v1PbzFuIA/8uO9FJnA6P7neG/NwPyk=
github.com/go-pay/util v0.0.4/go.mod h1:Tsdhs8Ib9J9b4+NKNO1PHh5hWHhlg98PthsX0ckq6PM=
github.com/go-pay/xlog v0.0.3 h1:avyMhCL/JgBHreoGx/am/kHxfs1udDOAeVqbmzP/Yes=
github.com/go-pay/xlog v0.0.3/go.mod h1:mH47xbobrdsSHWsmFtSF5agWbMHFP+tK0ZbVCk5OAEw=
github.com/go-pay/xtime v0.0.2 h1:7YR4/iuELsEHpJ6LUO0SVK80hQxDO9MLCfuVYIiTCRM=
github.com/go-pay/xtime v0.0.2/go.mod h1:W1yRbJaSt4CSBcdAtLBQ8xajiN/Pl5hquGczUcUE9xE=
github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM= github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM=
github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gogf/gf/contrib/config/apollo/v2 v2.8.3 h1:KU51l3uaU7Mxq+FSoLjROyDERUGKCMo4qExxPEgA7KQ= github.com/gogf/gf/contrib/config/apollo/v2 v2.9.0 h1:BewnDc3gq2iqYzPH56FtOelmT9F9WcAm6nnlOVgw3J8=
github.com/gogf/gf/contrib/config/apollo/v2 v2.8.3/go.mod h1:Uo6f/Pr6zVHSbdP2Lj9iToEMuh/TzU/bE2E5SJlquEk= github.com/gogf/gf/contrib/config/apollo/v2 v2.9.0/go.mod h1:uNjaJcnMvMl7bkcoL0amxwcrOM+Q5XGADKKwKTY+8MY=
github.com/gogf/gf/v2 v2.8.3 h1:h9Px3lqJnnH6It0AqHRz4/1hx0JmvaSf1IvUir5x1rA= github.com/gogf/gf/v2 v2.9.0 h1:semN5Q5qGjDQEv4620VzxcJzJlSD07gmyJ9Sy9zfbHk=
github.com/gogf/gf/v2 v2.8.3/go.mod h1:n++xPYGUUMadw6IygLEgGZqc6y6DRLrJKg5kqCrPLWY= github.com/gogf/gf/v2 v2.9.0/go.mod h1:sWGQw+pLILtuHmbOxoe0D+0DdaXxbleT57axOLH2vKI=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
@@ -138,6 +160,7 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
@@ -174,6 +197,7 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
@@ -218,11 +242,15 @@ github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02
github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY= github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY=
github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8= github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20241220152942-06eb5c6e8230 h1:B0oaMTAQKDZd8cwYT0qsAI7+c3KbFeBNA8GhgoBMXWw=
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20241220152942-06eb5c6e8230/go.mod h1:C5LA5UO2ZXJrLaPLYtE1wUJMiyd/nwWaCO5cw/2pSHs=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM=
github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
@@ -239,8 +267,6 @@ github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
github.com/minio/minio-go/v7 v7.0.84 h1:D1HVmAF8JF8Bpi6IU4V9vIEj+8pc+xU88EWMs2yed0E=
github.com/minio/minio-go/v7 v7.0.84/go.mod h1:57YXpvc5l3rjPdhqNrDsvVlY0qPI6UTk1bflAe+9doY=
github.com/minio/minio-go/v7 v7.0.85 h1:9psTLS/NTvC3MWoyjhjXpwcKoNbkongaCSF3PNpSuXo= github.com/minio/minio-go/v7 v7.0.85 h1:9psTLS/NTvC3MWoyjhjXpwcKoNbkongaCSF3PNpSuXo=
github.com/minio/minio-go/v7 v7.0.85/go.mod h1:57YXpvc5l3rjPdhqNrDsvVlY0qPI6UTk1bflAe+9doY= github.com/minio/minio-go/v7 v7.0.85/go.mod h1:57YXpvc5l3rjPdhqNrDsvVlY0qPI6UTk1bflAe+9doY=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
@@ -257,6 +283,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
@@ -267,7 +295,15 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk=
github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
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=
@@ -278,6 +314,8 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU= github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
@@ -288,8 +326,9 @@ github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIK
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
@@ -304,8 +343,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/tevid/gohamcrest v1.1.1 h1:ou+xSqlIw1xfGTg1uq1nif/htZ2S3EzRqLm2BP+tYU0= github.com/tevid/gohamcrest v1.1.1 h1:ou+xSqlIw1xfGTg1uq1nif/htZ2S3EzRqLm2BP+tYU0=
@@ -330,15 +369,16 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U=
go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg=
go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M=
go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU=
go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM=
go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
@@ -349,8 +389,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=
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/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -438,6 +478,8 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE=
golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
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=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -492,8 +534,8 @@ golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/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.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
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=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -502,8 +544,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -583,6 +625,7 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q
google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
google.golang.org/api v0.44.0 h1:URs6qR1lAxDsqWITsQXI4ZkGiYJ5dHtRNiCpfs2OeKA=
google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@@ -590,6 +633,7 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
@@ -631,6 +675,7 @@ google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
@@ -651,6 +696,7 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0=
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
@@ -664,10 +710,17 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk=
google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

18
hack/config.yaml Normal file
View File

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

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

@@ -0,0 +1,28 @@
package boot
import (
"context"
v1 "github.com/ayflying/utility_go/api/system/v1"
"github.com/ayflying/utility_go/service"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gtimer"
"time"
)
var (
ctx = gctx.GetInitCtx()
)
func Boot() (err error) {
err = service.SystemCron().StartCron()
//用户活动持久化
gtimer.SetTimeout(ctx, time.Minute, func(ctx context.Context) {
service.SystemCron().AddCron(v1.CronType_DAILY, func() error {
service.GameAct().Saves()
return nil
})
})
return nil
}

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

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

View File

@@ -0,0 +1,242 @@
package gameAct
import (
"fmt"
"github.com/ayflying/utility_go/internal/model/do"
"github.com/ayflying/utility_go/internal/model/entity"
"github.com/ayflying/utility_go/pkg"
service2 "github.com/ayflying/utility_go/service"
"github.com/ayflying/utility_go/tools"
"github.com/gogf/gf/v2/container/gset"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gtime"
"strconv"
"strings"
"time"
)
var (
ctx = gctx.New()
Name = "game_act"
ActList = gset.New(true)
)
type sGameAct struct {
}
func new() *sGameAct {
return &sGameAct{}
}
func init() {
service2.RegisterGameAct(new())
}
// Info 获取活动信息
//
// @Description: 根据用户ID和活动ID获取活动信息
// @receiver s *sGameAct: 代表活动操作的结构体实例
// @param uid int64: 用户ID
// @param actId int: 活动ID
// @return data *v1.Act: 返回活动信息结构体指针
// @return err error: 返回错误信息
func (s *sGameAct) Info(uid int64, actId int) (data *g.Var, err error) {
if uid == 0 || actId == 0 {
g.Log().Error(ctx, "当前参数为空")
return
}
// 构造缓存键名
keyCache := fmt.Sprintf("act:%v:%v", actId, uid)
// 尝试从Redis缓存中获取活动信息
get, err := g.Redis().Get(ctx, keyCache)
if !get.IsEmpty() {
// 如果缓存中存在将数据扫描到data结构体中并返回
data = get
return
}
// 从数据库中查询活动信息
getDb, err := g.Model(Name).Where(do.GameAct{
Uid: uid,
ActId: actId,
}).Fields("action").OrderDesc("updated_at").Value()
getDb.Scan(&data)
if data == nil || data.IsEmpty() {
return
}
// 将查询到的活动信息保存到Redis缓存中
_, err = g.Redis().Set(ctx, keyCache, data)
var CacheKey = fmt.Sprintf("act:update:%d", uid)
pkg.Cache("redis").Set(ctx, CacheKey, uid, time.Hour*24*1)
return
}
// Set 将指定用户的活动信息存储到Redis缓存中。
//
// @Description:
// @receiver s *sGameAct: 表示sGameAct类型的实例。
// @param uid int64: 用户的唯一标识。
// @param actId int: 活动的唯一标识。
// @param data interface{}: 要存储的活动信息数据。
// @return err error: 返回错误信息如果操作成功则返回nil。
func (s *sGameAct) Set(uid int64, actId int, data interface{}) (err error) {
if uid == 0 || actId == 0 {
g.Log().Error(ctx, "当前参数为空")
return
}
// 构造缓存键名
keyCache := fmt.Sprintf("act:%v:%v", actId, uid)
if data == nil {
_, err = g.Redis().Del(ctx, keyCache)
return
}
// 将活动信息保存到Redis缓存并将用户ID添加到活动索引集合中
_, err = g.Redis().Set(ctx, keyCache, data)
//插入集合
ActList.Add(actId)
return
}
func (s *sGameAct) Saves() (err error) {
//遍历执行
ActList.Iterator(func(i interface{}) bool {
err = s.Save(i.(int))
return true
})
return
}
func (s *sGameAct) Save(actId int) (err error) {
cacheKey := fmt.Sprintf("act:%v:*", actId)
//获取当前用户的key值
//keys, err := utils.RedisScan(cacheKey)
//if len(keys) > 10000 {
// keys = keys[:10000]
//}
//循环获取缓存数据
err = tools.Redis.RedisScanV2(cacheKey, func(keys []string) (err error) {
var add []interface{}
var delKey []string
for _, cacheKey = range keys {
result := strings.Split(cacheKey, ":")
actId, err = strconv.Atoi(result[1])
var uid int64
uid, err = strconv.ParseInt(result[2], 10, 64)
if err != nil {
continue
}
cacheGet, _ := g.Redis().Get(ctx, cacheKey)
if uid == 0 {
//跳过为空的用户缓存
continue
}
if cacheGet.IsEmpty() {
//空数据也不保存
continue
}
//如果有活跃,跳过持久化
if getBool, _ := pkg.Cache("redis").Contains(ctx,
fmt.Sprintf("act:update:%d", uid)); getBool {
continue
}
//获取数据库数据
var data *entity.GameAct
// 从数据库中查询活动信息
err = g.Model(Name).Where(do.GameAct{
Uid: uid,
ActId: actId,
}).Fields("uid,act_id").Scan(&data)
if err != nil {
g.Log().Debugf(ctx, "当前数据错误: %v", cacheKey)
continue
}
actionData := cacheGet.String()
if data == nil {
//data =
add = append(add, &do.GameAct{
ActId: actId,
Uid: uid,
Action: actionData,
})
} else {
//覆盖数据
data.Action = actionData
add = append(add, data)
}
//最后删除key
delKey = append(delKey, cacheKey)
}
//批量写入数据库
if len(add) > 0 {
dbRes, err2 := g.Model(Name).Batch(30).Data(add).Save()
add = make([]interface{}, 0)
if err2 != nil {
g.Log().Error(ctx, err2)
return
}
for _, v := range delKey {
_, err2 = g.Redis().Del(ctx, v)
if err2 != nil {
g.Log().Error(ctx, err2)
return
}
}
delKey = make([]string, 0)
count, _ := dbRes.RowsAffected()
g.Log().Debugf(ctx, "当前 %v 写入数据库: %v 条", actId, count)
}
if err != nil {
g.Log().Error(ctx, "当前临时数据入库失败: %v", err)
}
return err
})
return
}
// 清空GetRedDot缓存
func (s *sGameAct) RefreshGetRedDotCache(uid int64) {
cacheKey := fmt.Sprintf("gameAct:GetRedDot:%s:%d", gtime.Now().Format("d"), uid)
_, err := pkg.Cache("redis").Remove(gctx.New(), cacheKey)
if err != nil {
g.Log().Error(ctx, err)
g.Dump(err)
}
}
func (s *sGameAct) Del(uid int64, actId int) {
if uid == 0 || actId == 0 {
g.Log().Error(ctx, "当前参数为空")
return
}
// 构造缓存键名
keyCache := fmt.Sprintf("act:%v:%v", actId, uid)
//删除活动缓存
g.Redis().Del(ctx, keyCache)
//删除当前活动储存
g.Model(Name).Where(do.GameAct{
Uid: uid,
ActId: actId,
}).Delete()
}

View File

@@ -0,0 +1,125 @@
package gameKv
import (
"github.com/ayflying/utility_go/service"
"github.com/ayflying/utility_go/tools"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"strconv"
"strings"
"sync"
)
var (
ctx = gctx.New()
Name = "game_kv"
)
type sGameKv struct {
Lock sync.Mutex
}
func New() *sGameKv {
return &sGameKv{}
}
func init() {
service.RegisterGameKv(New())
//支付钩子
//task.Task.Trigger(tasks.TaskType_PAY, service.GameKv().HookPay)
//task.Task.Trigger(tasks.TaskType_WARDROBE_LEVEL, service.GameKv().HookLevelRwd)
}
// SavesV1 方法
//
// @Description: 保存用户KV数据列表。
// @receiver s: sGameKv的实例。
// @return err: 错误信息如果操作成功则为nil。
func (s *sGameKv) SavesV1() (err error) {
// 从Redis列表中获取所有用户KV索引的键
//keys, err := utils.RedisScan("user:kv:*")
err = tools.Redis.RedisScanV2("user:kv:*", func(keys []string) (err error) {
// 定义用于存储用户数据的结构体
type ListData struct {
Uid int64 `json:"uid"`
Kv interface{} `json:"kv"`
}
var list []*ListData
// 初始化列表长度与keys数组一致
list = make([]*ListData, 0)
//需要删除的key
var delKey []string
// 遍历keys获取每个用户的数据并填充到list中
for _, cacheKey := range keys {
//g.Log().Infof(ctx, "保存用户kv数据%v", v)
//uid := v.Int64()
//cacheKey = "user:kv:" + strconv.FormatInt(uid, 10)
result := strings.Split(cacheKey, ":")
var uid int64
uid, err = strconv.ParseInt(result[2], 10, 64)
if err != nil {
g.Log().Error(ctx, err)
g.Redis().Del(ctx, cacheKey)
continue
}
////如果1天没有活跃跳过
//user, _ := service.MemberUser().Info(uid)
//if user.UpdatedAt.Seconds < gtime.Now().Add(consts.ActSaveTime).Unix() {
// continue
//}
get, _ := g.Redis().Get(ctx, cacheKey)
var data interface{}
get.Scan(&data)
list = append(list, &ListData{
Uid: int64(uid),
Kv: data,
})
delKey = append(delKey, cacheKey)
}
// 将列表数据保存到数据库
if len(list) > 0 {
_, err2 := g.Model("game_kv").Batch(30).Data(list).Save()
list = make([]*ListData, 0)
if err2 != nil {
g.Log().Error(ctx, err2)
return
}
//批量删除key
for _, v := range delKey {
_, err2 = g.Redis().Del(ctx, v)
if err2 != nil {
g.Log().Errorf(ctx, "删除存档错误:%v,err=%v", v, err2)
return
}
}
delKey = make([]string, 0)
}
if err != nil {
g.Log().Error(ctx, "当前kv数据入库失败: %v", err)
}
return
})
//if err != nil {
// return err
//}
////跳过
//if len(keys) == 0 {
// return
//}
////一次最多处理10w条
//if len(keys) > 10000 {
// keys = keys[:10000]
//}
return
}

View File

@@ -0,0 +1,103 @@
package ip2region
import (
"github.com/ayflying/utility_go/service"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gfile"
"github.com/lionsoul2014/ip2region/binding/golang/xdb"
"net"
"strings"
)
var (
ctx = gctx.New()
)
type sIp2region struct {
searcher *xdb.Searcher
}
func New() *sIp2region {
s := &sIp2region{}
s.Load()
return s
}
func init() {
service.RegisterIp2Region(New())
}
// Load 加载到内存中
//
// @Description: 加载ip2region数据库到内存中。
// @receiver s *sIp2region: sIp2region的实例。
func (s *sIp2region) Load() {
var err error
var dbPath = "/runtime/library/ip2region.xdb"
if gfile.IsEmpty(dbPath) {
//下载文件
putData, err2 := g.Client().Discovery(nil).
Get(ctx, "https://resource.luoe.cn/attachment/ip2region.xdb")
if err2 != nil {
return
}
err = gfile.PutBytes(dbPath, putData.ReadAll())
}
cBuff := gfile.GetBytes(dbPath)
/*
var cBuff []byte
if gres.Contains(dbPath) {
cBuff = gres.GetContent(dbPath)
} else {
cBuff = gfile.GetBytes(dbPath)
}
*/
// 基于读取的内容,创建查询对象
s.searcher, err = xdb.NewWithBuffer(cBuff)
if err != nil {
g.Log().Errorf(ctx, "无法创建内容为的搜索器: %s", err)
return
}
}
func (s *sIp2region) GetIp(ip string) (res []string) {
res = make([]string, 5)
if s.searcher == nil {
return
}
//如果是ipv6直接跳过
if s.isIPv6(ip) {
return
}
region, err := s.searcher.SearchByStr(ip)
if err != nil {
return
}
res = strings.Split(region, "|")
return
}
// isIPv6 判断输入字符串是否为IPv6地址
//
// @Description: 通过解析输入的IP字符串判断其是否为IPv6地址。
// @receiver s *sIp2region: 代表`sIp2region`类型的实例,本函数中未使用,可忽略。
// @param ipStr string: 待判断的IP地址字符串。
// @return bool: 返回true表示是IPv6地址返回false表示不是IPv6地址。
func (s *sIp2region) isIPv6(ipStr string) bool {
// 尝试将输入字符串解析为IP地址
ip := net.ParseIP(ipStr)
// 尝试将IP地址转换为IPv4格式
ipv4 := ip.To4()
// 如果转换为IPv4格式不为nil则说明是IPv4地址返回false
if ipv4 != nil {
return false
}
// 如果无法转换为IPv4格式则说明是IPv6地址返回true
return true
}

View File

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

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

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

View File

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

View File

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

View File

@@ -0,0 +1,313 @@
package systemCron
import (
"context"
"github.com/ayflying/utility_go/api/system/v1"
"github.com/ayflying/utility_go/service"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gcron"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/os/gtimer"
"sync"
"time"
)
var (
ctx = gctx.New()
startTime *gtime.Time
)
// sSystemCron 结构体定义了系统定时任务的秒计时器。
// 它包含了不同时间周期的任务,如秒、分钟、小时、天、周、月、年以及特定的工作日任务。
type sSystemCron struct {
//互斥锁
Lock sync.Mutex
// 每秒执行的任务
SecondlyTask []func() error
// 每分钟执行的任务
MinutelyTask []func() error
// 每小时执行的任务
HourlyTask []func() error
// 每天执行的任务
DailyTask []func() error
// 每周执行的任务
WeeklyTask []func() error
// 每月执行的任务
MonthlyTask []func() error
// 每年执行的任务
YearlyTask []func() error
// 每周一执行的任务
MondayTask []func() error
// 每周二执行的任务
TuesdayTask []func() error
// 每周三执行的任务
WednesdayTask []func() error
// 每周四执行的任务
ThursdayTask []func() error
// 每周五执行的任务
FridayTask []func() error
// 每周六执行的任务
SaturdayTask []func() error
// 每周日执行的任务
SundayTask []func() error
}
func New() *sSystemCron {
return &sSystemCron{}
}
func init() {
service.RegisterSystemCron(New())
}
// AddCron 添加一个定时任务到相应的调度列表中。
//
// @Description: 根据指定的类型将函数添加到不同的任务列表中,以供后续执行。
// @receiver s: sSystemCron的实例代表一个调度系统。
// @param typ: 任务的类型,决定该任务将被添加到哪个列表中。对应不同的时间间隔。
// @param _func: 要添加的任务函数该函数执行时应该返回一个error。
func (s *sSystemCron) AddCron(typ v1.CronType, _func func() error) {
//加锁
s.Lock.Lock()
defer s.Lock.Unlock()
switch typ {
case v1.CronType_SECOND:
s.SecondlyTask = append(s.SecondlyTask, _func) // 将函数添加到每秒执行的任务列表中
case v1.CronType_MINUTE:
s.MinutelyTask = append(s.MinutelyTask, _func) // 将函数添加到每分钟执行的任务列表中
case v1.CronType_HOUR:
s.HourlyTask = append(s.HourlyTask, _func) // 将函数添加到每小时执行的任务列表中
case v1.CronType_DAILY:
s.DailyTask = append(s.DailyTask, _func) // 将函数添加到每日执行的任务列表中
case v1.CronType_WEEK:
s.WeeklyTask = append(s.WeeklyTask, _func) // 将函数添加到每周执行的任务列表中
case v1.CronType_MONTH:
s.MonthlyTask = append(s.MonthlyTask, _func) // 将函数添加到每月执行的任务列表中
case v1.CronType_YEAR:
s.YearlyTask = append(s.YearlyTask, _func) // 将函数添加到每年执行的任务列表中
case v1.CronType_MONDAY:
s.MondayTask = append(s.MondayTask, _func) // 将函数添加到每周一执行的任务列表中
case v1.CronType_TUESDAY:
s.TuesdayTask = append(s.TuesdayTask, _func) // 将函数添加到每周二的任务列表中
case v1.CronType_WEDNESDAY:
s.WednesdayTask = append(s.WednesdayTask, _func) // 将函数添加到每周三执行的任务列表中
case v1.CronType_THURSDAY:
s.ThursdayTask = append(s.ThursdayTask, _func) // 将函数添加到每周四执行的任务列表中
case v1.CronType_FRIDAY:
s.FridayTask = append(s.FridayTask, _func) // 将函数添加到每周五执行的任务列表中
case v1.CronType_SATURDAY:
s.SaturdayTask = append(s.SaturdayTask, _func) // 将函数添加到每周六执行的任务列表中
case v1.CronType_SUNDAY:
s.SundayTask = append(s.SundayTask, _func) // 将函数添加到每周日的任务列表中
}
}
// StartCron 开始计划任务执行
//
// @Description:
// @receiver s
// @return err
func (s *sSystemCron) StartCron() (err error) {
//预防重复启动
if startTime != nil {
return
}
startTime = gtime.Now()
g.Log().Debug(ctx, "启动计划任务定时器详情")
//每秒任务
gtimer.SetInterval(ctx, time.Second, func(ctx context.Context) {
//g.Log().Debug(ctx, "每秒定时器")
err = s.secondlyTask()
})
//每分钟任务
_, err = gcron.AddSingleton(ctx, "0 * * * * *", func(ctx context.Context) {
//g.Log().Debug(ctx, "每分钟定时器")
err = s.minutelyTask()
})
//每小时任务
_, err = gcron.AddSingleton(ctx, "0 0 * * * *", func(ctx context.Context) {
g.Log().Debug(ctx, "每小时定时器")
err = s.hourlyTask()
})
//每天任务
_, err = gcron.AddSingleton(ctx, "0 0 0 * * *", func(ctx context.Context) {
g.Log().Debug(ctx, "每日定时器")
err = s.dailyTask()
})
//每周任务
_, err = gcron.AddSingleton(ctx, "0 0 0 * * 1", func(ctx context.Context) {
g.Log().Debug(ctx, "每周一定时器")
err = s.weeklyTask(1)
})
//每周二任务
_, err = gcron.AddSingleton(ctx, "0 0 0 * * 2", func(ctx context.Context) {
g.Log().Debug(ctx, "每周二定时器")
err = s.weeklyTask(2)
})
//周三任务
_, err = gcron.AddSingleton(ctx, "0 0 0 * * 3", func(ctx context.Context) {
g.Log().Debug(ctx, "周三定时器")
err = s.weeklyTask(3)
})
//周四任务
_, err = gcron.AddSingleton(ctx, "0 0 0 * * 4", func(ctx context.Context) {
g.Log().Debug(ctx, "周四定时器")
err = s.weeklyTask(4)
})
//周五任务
_, err = gcron.AddSingleton(ctx, "0 0 0 * * 5", func(ctx context.Context) {
g.Log().Debug(ctx, "周五定时器")
err = s.fridayTask()
})
//周六任务
_, err = gcron.AddSingleton(ctx, "0 0 0 * * 6", func(ctx context.Context) {
g.Log().Debug(ctx, "周六定时器")
err = s.weeklyTask(6)
})
//周日任务
_, err = gcron.AddSingleton(ctx, "0 0 0 * * 0", func(ctx context.Context) {
g.Log().Debug(ctx, "周日定时器")
err = s.weeklyTask(7)
})
//每月任务
_, err = gcron.AddSingleton(ctx, "0 0 0 1 * *", func(ctx context.Context) {
g.Log().Debug(ctx, "每月定时器")
err = s.monthlyTask()
})
_, err = gcron.AddSingleton(ctx, "0 0 0 1 1 *", func(ctx context.Context) {
g.Log().Debug(ctx, "每年定时器")
err = s.monthlyTask()
})
return
}
// 每妙任务
func (s *sSystemCron) secondlyTask() (err error) {
if len(s.SecondlyTask) == 0 {
return
}
for _, _func := range s.SecondlyTask {
err = _func()
if err != nil {
g.Log().Error(ctx, err)
}
}
return
}
// 每分钟任务
func (s *sSystemCron) minutelyTask() (err error) {
if len(s.MinutelyTask) == 0 {
return
}
for _, _func := range s.MinutelyTask {
err = _func()
if err != nil {
g.Log().Error(ctx, err)
}
}
return
}
// 每小时任务
func (s *sSystemCron) hourlyTask() (err error) {
if len(s.HourlyTask) == 0 {
return
}
for _, _func := range s.HourlyTask {
err = _func()
if err != nil {
g.Log().Error(ctx, err)
}
}
return
}
// 每天任务
func (s *sSystemCron) dailyTask() (err error) {
if len(s.DailyTask) == 0 {
return
}
for _, _func := range s.DailyTask {
err = _func()
if err != nil {
g.Log().Error(ctx, err)
}
}
return
}
// 每周任务
func (s *sSystemCron) weeklyTask(day int) (err error) {
var arr []func() error
switch day {
case 1:
arr = s.MondayTask
case 2:
arr = s.TuesdayTask
case 3:
arr = s.WednesdayTask
case 4:
arr = s.ThursdayTask
case 5:
arr = s.FridayTask
case 6:
arr = s.SaturdayTask
case 7:
arr = s.SundayTask
default:
arr = s.WeeklyTask
return
}
if len(arr) == 0 {
return
}
for _, _func := range arr {
err = _func()
if err != nil {
g.Log().Error(ctx, err)
}
}
return
}
// 周五任务
func (s *sSystemCron) fridayTask() (err error) {
if len(s.FridayTask) == 0 {
return
}
for _, _func := range s.FridayTask {
err = _func()
if err != nil {
g.Log().Error(ctx, err)
}
}
return
}
// 每月任务
func (s *sSystemCron) monthlyTask() (err error) {
if len(s.MonthlyTask) == 0 {
return
}
for _, _func := range s.MonthlyTask {
err = _func()
if err != nil {
g.Log().Error(ctx, err)
}
}
return
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,12 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
// CommunityPostsDetails is the golang structure for table community_posts_details.
type CommunityPostsDetails struct {
Id int `json:"id" orm:"id" description:""` //
Attachment string `json:"attachment" orm:"attachment" description:"帖子附件"` // 帖子附件
SlotsImg string `json:"slots_img" orm:"slots_img" description:"槽位图片"` // 槽位图片
}

View File

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

View File

@@ -0,0 +1,17 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityPostsRecommend is the golang structure for table community_posts_recommend.
type CommunityPostsRecommend struct {
Pid int `json:"pid" orm:"pid" description:"帖子编号"` // 帖子编号
Type int `json:"type" orm:"type" description:"推荐类型"` // 推荐类型
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"` // 创建时间
EndTime *gtime.Time `json:"end_time" orm:"end_time" description:"结束时间"` // 结束时间
}

View File

@@ -0,0 +1,26 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// CommunityPostsReply is the golang structure for table community_posts_reply.
type CommunityPostsReply struct {
Id int `json:"id" orm:"id" description:"唯一id"` // 唯一id
Pid int `json:"pid" orm:"pid" description:"主贴id"` // 主贴id
Uid int64 `json:"uid" orm:"uid" description:""` //
Uid2 int64 `json:"uid_2" orm:"uid2" description:"被回复者的uid"` // 被回复者的uid
Content string `json:"content" orm:"content" description:"正文"` // 正文
Extend string `json:"extend" orm:"extend" description:"附加数据"` // 附加数据
TopId int `json:"top_id" orm:"top_id" description:"上级id"` // 上级id
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"` // 创建时间
Sort int `json:"sort" orm:"sort" description:"跟帖顺序"` // 跟帖顺序
AiScore float64 `json:"ai_score" orm:"ai_score" description:"机器评分"` // 机器评分
Status int `json:"status" orm:"status" description:"状态"` // 状态
At string `json:"at" orm:"at" description:"用户的at功能"` // 用户的at功能
Like string `json:"like" orm:"like" description:"回复点赞"` // 回复点赞
}

View File

@@ -0,0 +1,17 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
// CommunityUser is the golang structure for table community_user.
type CommunityUser struct {
Uid int64 `json:"uid" orm:"uid" description:""` //
Like string `json:"like" orm:"like" description:"点赞"` // 点赞
Like2 string `json:"like_2" orm:"like2" description:"帖子回复点赞"` // 帖子回复点赞
Collect string `json:"collect" orm:"collect" description:"收藏"` // 收藏
FollowNum int `json:"follow_num" orm:"follow_num" description:"关注数量"` // 关注数量
FansNum int `json:"fans_num" orm:"fans_num" description:"粉丝数量"` // 粉丝数量
Gift int `json:"gift" orm:"gift" description:"礼物值"` // 礼物值
Blacklist string `json:"blacklist" orm:"blacklist" description:"黑名单"` // 黑名单
}

View File

@@ -0,0 +1,23 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// ConfigAct is the golang structure for table config_act.
type ConfigAct struct {
Id int `json:"id" orm:"id" description:"流水编号"` // 流水编号
Type int `json:"type" orm:"type" description:"活动类型"` // 活动类型
Actid int `json:"actid" orm:"actid" description:"活动编号"` // 活动编号
Name string `json:"name" orm:"name" description:"活动名称"` // 活动名称
Hid string `json:"hid" orm:"hid" description:"活动标识"` // 活动标识
Data string `json:"data" orm:"data" description:"活动数据"` // 活动数据
StartTime *gtime.Time `json:"start_time" orm:"start_time" description:"开始时间"` // 开始时间
EndTime *gtime.Time `json:"end_time" orm:"end_time" description:"结束时间"` // 结束时间
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"` // 更新时间
}

View File

@@ -0,0 +1,30 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// ConfigModalBox is the golang structure for table config_modal_box.
type ConfigModalBox struct {
Id int `json:"id" orm:"id" description:"主键"` // 主键
ModalBoxId int `json:"modal_box_id" orm:"modal_box_id" description:"弹框id"` // 弹框id
UserType string `json:"user_type" orm:"user_type" description:"特定用户"` // 特定用户
Tips string `json:"tips" orm:"tips" description:"弹框tips选项"` // 弹框tips选项
Name string `json:"name" orm:"name" description:"名称"` // 名称
Title string `json:"title" orm:"title" description:"标题"` // 标题
Content string `json:"content" orm:"content" description:"正文"` // 正文
Type int `json:"type" orm:"type" description:"类型"` // 类型
Style string `json:"style" orm:"style" description:"样式"` // 样式
Weight int `json:"weight" orm:"weight" description:"权重"` // 权重
Attachments string `json:"attachments" orm:"attachments" description:"附件"` // 附件
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"` // 更新时间
Status int `json:"status" orm:"status" description:"状态 1开始 0关闭"` // 状态 1开始 0关闭
Notes string `json:"notes" orm:"notes" description:"备注"` // 备注
StartTime *gtime.Time `json:"start_time" orm:"start_time" description:"开始时间"` // 开始时间
EndTime *gtime.Time `json:"end_time" orm:"end_time" description:"结束时间"` // 结束时间
}

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