Version: v0.6.0 Latest Latest

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

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 5 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


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.

func NewLogger

func NewLogger(opts ...config.Option) (*Logger, error)

NewLogger returns the configuration of a logger.

func (*Logger) File

func (l *Logger) File() string

File returns the configured log file.

func (*Logger) Format

func (l *Logger) Format() string

Format returns the configured log format.

func (*Logger) Level

func (l *Logger) Level() string

Level returns the configured log level.

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

Postgres holds the configuration settings needed to connect to a postgres database.

func NewPostgres

func NewPostgres() (*Postgres, error)

NewPostgres returns the postgres configuration.

func (*Postgres) DSN

func (p *Postgres) DSN() string

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 {
	// 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.

func NewServer

func NewServer(opts ...config.Option) (*Server, error)

NewServer returns the server configuration.

func (*Server) Addr

func (s *Server) Addr() string

Addr returns the network address the server will listen on.

func (*Server) CACert

func (s *Server) CACert() string

CACert returns the filename of the certificate of the client CA. This is used when a mutual TLS connection is desired.

func (*Server) Cert

func (s *Server) Cert() string

Cert returns the filename of the certificate.

func (*Server) Key

func (s *Server) Key() string

Key returns the filename of the certificate key.

Jump to

Keyboard shortcuts

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