database

package
v0.0.0-...-cfb18d5 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c Config, config *gorm.Config, dialectorNews ...func(c Config) gorm.Dialector) (*gorm.DB, error)

Types

type Config

type Config struct {
	Dialect  string            `yaml:"dialect" json:"dialect"` // mysql sqlite3 postgres and custom
	Username string            `yaml:"username" json:"username"`
	Password string            `yaml:"password" json:"password"`
	Protocol string            `yaml:"protocol" json:"protocol"`
	Host     string            `yaml:"host" json:"host"`
	Port     string            `yaml:"port" json:"port"`
	DbName   string            `yaml:"dbName" json:"dbName"`
	Extend   map[string]string `yaml:"extend" json:"extend"`
	LogMode  bool              `yaml:"logMode" json:"logMode"`
}

Config 数据库配置

Jump to

Keyboard shortcuts

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