db

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2014 License: GPL-3.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MySQL *sql.DB

数据库操作句柄.

Functions

func CloseDB

func CloseDB()

关闭数据库连接.

func InitConfig

func InitConfig() error

InitConfig init configuration file.

func InitDB

func InitDB()

初始化数据库连接.

Types

type Config

type Config struct {
	AppDBURL          string `goconf:"base:app.dbURL"`
	AppDBMaxIdleConns int    `goconf:"base:app.dbMaxIdleConns"`
	AppDBMaxOpenConns int    `goconf:"base:app.dbMaxOpenConns"`
}
var (
	Conf *Config
)

Jump to

Keyboard shortcuts

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