From 9ae52fb8814b0ed5222691d105e75bcf685e35ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=85=89=E6=98=A5?= Date: Tue, 6 Sep 2022 13:46:55 +0800 Subject: [PATCH] - update gorm --- api_gorm.go | 136 +++++++++++++++++++++++----------------------- const.go | 2 +- gin_gorm.go | 151 ++++++++++++++++++++++++---------------------------- go.mod | 4 -- go.sum | 32 ----------- 5 files changed, 137 insertions(+), 188 deletions(-) diff --git a/api_gorm.go b/api_gorm.go index 5ca7ebb..4299948 100644 --- a/api_gorm.go +++ b/api_gorm.go @@ -8,7 +8,6 @@ import ( "go.dtapp.net/gorequest" "go.dtapp.net/gotrace_id" "go.dtapp.net/gourl" - "gorm.io/datatypes" "gorm.io/gorm" "os" "runtime" @@ -76,32 +75,31 @@ func (c *ApiClient) gormAutoMigrate() (err error) { // 模型结构体 type apiPostgresqlLog struct { - LogId uint `gorm:"primaryKey;comment:【记录】编号" json:"log_id,omitempty"` //【记录】编号 - TraceId string `gorm:"index;comment:【系统】跟踪编号" json:"trace_id,omitempty"` //【系统】跟踪编号 - RequestTime time.Time `gorm:"index;comment:【请求】时间" json:"request_time,omitempty"` //【请求】时间 - RequestUri string `gorm:"comment:【请求】链接" json:"request_uri,omitempty"` //【请求】链接 - RequestUrl string `gorm:"comment:【请求】链接" json:"request_url,omitempty"` //【请求】链接 - RequestApi string `gorm:"index;comment:【请求】接口" json:"request_api,omitempty"` //【请求】接口 - RequestMethod string `gorm:"index;comment:【请求】方式" json:"request_method,omitempty"` //【请求】方式 - RequestParams datatypes.JSON `gorm:"type:jsonb;comment:【请求】参数" json:"request_params,omitempty"` //【请求】参数 - RequestHeader datatypes.JSON `gorm:"type:jsonb;comment:【请求】头部" json:"request_header,omitempty"` //【请求】头部 - ResponseHeader datatypes.JSON `gorm:"type:jsonb;comment:【返回】头部" json:"response_header,omitempty"` //【返回】头部 - ResponseStatusCode int `gorm:"index;comment:【返回】状态码" json:"response_status_code,omitempty"` //【返回】状态码 - ResponseBody datatypes.JSON `gorm:"type:jsonb;comment:【返回】数据" json:"response_body,omitempty"` //【返回】数据 - ResponseContent string `gorm:"comment:【返回】内容" json:"response_content,omitempty"` //【返回】内容 - ResponseContentLength int64 `gorm:"comment:【返回】大小" json:"response_content_length,omitempty"` //【返回】大小 - ResponseTime time.Time `gorm:"index;comment:【返回】时间" json:"response_time,omitempty"` //【返回】时间 - SystemHostName string `gorm:"index;comment:【系统】主机名" json:"system_host_name,omitempty"` //【系统】主机名 - SystemInsideIp string `gorm:"index;comment:【系统】内网ip" json:"system_inside_ip,omitempty"` //【系统】内网ip - GoVersion string `gorm:"index;comment:【程序】Go版本" json:"go_version,omitempty"` //【程序】Go版本 - SdkVersion string `gorm:"index;comment:【程序】Sdk版本" json:"sdk_version,omitempty"` //【程序】Sdk版本 + LogId uint `gorm:"primaryKey;comment:【记录】编号" json:"log_id,omitempty"` //【记录】编号 + TraceId string `gorm:"index;comment:【系统】跟踪编号" json:"trace_id,omitempty"` //【系统】跟踪编号 + RequestTime time.Time `gorm:"index;comment:【请求】时间" json:"request_time,omitempty"` //【请求】时间 + RequestUri string `gorm:"comment:【请求】链接" json:"request_uri,omitempty"` //【请求】链接 + RequestUrl string `gorm:"comment:【请求】链接" json:"request_url,omitempty"` //【请求】链接 + RequestApi string `gorm:"index;comment:【请求】接口" json:"request_api,omitempty"` //【请求】接口 + RequestMethod string `gorm:"index;comment:【请求】方式" json:"request_method,omitempty"` //【请求】方式 + RequestParams string `gorm:"comment:【请求】参数" json:"request_params,omitempty"` //【请求】参数 + RequestHeader string `gorm:"comment:【请求】头部" json:"request_header,omitempty"` //【请求】头部 + ResponseHeader string `gorm:"comment:【返回】头部" json:"response_header,omitempty"` //【返回】头部 + ResponseStatusCode int `gorm:"index;comment:【返回】状态码" json:"response_status_code,omitempty"` //【返回】状态码 + ResponseBody string `gorm:"comment:【返回】数据" json:"response_content,omitempty"` //【返回】数据 + ResponseContentLength int64 `gorm:"comment:【返回】大小" json:"response_content_length,omitempty"` //【返回】大小 + ResponseTime time.Time `gorm:"index;comment:【返回】时间" json:"response_time,omitempty"` //【返回】时间 + SystemHostName string `gorm:"index;comment:【系统】主机名" json:"system_host_name,omitempty"` //【系统】主机名 + SystemInsideIp string `gorm:"index;comment:【系统】内网ip" json:"system_inside_ip,omitempty"` //【系统】内网ip + GoVersion string `gorm:"index;comment:【程序】Go版本" json:"go_version,omitempty"` //【程序】Go版本 + SdkVersion string `gorm:"index;comment:【程序】Sdk版本" json:"sdk_version,omitempty"` //【程序】Sdk版本 } // 记录日志 func (c *ApiClient) gormRecord(ctx context.Context, postgresqlLog apiPostgresqlLog) (err error) { - if utf8.ValidString(string(postgresqlLog.ResponseBody)) == false { - postgresqlLog.ResponseBody = datatypes.JSON("") + if utf8.ValidString(postgresqlLog.ResponseBody) == false { + postgresqlLog.ResponseBody = "" } postgresqlLog.SystemHostName = c.gormConfig.hostname @@ -126,27 +124,26 @@ func (c *ApiClient) GormQuery() *gorm.DB { // GormMiddleware 中间件 func (c *ApiClient) GormMiddleware(ctx context.Context, request gorequest.Response, sdkVersion string) { data := apiPostgresqlLog{ - RequestTime: request.RequestTime, //【请求】时间 - RequestUri: request.RequestUri, //【请求】链接 - RequestUrl: gourl.UriParse(request.RequestUri).Url, //【请求】链接 - RequestApi: gourl.UriParse(request.RequestUri).Path, //【请求】接口 - RequestMethod: request.RequestMethod, //【请求】方式 - RequestParams: datatypes.JSON(dorm.JsonEncodeNoError(request.RequestParams)), //【请求】参数 - RequestHeader: datatypes.JSON(dorm.JsonEncodeNoError(request.RequestHeader)), //【请求】头部 - ResponseHeader: datatypes.JSON(dorm.JsonEncodeNoError(request.ResponseHeader)), //【返回】头部 - ResponseStatusCode: request.ResponseStatusCode, //【返回】状态码 - ResponseContentLength: request.ResponseContentLength, //【返回】大小 - ResponseTime: request.ResponseTime, //【返回】时间 - SdkVersion: sdkVersion, //【程序】Sdk版本 + RequestTime: request.RequestTime, //【请求】时间 + RequestUri: request.RequestUri, //【请求】链接 + RequestUrl: gourl.UriParse(request.RequestUri).Url, //【请求】链接 + RequestApi: gourl.UriParse(request.RequestUri).Path, //【请求】接口 + RequestMethod: request.RequestMethod, //【请求】方式 + RequestParams: dorm.JsonEncodeNoError(request.RequestParams), //【请求】参数 + RequestHeader: dorm.JsonEncodeNoError(request.RequestHeader), //【请求】头部 + ResponseHeader: dorm.JsonEncodeNoError(request.ResponseHeader), //【返回】头部 + ResponseStatusCode: request.ResponseStatusCode, //【返回】状态码 + ResponseContentLength: request.ResponseContentLength, //【返回】大小 + ResponseTime: request.ResponseTime, //【返回】时间 + SdkVersion: sdkVersion, //【程序】Sdk版本 } if request.HeaderIsImg() { - c.zapLog.WithTraceId(ctx).Sugar().Infof("[golog.api.GormMiddleware.isimg]:%s %s", data.RequestUri, request.ResponseHeader.Get("Content-Type")) + c.zapLog.WithTraceId(ctx).Sugar().Infof("[golog.api.GormMiddleware.isimg]:%s,%s", data.RequestUri, request.ResponseHeader.Get("Content-Type")) } else { - if len(dorm.JsonEncodeNoError(request.ResponseBody)) > 0 { - data.ResponseBody = request.ResponseBody //【返回】数据 - data.ResponseContent = dorm.JsonEncodeNoError(request.ResponseBody) //【返回】数据 + if len(request.ResponseBody) > 0 { + data.ResponseBody = dorm.JsonEncodeNoError(request.ResponseBody) //【返回】数据 } else { - c.zapLog.WithTraceId(ctx).Sugar().Infof("[golog.api.GormMiddleware.len]:%s %s", data.RequestUri, request.ResponseBody) + c.zapLog.WithTraceId(ctx).Sugar().Infof("[golog.api.GormMiddleware.len]:%s,%s", data.RequestUri, request.ResponseBody) } } @@ -163,26 +160,26 @@ func (c *ApiClient) GormMiddleware(ctx context.Context, request gorequest.Respon // GormMiddlewareXml 中间件 func (c *ApiClient) GormMiddlewareXml(ctx context.Context, request gorequest.Response, sdkVersion string) { data := apiPostgresqlLog{ - RequestTime: request.RequestTime, //【请求】时间 - RequestUri: request.RequestUri, //【请求】链接 - RequestUrl: gourl.UriParse(request.RequestUri).Url, //【请求】链接 - RequestApi: gourl.UriParse(request.RequestUri).Path, //【请求】接口 - RequestMethod: request.RequestMethod, //【请求】方式 - RequestParams: datatypes.JSON(dorm.JsonEncodeNoError(request.RequestParams)), //【请求】参数 - RequestHeader: datatypes.JSON(dorm.JsonEncodeNoError(request.RequestHeader)), //【请求】头部 - ResponseHeader: datatypes.JSON(dorm.JsonEncodeNoError(request.ResponseHeader)), //【返回】头部 - ResponseStatusCode: request.ResponseStatusCode, //【返回】状态码 - ResponseContentLength: request.ResponseContentLength, //【返回】大小 - ResponseTime: request.ResponseTime, //【返回】时间 - SdkVersion: sdkVersion, //【程序】Sdk版本 + RequestTime: request.RequestTime, //【请求】时间 + RequestUri: request.RequestUri, //【请求】链接 + RequestUrl: gourl.UriParse(request.RequestUri).Url, //【请求】链接 + RequestApi: gourl.UriParse(request.RequestUri).Path, //【请求】接口 + RequestMethod: request.RequestMethod, //【请求】方式 + RequestParams: dorm.JsonEncodeNoError(request.RequestParams), //【请求】参数 + RequestHeader: dorm.JsonEncodeNoError(request.RequestHeader), //【请求】头部 + ResponseHeader: dorm.JsonEncodeNoError(request.ResponseHeader), //【返回】头部 + ResponseStatusCode: request.ResponseStatusCode, //【返回】状态码 + ResponseContentLength: request.ResponseContentLength, //【返回】大小 + ResponseTime: request.ResponseTime, //【返回】时间 + SdkVersion: sdkVersion, //【程序】Sdk版本 } if request.HeaderIsImg() { - c.zapLog.WithTraceId(ctx).Sugar().Infof("[golog.api.GormMiddlewareXml.isimg]:%s %s", data.RequestUri, request.ResponseHeader.Get("Content-Type")) + c.zapLog.WithTraceId(ctx).Sugar().Infof("[golog.api.GormMiddlewareXml.isimg]:%s,%s", data.RequestUri, request.ResponseHeader.Get("Content-Type")) } else { if len(dorm.JsonEncodeNoError(request.ResponseBody)) > 0 { - data.ResponseContent = dorm.JsonEncodeNoError(request.ResponseBody) //【返回】内容 + data.ResponseBody = dorm.JsonEncodeNoError(request.ResponseBody) //【返回】内容 } else { - c.zapLog.WithTraceId(ctx).Sugar().Infof("[golog.api.GormMiddlewareXml.len]:%s %s", data.RequestUri, request.ResponseBody) + c.zapLog.WithTraceId(ctx).Sugar().Infof("[golog.api.GormMiddlewareXml.len]:%s,%s", data.RequestUri, request.ResponseBody) } } @@ -199,27 +196,26 @@ func (c *ApiClient) GormMiddlewareXml(ctx context.Context, request gorequest.Res // GormMiddlewareCustom 中间件 func (c *ApiClient) GormMiddlewareCustom(ctx context.Context, api string, request gorequest.Response, sdkVersion string) { data := apiPostgresqlLog{ - RequestTime: request.RequestTime, //【请求】时间 - RequestUri: request.RequestUri, //【请求】链接 - RequestUrl: gourl.UriParse(request.RequestUri).Url, //【请求】链接 - RequestApi: api, //【请求】接口 - RequestMethod: request.RequestMethod, //【请求】方式 - RequestParams: datatypes.JSON(dorm.JsonEncodeNoError(request.RequestParams)), //【请求】参数 - RequestHeader: datatypes.JSON(dorm.JsonEncodeNoError(request.RequestHeader)), //【请求】头部 - ResponseHeader: datatypes.JSON(dorm.JsonEncodeNoError(request.ResponseHeader)), //【返回】头部 - ResponseStatusCode: request.ResponseStatusCode, //【返回】状态码 - ResponseContentLength: request.ResponseContentLength, //【返回】大小 - ResponseTime: request.ResponseTime, //【返回】时间 - SdkVersion: sdkVersion, //【程序】Sdk版本 + RequestTime: request.RequestTime, //【请求】时间 + RequestUri: request.RequestUri, //【请求】链接 + RequestUrl: gourl.UriParse(request.RequestUri).Url, //【请求】链接 + RequestApi: api, //【请求】接口 + RequestMethod: request.RequestMethod, //【请求】方式 + RequestParams: dorm.JsonEncodeNoError(request.RequestParams), //【请求】参数 + RequestHeader: dorm.JsonEncodeNoError(request.RequestHeader), //【请求】头部 + ResponseHeader: dorm.JsonEncodeNoError(request.ResponseHeader), //【返回】头部 + ResponseStatusCode: request.ResponseStatusCode, //【返回】状态码 + ResponseContentLength: request.ResponseContentLength, //【返回】大小 + ResponseTime: request.ResponseTime, //【返回】时间 + SdkVersion: sdkVersion, //【程序】Sdk版本 } if request.HeaderIsImg() { - c.zapLog.WithTraceId(ctx).Sugar().Infof("[golog.api.GormMiddlewareCustom.isimg]:%s %s", data.RequestUri, request.ResponseHeader.Get("Content-Type")) + c.zapLog.WithTraceId(ctx).Sugar().Infof("[golog.api.GormMiddlewareCustom.isimg]:%s,%s", data.RequestUri, request.ResponseHeader.Get("Content-Type")) } else { if len(dorm.JsonEncodeNoError(request.ResponseBody)) > 0 { - data.ResponseBody = request.ResponseBody //【返回】数据 - data.ResponseContent = dorm.JsonEncodeNoError(request.ResponseBody) //【返回】数据 + data.ResponseBody = dorm.JsonEncodeNoError(request.ResponseBody) //【返回】数据 } else { - c.zapLog.WithTraceId(ctx).Sugar().Infof("[golog.api.GormMiddlewareCustom.len]:%s %s", data.RequestUri, request.ResponseBody) + c.zapLog.WithTraceId(ctx).Sugar().Infof("[golog.api.GormMiddlewareCustom.len]:%s,%s", data.RequestUri, request.ResponseBody) } } diff --git a/const.go b/const.go index fca0c82..0e02042 100644 --- a/const.go +++ b/const.go @@ -1,5 +1,5 @@ package golog const ( - Version = "1.0.66" + Version = "1.0.67" ) diff --git a/gin_gorm.go b/gin_gorm.go index 10d6784..35033b4 100644 --- a/gin_gorm.go +++ b/gin_gorm.go @@ -12,7 +12,6 @@ import ( "go.dtapp.net/gotime" "go.dtapp.net/gotrace_id" "go.dtapp.net/gourl" - "gorm.io/datatypes" "gorm.io/gorm" "io/ioutil" "net" @@ -85,36 +84,34 @@ func (c *GinClient) gormAutoMigrate() (err error) { // 模型结构体 type ginPostgresqlLog struct { - LogId uint `gorm:"primaryKey;comment:【记录】编号" json:"log_id,omitempty"` //【记录】编号 - TraceId string `gorm:"index;comment:【系统】跟踪编号" json:"trace_id,omitempty"` //【系统】跟踪编号 - RequestTime time.Time `gorm:"index;comment:【请求】时间" json:"request_time,omitempty"` //【请求】时间 - RequestUri string `gorm:"comment:【请求】请求链接 域名+路径+参数" json:"request_uri,omitempty"` //【请求】请求链接 域名+路径+参数 - RequestUrl string `gorm:"comment:【请求】请求链接 域名+路径" json:"request_url,omitempty"` //【请求】请求链接 域名+路径 - RequestApi string `gorm:"index;comment:【请求】请求接口 路径" json:"request_api,omitempty"` //【请求】请求接口 路径 - RequestMethod string `gorm:"index;comment:【请求】请求方式" json:"request_method,omitempty"` //【请求】请求方式 - RequestProto string `gorm:"comment:【请求】请求协议" json:"request_proto,omitempty"` //【请求】请求协议 - RequestUa string `gorm:"comment:【请求】请求UA" json:"request_ua,omitempty"` //【请求】请求UA - RequestReferer string `gorm:"comment:【请求】请求referer" json:"request_referer,omitempty"` //【请求】请求referer - RequestBody datatypes.JSON `gorm:"type:jsonb;comment:【请求】请求主体" json:"request_body,omitempty"` //【请求】请求主体 - RequestContent string `gorm:"comment:【请求】请求内容" json:"request_content,omitempty"` //【请求】请求内容 - RequestUrlQuery datatypes.JSON `gorm:"type:jsonb;comment:【请求】请求URL参数" json:"request_url_query,omitempty"` //【请求】请求URL参数 - RequestIp string `gorm:"index;comment:【请求】请求客户端Ip" json:"request_ip,omitempty"` //【请求】请求客户端Ip - RequestIpCountry string `gorm:"index;comment:【请求】请求客户端城市" json:"request_ip_country,omitempty"` //【请求】请求客户端城市 - RequestIpRegion string `gorm:"index;comment:【请求】请求客户端区域" json:"request_ip_region,omitempty"` //【请求】请求客户端区域 - RequestIpProvince string `gorm:"index;comment:【请求】请求客户端省份" json:"request_ip_province,omitempty"` //【请求】请求客户端省份 - RequestIpCity string `gorm:"index;comment:【请求】请求客户端城市" json:"request_ip_city,omitempty"` //【请求】请求客户端城市 - RequestIpIsp string `gorm:"index;comment:【请求】请求客户端运营商" json:"request_ip_isp,omitempty"` //【请求】请求客户端运营商 - RequestHeader datatypes.JSON `gorm:"type:jsonb;comment:【请求】请求头" json:"request_header,omitempty"` //【请求】请求头 - ResponseTime time.Time `gorm:"index;comment:【返回】时间" json:"response_time,omitempty"` //【返回】时间 - ResponseCode int `gorm:"index;comment:【返回】状态码" json:"response_code,omitempty"` //【返回】状态码 - ResponseMsg string `gorm:"comment:【返回】描述" json:"response_msg,omitempty"` //【返回】描述 - ResponseData datatypes.JSON `gorm:"type:jsonb;comment:【返回】数据" json:"response_data,omitempty"` //【返回】数据 - ResponseContent string `gorm:"comment:【返回】内容" json:"response_content,omitempty"` //【返回】内容 - CostTime int64 `gorm:"comment:【系统】花费时间" json:"cost_time,omitempty"` //【系统】花费时间 - SystemHostName string `gorm:"index;comment:【系统】主机名" json:"system_host_name,omitempty"` //【系统】主机名 - SystemInsideIp string `gorm:"index;comment:【系统】内网ip" json:"system_inside_ip,omitempty"` //【系统】内网ip - GoVersion string `gorm:"index;comment:【程序】Go版本" json:"go_version,omitempty"` //【程序】Go版本 - SdkVersion string `gorm:"index;comment:【程序】Sdk版本" json:"sdk_version,omitempty"` //【程序】Sdk版本 + LogId uint `gorm:"primaryKey;comment:【记录】编号" json:"log_id,omitempty"` //【记录】编号 + TraceId string `gorm:"index;comment:【系统】跟踪编号" json:"trace_id,omitempty"` //【系统】跟踪编号 + RequestTime time.Time `gorm:"index;comment:【请求】时间" json:"request_time,omitempty"` //【请求】时间 + RequestUri string `gorm:"comment:【请求】请求链接 域名+路径+参数" json:"request_uri,omitempty"` //【请求】请求链接 域名+路径+参数 + RequestUrl string `gorm:"comment:【请求】请求链接 域名+路径" json:"request_url,omitempty"` //【请求】请求链接 域名+路径 + RequestApi string `gorm:"index;comment:【请求】请求接口 路径" json:"request_api,omitempty"` //【请求】请求接口 路径 + RequestMethod string `gorm:"index;comment:【请求】请求方式" json:"request_method,omitempty"` //【请求】请求方式 + RequestProto string `gorm:"comment:【请求】请求协议" json:"request_proto,omitempty"` //【请求】请求协议 + RequestUa string `gorm:"comment:【请求】请求UA" json:"request_ua,omitempty"` //【请求】请求UA + RequestReferer string `gorm:"comment:【请求】请求referer" json:"request_referer,omitempty"` //【请求】请求referer + RequestBody string `gorm:"comment:【请求】请求主体" json:"request_body,omitempty"` //【请求】请求主体 + RequestUrlQuery string `gorm:"comment:【请求】请求URL参数" json:"request_url_query,omitempty"` //【请求】请求URL参数 + RequestIp string `gorm:"index;comment:【请求】请求客户端Ip" json:"request_ip,omitempty"` //【请求】请求客户端Ip + RequestIpCountry string `gorm:"index;comment:【请求】请求客户端城市" json:"request_ip_country,omitempty"` //【请求】请求客户端城市 + RequestIpRegion string `gorm:"index;comment:【请求】请求客户端区域" json:"request_ip_region,omitempty"` //【请求】请求客户端区域 + RequestIpProvince string `gorm:"index;comment:【请求】请求客户端省份" json:"request_ip_province,omitempty"` //【请求】请求客户端省份 + RequestIpCity string `gorm:"index;comment:【请求】请求客户端城市" json:"request_ip_city,omitempty"` //【请求】请求客户端城市 + RequestIpIsp string `gorm:"index;comment:【请求】请求客户端运营商" json:"request_ip_isp,omitempty"` //【请求】请求客户端运营商 + RequestHeader string `gorm:"comment:【请求】请求头" json:"request_header,omitempty"` //【请求】请求头 + ResponseTime time.Time `gorm:"index;comment:【返回】时间" json:"response_time,omitempty"` //【返回】时间 + ResponseCode int `gorm:"index;comment:【返回】状态码" json:"response_code,omitempty"` //【返回】状态码 + ResponseMsg string `gorm:"comment:【返回】描述" json:"response_msg,omitempty"` //【返回】描述 + ResponseData string `gorm:"comment:【返回】数据" json:"response_data,omitempty"` //【返回】数据 + CostTime int64 `gorm:"comment:【系统】花费时间" json:"cost_time,omitempty"` //【系统】花费时间 + SystemHostName string `gorm:"index;comment:【系统】主机名" json:"system_host_name,omitempty"` //【系统】主机名 + SystemInsideIp string `gorm:"index;comment:【系统】内网ip" json:"system_inside_ip,omitempty"` //【系统】内网ip + GoVersion string `gorm:"index;comment:【程序】Go版本" json:"go_version,omitempty"` //【程序】Go版本 + SdkVersion string `gorm:"index;comment:【程序】Sdk版本" json:"sdk_version,omitempty"` //【程序】Sdk版本 } // gormRecord 记录日志 @@ -141,27 +138,26 @@ func (c *GinClient) gormRecordJson(ginCtx *gin.Context, traceId string, requestT } data := ginPostgresqlLog{ - TraceId: traceId, //【系统】跟踪编号 - RequestTime: requestTime, //【请求】时间 - RequestUrl: ginCtx.Request.RequestURI, //【请求】请求链接 - RequestApi: gourl.UriFilterExcludeQueryString(ginCtx.Request.RequestURI), //【请求】请求接口 - RequestMethod: ginCtx.Request.Method, //【请求】请求方式 - RequestProto: ginCtx.Request.Proto, //【请求】请求协议 - RequestUa: ginCtx.Request.UserAgent(), //【请求】请求UA - RequestReferer: ginCtx.Request.Referer(), //【请求】请求referer - RequestUrlQuery: datatypes.JSON(dorm.JsonEncodeNoError(ginCtx.Request.URL.Query())), //【请求】请求URL参数 - RequestIp: clientIp, //【请求】请求客户端Ip - RequestIpCountry: requestClientIpCountry, //【请求】请求客户端城市 - RequestIpRegion: requestClientIpRegion, //【请求】请求客户端区域 - RequestIpProvince: requestClientIpProvince, //【请求】请求客户端省份 - RequestIpCity: requestClientIpCity, //【请求】请求客户端城市 - RequestIpIsp: requestClientIpIsp, //【请求】请求客户端运营商 - RequestHeader: datatypes.JSON(dorm.JsonEncodeNoError(ginCtx.Request.Header)), //【请求】请求头 - ResponseTime: gotime.Current().Time, //【返回】时间 - ResponseCode: responseCode, //【返回】状态码 - ResponseData: datatypes.JSON(responseBody), //【返回】数据 - ResponseContent: responseBody, //【返回】内容 - CostTime: endTime - startTime, //【系统】花费时间 + TraceId: traceId, //【系统】跟踪编号 + RequestTime: requestTime, //【请求】时间 + RequestUrl: ginCtx.Request.RequestURI, //【请求】请求链接 + RequestApi: gourl.UriFilterExcludeQueryString(ginCtx.Request.RequestURI), //【请求】请求接口 + RequestMethod: ginCtx.Request.Method, //【请求】请求方式 + RequestProto: ginCtx.Request.Proto, //【请求】请求协议 + RequestUa: ginCtx.Request.UserAgent(), //【请求】请求UA + RequestReferer: ginCtx.Request.Referer(), //【请求】请求referer + RequestUrlQuery: dorm.JsonEncodeNoError(ginCtx.Request.URL.Query()), //【请求】请求URL参数 + RequestIp: clientIp, //【请求】请求客户端Ip + RequestIpCountry: requestClientIpCountry, //【请求】请求客户端城市 + RequestIpRegion: requestClientIpRegion, //【请求】请求客户端区域 + RequestIpProvince: requestClientIpProvince, //【请求】请求客户端省份 + RequestIpCity: requestClientIpCity, //【请求】请求客户端城市 + RequestIpIsp: requestClientIpIsp, //【请求】请求客户端运营商 + RequestHeader: dorm.JsonEncodeNoError(ginCtx.Request.Header), //【请求】请求头 + ResponseTime: gotime.Current().Time, //【返回】时间 + ResponseCode: responseCode, //【返回】状态码 + ResponseData: responseBody, //【返回】数据 + CostTime: endTime - startTime, //【系统】花费时间 } if ginCtx.Request.TLS == nil { data.RequestUri = "http://" + ginCtx.Request.Host + ginCtx.Request.RequestURI //【请求】请求链接 @@ -170,8 +166,7 @@ func (c *GinClient) gormRecordJson(ginCtx *gin.Context, traceId string, requestT } if len(requestBody) > 0 { - data.RequestBody = requestBody //【请求】请求主体 - data.RequestContent = dorm.JsonEncodeNoError(requestBody) //【请求】请求内容 + data.RequestBody = dorm.JsonEncodeNoError(requestBody) //【请求】请求主体 } else { c.zapLog.WithTraceIdStr(traceId).Sugar().Infof("[golog.gin.gormRecordJson.len]:%s,%s", data.RequestUri, requestBody) } @@ -184,9 +179,7 @@ func (c *GinClient) gormRecordJson(ginCtx *gin.Context, traceId string, requestT if err != nil { c.zapLog.WithTraceIdStr(traceId).Sugar().Errorf("[golog.gin.gormRecordJson]:%s", err) c.zapLog.WithTraceIdStr(traceId).Sugar().Errorf("[golog.gin.gormRecordJson.string]:%s", requestBody) - c.zapLog.WithTraceIdStr(traceId).Sugar().Errorf("[golog.gin.gormRecordJson.value]:%+v", requestBody) c.zapLog.WithTraceIdStr(traceId).Sugar().Errorf("[golog.gin.gormRecordJson.JsonEncodeNoError.string]:%s", dorm.JsonEncodeNoError(requestBody)) - c.zapLog.WithTraceIdStr(traceId).Sugar().Errorf("[golog.gin.gormRecordJson.JsonEncodeNoError.value]:%+v", dorm.JsonEncodeNoError(requestBody)) } } @@ -197,27 +190,26 @@ func (c *GinClient) gormRecordXml(ginCtx *gin.Context, traceId string, requestTi } data := ginPostgresqlLog{ - TraceId: traceId, //【系统】跟踪编号 - RequestTime: requestTime, //【请求】时间 - RequestUrl: ginCtx.Request.RequestURI, //【请求】请求链接 - RequestApi: gourl.UriFilterExcludeQueryString(ginCtx.Request.RequestURI), //【请求】请求接口 - RequestMethod: ginCtx.Request.Method, //【请求】请求方式 - RequestProto: ginCtx.Request.Proto, //【请求】请求协议 - RequestUa: ginCtx.Request.UserAgent(), //【请求】请求UA - RequestReferer: ginCtx.Request.Referer(), //【请求】请求referer - RequestUrlQuery: datatypes.JSON(dorm.JsonEncodeNoError(ginCtx.Request.URL.Query())), //【请求】请求URL参数 - RequestIp: clientIp, //【请求】请求客户端Ip - RequestIpCountry: requestClientIpCountry, //【请求】请求客户端城市 - RequestIpRegion: requestClientIpRegion, //【请求】请求客户端区域 - RequestIpProvince: requestClientIpProvince, //【请求】请求客户端省份 - RequestIpCity: requestClientIpCity, //【请求】请求客户端城市 - RequestIpIsp: requestClientIpIsp, //【请求】请求客户端运营商 - RequestHeader: datatypes.JSON(dorm.JsonEncodeNoError(ginCtx.Request.Header)), //【请求】请求头 - ResponseTime: gotime.Current().Time, //【返回】时间 - ResponseCode: responseCode, //【返回】状态码 - ResponseData: datatypes.JSON(responseBody), //【返回】数据 - ResponseContent: responseBody, //【返回】内容 - CostTime: endTime - startTime, //【系统】花费时间 + TraceId: traceId, //【系统】跟踪编号 + RequestTime: requestTime, //【请求】时间 + RequestUrl: ginCtx.Request.RequestURI, //【请求】请求链接 + RequestApi: gourl.UriFilterExcludeQueryString(ginCtx.Request.RequestURI), //【请求】请求接口 + RequestMethod: ginCtx.Request.Method, //【请求】请求方式 + RequestProto: ginCtx.Request.Proto, //【请求】请求协议 + RequestUa: ginCtx.Request.UserAgent(), //【请求】请求UA + RequestReferer: ginCtx.Request.Referer(), //【请求】请求referer + RequestUrlQuery: dorm.JsonEncodeNoError(ginCtx.Request.URL.Query()), //【请求】请求URL参数 + RequestIp: clientIp, //【请求】请求客户端Ip + RequestIpCountry: requestClientIpCountry, //【请求】请求客户端城市 + RequestIpRegion: requestClientIpRegion, //【请求】请求客户端区域 + RequestIpProvince: requestClientIpProvince, //【请求】请求客户端省份 + RequestIpCity: requestClientIpCity, //【请求】请求客户端城市 + RequestIpIsp: requestClientIpIsp, //【请求】请求客户端运营商 + RequestHeader: dorm.JsonEncodeNoError(ginCtx.Request.Header), //【请求】请求头 + ResponseTime: gotime.Current().Time, //【返回】时间 + ResponseCode: responseCode, //【返回】状态码 + ResponseData: responseBody, //【返回】数据 + CostTime: endTime - startTime, //【系统】花费时间 } if ginCtx.Request.TLS == nil { data.RequestUri = "http://" + ginCtx.Request.Host + ginCtx.Request.RequestURI //【请求】请求链接 @@ -226,7 +218,7 @@ func (c *GinClient) gormRecordXml(ginCtx *gin.Context, traceId string, requestTi } if len(requestBody) > 0 { - data.RequestContent = dorm.XmlEncodeNoError(dorm.XmlDecodeNoError(requestBody)) //【请求】请求内容 + data.RequestBody = dorm.XmlEncodeNoError(dorm.XmlDecodeNoError(requestBody)) //【请求】请求内容 } else { c.zapLog.WithTraceIdStr(traceId).Sugar().Infof("[golog.gin.gormRecordXml.len]:%s,%s", data.RequestUri, requestBody) } @@ -239,11 +231,8 @@ func (c *GinClient) gormRecordXml(ginCtx *gin.Context, traceId string, requestTi if err != nil { c.zapLog.WithTraceIdStr(traceId).Sugar().Errorf("[golog.gin.gormRecordXml]:%s", err) c.zapLog.WithTraceIdStr(traceId).Sugar().Errorf("[golog.gin.gormRecordXml.string]:%s", requestBody) - c.zapLog.WithTraceIdStr(traceId).Sugar().Errorf("[golog.gin.gormRecordXml.value]:%+v", requestBody) c.zapLog.WithTraceIdStr(traceId).Sugar().Errorf("[golog.gin.gormRecordXml.XmlDecodeNoError.string]:%s", dorm.XmlDecodeNoError(requestBody)) - c.zapLog.WithTraceIdStr(traceId).Sugar().Errorf("[golog.gin.gormRecordXml.XmlDecodeNoError.value]:%+v", dorm.XmlDecodeNoError(requestBody)) c.zapLog.WithTraceIdStr(traceId).Sugar().Errorf("[golog.gin.gormRecordXml.XmlEncodeNoError.string]:%s", dorm.XmlEncodeNoError(dorm.XmlDecodeNoError(requestBody))) - c.zapLog.WithTraceIdStr(traceId).Sugar().Errorf("[golog.gin.gormRecordXml.XmlEncodeNoError.value]:%+v", dorm.XmlEncodeNoError(dorm.XmlDecodeNoError(requestBody))) } } diff --git a/go.mod b/go.mod index 1ea51a5..71b14d1 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,6 @@ require ( go.dtapp.net/gourl v1.0.0 go.mongodb.org/mongo-driver v1.10.1 go.uber.org/zap v1.23.0 - gorm.io/datatypes v1.0.7 gorm.io/gorm v1.23.8 ) @@ -21,7 +20,6 @@ require ( github.com/basgys/goxml2json v1.1.0 // indirect github.com/beego/beego/v2 v2.0.5 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/denisenkom/go-mssqldb v0.12.2 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-playground/locales v0.14.0 // indirect @@ -87,8 +85,6 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gorm.io/driver/mysql v1.3.6 // indirect gorm.io/driver/postgres v1.3.9 // indirect - gorm.io/driver/sqlite v1.3.6 // indirect - gorm.io/driver/sqlserver v1.3.2 // indirect mellium.im/sasl v0.3.0 // indirect modernc.org/libc v1.16.19 // indirect modernc.org/sqlite v1.18.0 // indirect diff --git a/go.sum b/go.sum index e64a18b..4b79832 100644 --- a/go.sum +++ b/go.sum @@ -3,9 +3,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s= gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU= gitee.com/travelliu/dm v1.8.11192/go.mod h1:DHTzyhCrM843x9VdKVbZ+GKXGRbKM2sJ4LxihRxShkE= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= @@ -63,13 +60,9 @@ 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/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denisenkom/go-mssqldb v0.11.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= -github.com/denisenkom/go-mssqldb v0.12.2 h1:1OcPn5GBIobjWNd+8yjfHNIaFX14B1pWI3F9HZy5KXw= -github.com/denisenkom/go-mssqldb v0.12.2/go.mod h1:lnIw1mZukFRZDJYQ0Pb833QS2IaC3l5HkEfra2LJ+sk= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= @@ -121,11 +114,6 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= -github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= -github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= -github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= -github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= -github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -325,7 +313,6 @@ github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peK github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= @@ -344,7 +331,6 @@ 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.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.6.6 h1:Duep6KMIDpY4Yo11iFsvyqJDyfzLF9+sndUKT+v64GQ= github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= @@ -384,7 +370,6 @@ github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaF github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -565,14 +550,12 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -608,7 +591,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b h1:ZmngSVLe/wycRns9MKikG9OWIEjGcGAkacif7oYQaUY= golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= @@ -736,30 +718,16 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/datatypes v1.0.7 h1:8NhJN4+annFjwV1WufDhFiPjdUvV1lSGUdg1UCjQIWY= -gorm.io/datatypes v1.0.7/go.mod h1:l9qkCuy0CdzDEop9HKUdcnC9gHC2sRlaFtHkTzsZRqg= -gorm.io/driver/mysql v1.3.2/go.mod h1:ChK6AHbHgDCFZyJp0F+BmVGb06PSIoh9uVYKAlRbb2U= gorm.io/driver/mysql v1.3.6 h1:BhX1Y/RyALb+T9bZ3t07wLnPZBukt+IRkMn8UZSNbGM= gorm.io/driver/mysql v1.3.6/go.mod h1:sSIebwZAVPiT+27jK9HIwvsqOGKx3YMPmrA3mBJR10c= -gorm.io/driver/postgres v1.3.4/go.mod h1:y0vEuInFKJtijuSGu9e5bs5hzzSzPK+LancpKpvbRBw= gorm.io/driver/postgres v1.3.9 h1:lWGiVt5CijhQAg0PWB7Od1RNcBw/jS4d2cAScBcSDXg= gorm.io/driver/postgres v1.3.9/go.mod h1:qw/FeqjxmYqW5dBcYNBsnhQULIApQdk7YuuDPktVi1U= -gorm.io/driver/sqlite v1.3.1/go.mod h1:wJx0hJspfycZ6myN38x1O/AqLtNS6c5o9TndewFbELg= -gorm.io/driver/sqlite v1.3.6 h1:Fi8xNYCUplOqWiPa3/GuCeowRNBRGTf62DEmhMDHeQQ= -gorm.io/driver/sqlite v1.3.6/go.mod h1:Sg1/pvnKtbQ7jLXxfZa+jSHvoX8hoZA8cn4xllOMTgE= -gorm.io/driver/sqlserver v1.3.1/go.mod h1:w25Vrx2BG+CJNUu/xKbFhaKlGxT/nzRkhWCCoptX8tQ= -gorm.io/driver/sqlserver v1.3.2 h1:yYt8f/xdAKLY7lCCyXxIUEgZ/WsURos3dHrx8MKFGAk= -gorm.io/driver/sqlserver v1.3.2/go.mod h1:w25Vrx2BG+CJNUu/xKbFhaKlGxT/nzRkhWCCoptX8tQ= -gorm.io/gorm v1.23.1/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= -gorm.io/gorm v1.23.4/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= -gorm.io/gorm v1.23.6/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= gorm.io/gorm v1.23.7/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= gorm.io/gorm v1.23.8 h1:h8sGJ+biDgBA1AD1Ha9gFCx7h8npU7AsLdlkX0n2TpE= gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=