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: 2 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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