runtime

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDb

func NewDb(dbCfg *Database) (*gorm.DB, error)

Types

type Database added in v0.4.0

type Database struct {
	Dialect string `yaml:"dialect" json:"dialect" binding:"oneof=mysql sqlite3"` // mysql, sqlite3
	DSN     string `yaml:"dsn" json:"dsn"`
	Options string `yaml:"options" json:"options"` // Options ?号后面, 如果为空, 则为 charset=utf8mb4&parseTime=True&loc=Local&interpolateParams=True
	// contains filtered or unexported fields
}

Database connect information

func (*Database) DbName added in v0.4.0

func (c *Database) DbName() string

func (*Database) Parse added in v0.4.0

func (c *Database) Parse() error

Jump to

Keyboard shortcuts

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