conf

package
v0.0.0-...-23e694f Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2016 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cfg *ini.File
View Source
var DB *sqlx.DB

Functions

This section is empty.

Types

type Database

type Database interface {
	DSN() string
	DB() (*sqlx.DB, error)
}

type MySQL

type MySQL struct {
	DBType string
	User   string
	Pw     string
	DBName string
	Host   string
	Port   string
}

func LoadMySQLConfig

func LoadMySQLConfig() *MySQL

func (*MySQL) DB

func (db *MySQL) DB() (*sqlx.DB, error)

func (*MySQL) DSN

func (db *MySQL) DSN() string

type PostgreSQL

type PostgreSQL struct {
	DBType string
	User   string
	Pw     string
	DBName string
	Host   string
	Port   string
}

func LoadPostgreSQLConfig

func LoadPostgreSQLConfig() *PostgreSQL

func (*PostgreSQL) DB

func (db *PostgreSQL) DB() (*sqlx.DB, error)

func (*PostgreSQL) DSN

func (db *PostgreSQL) DSN() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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