config

package
v0.0.0-...-72a5972 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	Host     string `yaml:"host"`
	Database string `yaml:"name" binding:"required"`
	User     string `yaml:"user" binding:"required"`
	Password string `yaml:"password"`
	SSLMode  string `yaml:"ssl_mode"`
}

DB is a configuration structure for database configuration options. It is generally loaded from db.yml.

func NewDB

func NewDB() (*DB, error)

NewDB loads db.yml and parses the settings based on the environment specified.

func (DB) PostgresDSN

func (db DB) PostgresDSN() string

PostgresDSN generates a Postgres connection string from a valid DB.

Jump to

Keyboard shortcuts

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