database

package
v0.0.0-...-0ab0872 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoMigrate

func AutoMigrate(db *gorm.DB) error

自动生成表

func Dsn

func Dsn(cfg dto.Mysql) string

func NewRedis

func NewRedis(host, password string, db int) (*redis.Client, error)

Types

type Gorm

type Gorm struct {
	*gorm.DB
	// contains filtered or unexported fields
}

func NewGorm

func NewGorm(cfg dto.Mysql, logs ...*zap.Logger) (*Gorm, error)

func (*Gorm) Printf

func (g *Gorm) Printf(msg string, args ...interface{})

Jump to

Keyboard shortcuts

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