- update fun

master v1.0.81
李光春 2 years ago
parent 10e31bb497
commit 5b328feee9

@ -33,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.80"
Version = "1.0.81"
)

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

@ -5,7 +5,7 @@ go 1.19
require (
github.com/gin-gonic/gin v1.8.1
github.com/natefinch/lumberjack v2.0.0+incompatible
go.dtapp.net/dorm v1.0.37
go.dtapp.net/dorm v1.0.38
go.dtapp.net/goip v1.0.34
go.dtapp.net/gorequest v1.0.31
go.dtapp.net/gotime v1.0.5

@ -512,8 +512,8 @@ 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.37 h1:EFhTfa1EVV0KASVsg5ZMJjQLpUPBazpHf19l1reOIf0=
go.dtapp.net/dorm v1.0.37/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/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/gorandom v1.0.1 h1:IWfMClh1ECPvyUjlqD7MwLq4mZdUusD1qAwAdsvEJBs=

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

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

@ -12,6 +12,10 @@ import (
// GormClientFun *GormClient 驱动
type GormClientFun func() *GormClient
// GormClientTableFun *GormClient 驱动
// string 表名
type GormClientTableFun func() (*GormClient, string)
type ConfigGormClient struct {
Dns string // 地址
LogStatus bool // 日志 - 状态

@ -9,9 +9,14 @@ import (
)
// MongoClientFun *MongoClient 驱动
// databaseName string 库名
// string 库名
type MongoClientFun func() (*MongoClient, string)
// MongoClientCollectionFun *MongoClient 驱动
// string 库名
// string 集合
type MongoClientCollectionFun func() (*MongoClient, string, string)
type ConfigMongoClient struct {
Dns string // 地址
Opts *options.ClientOptions

@ -246,7 +246,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.37
# go.dtapp.net/dorm v1.0.38
## explicit; go 1.19
go.dtapp.net/dorm
# go.dtapp.net/goip v1.0.34

Loading…
Cancel
Save