database

package
v0.0.0-...-2cc2fc2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(config map[string]string) (*gorm.DB, error)

Types

type Driver

type Driver interface {
	Connect()
}

Driver GORM Connector Engine

type Mysql

type Mysql struct {
	Driver,
	Engine string
	Username string
	Password string
	Address  string
	Port     string
	Database string
	Prefix   string
}

Mysql 连接配置

func (*Mysql) Connect

func (zs *Mysql) Connect() (*gorm.DB, error)

Connect 连接Mysql数据库

Jump to

Keyboard shortcuts

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