Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSourceNamer ¶
type DataSourceNamer interface {
DSN() string
}
DataSourceNamer is the interface that wraps the DSN method.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger holds the configuration settings for a logger.
type Postgres ¶
type Postgres struct { DB string // POSTGRES_DB User string // POSTGRES_USER Password string // POSTGRES_PASSWORD Host string // POSTGRES_HOST Port string // POSTGRES_PORT ConnectTimeout string `split_words:"true"` // POSTGRES_CONNECT_TIMEOUT SSLMode string // POSTGRES_SSLMODE SSLCert string // POSTGRES_SSLCERT SSLKey string // POSTGRES_SSLKEY SSLRootCert string // POSTGRES_SSLROOTCERT }
Postgres holds the configuration settings needed to connect to a postgres database.
func NewPostgres ¶
NewPostgres returns the postgres configuration.
func (*Postgres) DSN ¶
DSN returns a connection string corresponding to the postgres configuration.
See https://godoc.org/github.com/lib/pq for connection string parameters.
type SQLDatabase ¶
type SQLDatabase struct { DataSourceNamer // contains filtered or unexported fields }
SQLDatabase holds the configuration information for an SQL database.
func NewSQLDatabase ¶
func NewSQLDatabase(opts ...config.Option) (*SQLDatabase, error)
NewSQLDatabase returns the configuration of an SQL database.
func (*SQLDatabase) DriverName ¶
func (db *SQLDatabase) DriverName() string
DriverName returns the name of the sql database driver.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds the configuration settings for a server.