update
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Description : mysql客户端
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2021-03-01 9:20 下午
|
||||
package mysql
|
||||
@ -18,7 +18,7 @@ import (
|
||||
|
||||
// GetDatabaseClient 获取日志实例
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 10:49 下午 2021/3/1
|
||||
func GetDatabaseClient(conf *DBConfig, logConf *LogConfig) (*gorm.DB, error) {
|
||||
@ -49,7 +49,7 @@ func GetDatabaseClient(conf *DBConfig, logConf *LogConfig) (*gorm.DB, error) {
|
||||
|
||||
// buildConnectionDSN 构建建立连接的DSN
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 9:34 下午 2021/3/1
|
||||
func buildConnectionDSN(conf *DBConfig) string {
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Description : 数据定义
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2021-03-01 9:27 下午
|
||||
package mysql
|
||||
@ -14,7 +14,7 @@ import (
|
||||
|
||||
// DBConfig 数据库连接的配置
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 9:32 下午 2021/3/1
|
||||
type DBConfig struct {
|
||||
@ -30,7 +30,7 @@ type DBConfig struct {
|
||||
|
||||
// LogConfig 日志配置
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 10:51 下午 2021/3/1
|
||||
type LogConfig struct {
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Description : 异常定义
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2021-03-01 9:42 下午
|
||||
package mysql
|
||||
@ -11,7 +11,7 @@ import "github.com/pkg/errors"
|
||||
|
||||
// ConnectionOpenError 数据库连接失败
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 9:43 下午 2021/3/1
|
||||
func ConnectionOpenError(err error) error {
|
||||
@ -20,7 +20,7 @@ func ConnectionOpenError(err error) error {
|
||||
|
||||
// CreateDBLogError 打开日志失败
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 10:53 下午 2021/3/1
|
||||
func CreateDBLogError(err error) error {
|
||||
|
Reference in New Issue
Block a user