parent
0b68d2d075
commit
d63a3e16d1
@ -1,38 +0,0 @@
|
||||
package golog
|
||||
|
||||
import "go.dtapp.net/goip"
|
||||
|
||||
// GinClient 框架日志
|
||||
type GinClient struct {
|
||||
ipService *goip.Client // IP服务
|
||||
slog struct {
|
||||
status bool // 状态
|
||||
client *SLog // 日志服务
|
||||
}
|
||||
}
|
||||
|
||||
// GinClientFun 框架日志驱动
|
||||
type GinClientFun func() *GinClient
|
||||
|
||||
// GinClientConfig 框架日志配置
|
||||
type GinClientConfig struct {
|
||||
IpService *goip.Client // IP服务
|
||||
}
|
||||
|
||||
// GinCustomClient 框架自定义日志
|
||||
type GinCustomClient struct {
|
||||
ipService *goip.Client // IP服务
|
||||
slog struct {
|
||||
status bool // 状态
|
||||
client *SLog // 日志服务
|
||||
}
|
||||
}
|
||||
|
||||
// GinCustomClientFun 框架自定义日志驱动
|
||||
type GinCustomClientFun func() *GinCustomClient
|
||||
|
||||
// GinCustomClientConfig 框架自定义日志配置
|
||||
type GinCustomClientConfig struct {
|
||||
IpService *goip.Client // IP服务
|
||||
CurrentIp string // 当前IP
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package golog
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
func NewGinCustomClient(ctx context.Context, config *GinCustomClientConfig) (*GinCustomClient, error) {
|
||||
c := &GinCustomClient{}
|
||||
c.ipService = config.IpService
|
||||
return c, nil
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package golog
|
||||
|
||||
import (
|
||||
"context"
|
||||
"go.dtapp.net/goip"
|
||||
)
|
||||
|
||||
// GinSLogCustom 框架自定义日志
|
||||
type GinSLogCustom struct {
|
||||
ipService *goip.Client // IP服务
|
||||
slog struct {
|
||||
status bool // 状态
|
||||
client *SLog // 日志服务
|
||||
}
|
||||
}
|
||||
|
||||
// GinSLogCustomFun 框架自定义日志驱动
|
||||
type GinSLogCustomFun func() *GinSLogCustom
|
||||
|
||||
// NewGinSLogCustom 创建框架实例化
|
||||
func NewGinSLogCustom(ctx context.Context, ipService *goip.Client) (*GinSLogCustom, error) {
|
||||
c := &GinSLogCustom{}
|
||||
c.ipService = ipService
|
||||
return c, nil
|
||||
}
|
Loading…
Reference in new issue