- update fun

master v1.0.93
李光春 2 years ago
parent 21c597f0f5
commit dcbcbbe079

@ -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 实例

@ -1,6 +1,6 @@
package gojobs
const (
Version = "1.0.92"
Version = "1.0.93"
SpecifyIpNull = "0.0.0.0"
)

@ -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

@ -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=

@ -1,3 +1,3 @@
package dorm
const Version = "1.0.36"
const Version = "1.0.38"

7
vendor/go.dtapp.net/dorm/gorm.go generated vendored

@ -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 // 日志 - 状态

@ -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

@ -8,6 +8,9 @@ import (
"time"
)
// RedisClientFun *RedisClient 驱动
type RedisClientFun func() *RedisClient
type ConfigRedisClient struct {
Addr string // 地址
Password string // 密码

18
vendor/go.dtapp.net/golog/api.go generated vendored

@ -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 创建接口实例化

@ -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 创建接口实例化

@ -1,5 +1,5 @@
package golog
const (
Version = "1.0.79"
Version = "1.0.81"
)

18
vendor/go.dtapp.net/golog/gin.go generated vendored

@ -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 创建框架实例化

@ -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 创建框架实例化

@ -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

Loading…
Cancel
Save