db

package
v0.0.0-...-f9738e6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cfs map[string]*config.Database, watcher config.Watcher)

Init 初始化全局db

Types

type DB

type DB interface {
	// Get 获取指定名称的db实例,不指定名称则返回第一个如果实例不存在则返回nil
	Get(name ...string) *gorm.DB

	TxKey(name ...string) string
}

func Instance

func Instance() DB

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳