jodb

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MulanPSL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDb

func GetDb() *gorm.DB

func OpenDbConn

func OpenDbConn(cfg *DbCfg) (*gorm.DB, error)

func RegDbConn

func RegDbConn(db *gorm.DB)

Types

type DbCfg

type DbCfg struct {
	Addr   string `yaml:"addr" json:"addr"`
	Port   int    `yaml:"port" json:"port"`
	User   string `yaml:"user" json:"user"`
	Pass   string `yaml:"pass" json:"pass"`
	Schema string `yaml:"schema" json:"schema"`
}

func NewMySqlDbCfg

func NewMySqlDbCfg() *DbCfg

type Driver

type Driver int
const (
	DriverNone Driver = iota
	DriverMySql
	DriverUnsupported
)

func GetDbDriver

func GetDbDriver(s string) Driver

func (Driver) String

func (d Driver) String() string

Jump to

Keyboard shortcuts

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