config

package
v0.0.0-...-20a2c84 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2013 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbConn

type DbConn struct {
	// contains filtered or unexported fields
}

A DbConn provides data to create a *sql.DB connection for PostgreSQL databases.

var (
	// DbConnSwitch provides a connection string to the 'switch db',
	// which indicates which database should be scraped and used
	// for web requests.
	// The web app should use whichever db that the scraper is not
	// using at any given time.
	DbConnSwitch DbConn = DbConn{
		"postgres",
		"gosh",
		"switch_db",
		"gosh",
		"require",
	}

	// DbConn1 provides a connection string to one of two
	// application databases, which store all schedule information.
	// If DbConn1 is being used by the scraper, DbConn2 should be
	// used to serve web requests, and vice versa.
	DbConn1 DbConn = DbConn{
		"postgres",
		"gosh",
		"gosh1",
		"gosh",
		"require",
	}

	// The other application database. See documentation for DBConn1.
	DbConn2 DbConn = DbConn{
		"postgres",
		"gosh",
		"gosh2",
		"gosh",
		"require",
	}

	// TestDbConn is by Go tests.
	TestDbConn DbConn = DbConn{
		"postgres",
		"gosh_test",
		"gosh",
		"gosh",
		"require",
	}
)

func (DbConn) Conn

func (db DbConn) Conn() string

Conn returns a connection string using the appropriate attributes of the DBConn.

func (DbConn) Driver

func (db DbConn) Driver() string

Driver returns the driver attribute of DbConn.

Jump to

Keyboard shortcuts

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