orm

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Conn

func Conn() *gorm.DB

func ConnMulti

func ConnMulti(key string) *gorm.DB

func ErrHandler

func ErrHandler(err error) *response.Response

func InitOrm

func InitOrm(rc *RootConfig)

InitOrm 初始化数据源

Types

type RootConfig

type RootConfig struct {
	Orm   ormConfig             `yaml:"orm"`
	Multi map[string]*ormConfig `yaml:"orm-multi"`
}

func NewConfig

func NewConfig() *RootConfig

Jump to

Keyboard shortcuts

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