db

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

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

Init 初始化全局db

Types

type DB

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

func Instance

func Instance() DB

Jump to

Keyboard shortcuts

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