database

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

*

@author: taco
@Date: 2023/8/15
@Time: 10:37

*

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(db *sql.DB)

func NewDbClient

func NewDbClient(c *DbConfig) (*gorm.DB, error)

func NewGormZapLogger

func NewGormZapLogger() gormLogger.Interface

Types

type DbConfig

type DbConfig struct {
	Host        string
	Port        uint
	DbName      string
	User        string
	Password    string
	Charset     string
	MaxIdle     int
	MaxOpen     int
	LogMode     bool
	Loc         string
	MaxLifetime int64
	TablePrefix string
	Debug       bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL