database

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB *gorm.DB
)

Functions

func Close

func Close()

func ConnectDatabase

func ConnectDatabase(config DataConfig, autoMigrateTable ...interface{})

Types

type DataConfig

type DataConfig struct {
	Driver string `mapstructure:"driver" json:"driver" yaml:"driver"`
	//Host                string `mapstructure:"host" json:"host" yaml:"host,omitempty,-"`
	//Port                int    `mapstructure:"port" json:"port" yaml:"port"`
	Database string `mapstructure:"database" json:"database" yaml:"database"`
}

Jump to

Keyboard shortcuts

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