From dcbcbbe079e4d5f8c76a60ea11a444fb71bc8fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=85=89=E6=98=A5?= Date: Mon, 19 Sep 2022 10:34:21 +0800 Subject: [PATCH] - update fun --- client.go | 20 +++++++------------- const.go | 2 +- go.mod | 4 ++-- go.sum | 8 ++++---- vendor/go.dtapp.net/dorm/const.go | 2 +- vendor/go.dtapp.net/dorm/gorm.go | 7 +++++++ vendor/go.dtapp.net/dorm/mongo.go | 9 +++++++++ vendor/go.dtapp.net/dorm/redis.go | 3 +++ vendor/go.dtapp.net/golog/api.go | 18 +++++++++--------- vendor/go.dtapp.net/golog/api_gorm.go | 10 +++++----- vendor/go.dtapp.net/golog/const.go | 2 +- vendor/go.dtapp.net/golog/gin.go | 18 +++++++++--------- vendor/go.dtapp.net/golog/gin_gorm.go | 10 +++++----- vendor/modules.txt | 4 ++-- 14 files changed, 65 insertions(+), 52 deletions(-) diff --git a/client.go b/client.go index 1724c44..e196228 100644 --- a/client.go +++ b/client.go @@ -8,12 +8,6 @@ import ( "log" ) -// client *dorm.GormClient -type gormClientFun func() *dorm.GormClient - -// client *dorm.RedisClient -type redisClientFun func() *dorm.RedisClient - // 前缀 // lockKeyPrefix 锁Key前缀 xxx_lock // lockKeySeparator 锁Key分隔符 : @@ -23,13 +17,13 @@ type redisPrefixFun func() (lockKeyPrefix, lockKeySeparator, cornKeyPrefix, corn // ClientConfig 实例配置 type ClientConfig struct { - GormClientFun gormClientFun // 数据库驱动 - RedisClientFun redisClientFun // 数据库驱动 - RedisPrefixFun redisPrefixFun // 前缀 - Debug bool // 日志开关 - ZapLog *golog.ZapLog // 日志服务 - CurrentIp string // 当前ip - JsonStatus bool // json状态 + GormClientFun dorm.GormClientFun // 数据库驱动 + RedisClientFun dorm.RedisClientFun // 数据库驱动 + RedisPrefixFun redisPrefixFun // 前缀 + Debug bool // 日志开关 + ZapLog *golog.ZapLog // 日志服务 + CurrentIp string // 当前ip + JsonStatus bool // json状态 } // Client 实例 diff --git a/const.go b/const.go index 7213fcd..e2c836b 100644 --- a/const.go +++ b/const.go @@ -1,6 +1,6 @@ package gojobs const ( - Version = "1.0.92" + Version = "1.0.93" SpecifyIpNull = "0.0.0.0" ) diff --git a/go.mod b/go.mod index cb51657..714549c 100644 --- a/go.mod +++ b/go.mod @@ -6,10 +6,10 @@ require ( github.com/go-redis/redis/v9 v9.0.0-beta.2 github.com/jasonlvhit/gocron v0.0.1 github.com/robfig/cron/v3 v3.0.1 - go.dtapp.net/dorm v1.0.36 + go.dtapp.net/dorm v1.0.38 go.dtapp.net/goarray v1.0.1 go.dtapp.net/goip v1.0.34 - go.dtapp.net/golog v1.0.79 + go.dtapp.net/golog v1.0.81 go.dtapp.net/gostring v1.0.10 go.dtapp.net/gotime v1.0.5 go.dtapp.net/gotrace_id v1.0.6 diff --git a/go.sum b/go.sum index 8fe6dc3..a04d376 100644 --- a/go.sum +++ b/go.sum @@ -520,14 +520,14 @@ github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a/go.mod h1:ul22v+Nro/ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= -go.dtapp.net/dorm v1.0.36 h1:3kqdGhZ/oAKr8YMQo9OXAlByGal+uok6Yh33YXmdJtw= -go.dtapp.net/dorm v1.0.36/go.mod h1:z9ksZ4Y0HHH0odjEiG57d90/ZUBM51qXEWJC8fS+dEM= +go.dtapp.net/dorm v1.0.38 h1:9OgWY5bnar6D0Xdho62xn7RluXJNe8i7Kz/IeSUObF4= +go.dtapp.net/dorm v1.0.38/go.mod h1:z9ksZ4Y0HHH0odjEiG57d90/ZUBM51qXEWJC8fS+dEM= go.dtapp.net/goarray v1.0.1 h1:cHNHaJ2MFcuJPA1WKU2PM1EUZShS1vQqEH7n6YXsQVU= go.dtapp.net/goarray v1.0.1/go.mod h1:/MPhlFCAhQyeNV1M0v1PAOOX33Sg705fVjUgMO12IBQ= go.dtapp.net/goip v1.0.34 h1:aW2CuPpQwcDOJiyx/gHbvrha3/x+poFRpDxsLtO4EVw= go.dtapp.net/goip v1.0.34/go.mod h1:EctL6B8ue/kZKPr+kKZPU6YTTpNhihane9BHHffwo6Q= -go.dtapp.net/golog v1.0.79 h1:gpy8/vfNzMPhm2Nk8UYdAcvPAZ/3bLwYJ+ykaiz07CY= -go.dtapp.net/golog v1.0.79/go.mod h1:8yPCoCCgr7ZLg5uah+icloV/ahYdgXk1TUdFzUYywWE= +go.dtapp.net/golog v1.0.81 h1:ArmYelps0ZjZyKw5oRhRDTBgyiMk9SQIEveKz5JdOgo= +go.dtapp.net/golog v1.0.81/go.mod h1:4Pyx+hw4zul9DtHDuKRzBpVr30xnegEgZ/vK8GHBT04= go.dtapp.net/gorandom v1.0.1 h1:IWfMClh1ECPvyUjlqD7MwLq4mZdUusD1qAwAdsvEJBs= go.dtapp.net/gorandom v1.0.1/go.mod h1:ZPdgalKpvFV/ATQqR0k4ns/F/IpITAZpx6WkWirr5Y8= go.dtapp.net/gorequest v1.0.31 h1:r/OoU5Y00TbJjkQtpvwjsb/pllqO0UQQjFRY1veZYZc= diff --git a/vendor/go.dtapp.net/dorm/const.go b/vendor/go.dtapp.net/dorm/const.go index 6dd6b81..2abb4a0 100644 --- a/vendor/go.dtapp.net/dorm/const.go +++ b/vendor/go.dtapp.net/dorm/const.go @@ -1,3 +1,3 @@ package dorm -const Version = "1.0.36" +const Version = "1.0.38" diff --git a/vendor/go.dtapp.net/dorm/gorm.go b/vendor/go.dtapp.net/dorm/gorm.go index 5a13897..c08eeb3 100644 --- a/vendor/go.dtapp.net/dorm/gorm.go +++ b/vendor/go.dtapp.net/dorm/gorm.go @@ -9,6 +9,13 @@ import ( "time" ) +// GormClientFun *GormClient 驱动 +type GormClientFun func() *GormClient + +// GormClientTableFun *GormClient 驱动 +// string 表名 +type GormClientTableFun func() (*GormClient, string) + type ConfigGormClient struct { Dns string // 地址 LogStatus bool // 日志 - 状态 diff --git a/vendor/go.dtapp.net/dorm/mongo.go b/vendor/go.dtapp.net/dorm/mongo.go index 1b33b36..f11ad2a 100644 --- a/vendor/go.dtapp.net/dorm/mongo.go +++ b/vendor/go.dtapp.net/dorm/mongo.go @@ -8,6 +8,15 @@ import ( "go.mongodb.org/mongo-driver/mongo/options" ) +// MongoClientFun *MongoClient 驱动 +// string 库名 +type MongoClientFun func() (*MongoClient, string) + +// MongoClientCollectionFun *MongoClient 驱动 +// string 库名 +// string 集合 +type MongoClientCollectionFun func() (*MongoClient, string, string) + type ConfigMongoClient struct { Dns string // 地址 Opts *options.ClientOptions diff --git a/vendor/go.dtapp.net/dorm/redis.go b/vendor/go.dtapp.net/dorm/redis.go index 6ce6648..41196db 100644 --- a/vendor/go.dtapp.net/dorm/redis.go +++ b/vendor/go.dtapp.net/dorm/redis.go @@ -8,6 +8,9 @@ import ( "time" ) +// RedisClientFun *RedisClient 驱动 +type RedisClientFun func() *RedisClient + type ConfigRedisClient struct { Addr string // 地址 Password string // 密码 diff --git a/vendor/go.dtapp.net/golog/api.go b/vendor/go.dtapp.net/golog/api.go index a1a9fe6..9aefe1a 100644 --- a/vendor/go.dtapp.net/golog/api.go +++ b/vendor/go.dtapp.net/golog/api.go @@ -10,6 +10,10 @@ import ( "runtime" ) +// ApiClientFun *ApiClient 驱动 +// jsonStatus bool json状态 +type ApiClientFun func() (*ApiClient, bool) + // ApiClient 接口 type ApiClient struct { gormClient *dorm.GormClient // 数据库驱动 @@ -29,17 +33,13 @@ type ApiClient struct { } } -// client 数据库服务 -// string 表名 -type apiGormClientFun func() (*dorm.GormClient, string) - // ApiClientConfig 接口实例配置 type ApiClientConfig struct { - GormClientFun apiGormClientFun // 日志配置 - Debug bool // 日志开关 - ZapLog *ZapLog // 日志服务 - CurrentIp string // 当前ip - JsonStatus bool // json状态 + GormClientFun dorm.GormClientTableFun // 日志配置 + Debug bool // 日志开关 + ZapLog *ZapLog // 日志服务 + CurrentIp string // 当前ip + JsonStatus bool // json状态 } // NewApiClient 创建接口实例化 diff --git a/vendor/go.dtapp.net/golog/api_gorm.go b/vendor/go.dtapp.net/golog/api_gorm.go index 83f699f..084a7b9 100644 --- a/vendor/go.dtapp.net/golog/api_gorm.go +++ b/vendor/go.dtapp.net/golog/api_gorm.go @@ -17,11 +17,11 @@ import ( // ApiGormClientConfig 接口实例配置 type ApiGormClientConfig struct { - GormClientFun apiGormClientFun // 日志配置 - Debug bool // 日志开关 - ZapLog *ZapLog // 日志服务 - CurrentIp string // 当前ip - JsonStatus bool // json状态 + GormClientFun dorm.GormClientTableFun // 日志配置 + Debug bool // 日志开关 + ZapLog *ZapLog // 日志服务 + CurrentIp string // 当前ip + JsonStatus bool // json状态 } // NewApiGormClient 创建接口实例化 diff --git a/vendor/go.dtapp.net/golog/const.go b/vendor/go.dtapp.net/golog/const.go index db93410..1e03512 100644 --- a/vendor/go.dtapp.net/golog/const.go +++ b/vendor/go.dtapp.net/golog/const.go @@ -1,5 +1,5 @@ package golog const ( - Version = "1.0.79" + Version = "1.0.81" ) diff --git a/vendor/go.dtapp.net/golog/gin.go b/vendor/go.dtapp.net/golog/gin.go index e651247..4d08c27 100644 --- a/vendor/go.dtapp.net/golog/gin.go +++ b/vendor/go.dtapp.net/golog/gin.go @@ -17,6 +17,10 @@ import ( "runtime" ) +// GinClientFun *GinClient 驱动 +// jsonStatus bool json状态 +type GinClientFun func() (*GinClient, bool) + // GinClient 框架 type GinClient struct { gormClient *dorm.GormClient // 数据库驱动 @@ -36,17 +40,13 @@ type GinClient struct { } } -// client 数据库服务 -// string 表名 -type ginGormClientFun func() (*dorm.GormClient, string) - // GinClientConfig 框架实例配置 type GinClientConfig struct { - IpService *goip.Client // ip服务 - GormClientFun ginGormClientFun // 日志配置 - Debug bool // 日志开关 - ZapLog *ZapLog // 日志服务 - JsonStatus bool // json状态 + IpService *goip.Client // ip服务 + GormClientFun dorm.GormClientTableFun // 日志配置 + Debug bool // 日志开关 + ZapLog *ZapLog // 日志服务 + JsonStatus bool // json状态 } // NewGinClient 创建框架实例化 diff --git a/vendor/go.dtapp.net/golog/gin_gorm.go b/vendor/go.dtapp.net/golog/gin_gorm.go index 449894d..e667ac0 100644 --- a/vendor/go.dtapp.net/golog/gin_gorm.go +++ b/vendor/go.dtapp.net/golog/gin_gorm.go @@ -22,11 +22,11 @@ import ( // GinGormClientConfig 框架实例配置 type GinGormClientConfig struct { - IpService *goip.Client // ip服务 - GormClientFun ginGormClientFun // 日志配置 - Debug bool // 日志开关 - ZapLog *ZapLog // 日志服务 - JsonStatus bool // json状态 + IpService *goip.Client // ip服务 + GormClientFun dorm.GormClientTableFun // 日志配置 + Debug bool // 日志开关 + ZapLog *ZapLog // 日志服务 + JsonStatus bool // json状态 } // NewGinGormClient 创建框架实例化 diff --git a/vendor/modules.txt b/vendor/modules.txt index 5a70b20..75935ce 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -254,7 +254,7 @@ github.com/xdg-go/stringprep # github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a ## explicit; go 1.12 github.com/youmark/pkcs8 -# go.dtapp.net/dorm v1.0.36 +# go.dtapp.net/dorm v1.0.38 ## explicit; go 1.19 go.dtapp.net/dorm # go.dtapp.net/goarray v1.0.1 @@ -268,7 +268,7 @@ go.dtapp.net/goip/ip2region go.dtapp.net/goip/ip2region_v2 go.dtapp.net/goip/ipv6wry go.dtapp.net/goip/qqwry -# go.dtapp.net/golog v1.0.79 +# go.dtapp.net/golog v1.0.81 ## explicit; go 1.19 go.dtapp.net/golog # go.dtapp.net/gorandom v1.0.1