Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶ added in v0.8.0
type Logger struct {
// contains filtered or unexported fields
}
Logger holds the configuration information for a logger.
type Option ¶ added in v0.1.1
type Option interface {
Apply(*Options)
}
Option provides options when loading configuration information.
func WithPrefix ¶ added in v0.1.1
WithPrefix adds a prefix to the name of the enviroment variables being referenced.
type Options ¶ added in v0.1.1
type Options struct { // Prefix, if set, will require the prefix to be present in the name of the // environment variables associated with the config object. Prefix string }
Options hold the config package options.
type SQL ¶ added in v0.9.0
type SQL struct {
// contains filtered or unexported fields
}
SQL holds the configuration settings needed to connect to an sql database.
type Server ¶ added in v0.8.0
type Server struct {
// contains filtered or unexported fields
}
Server holds the configuration settings for a server.
func (Server) Addr ¶ added in v0.8.0
Addr returns the network address the server will listen on. The value is set from the <PREFIX_>SERVER_ADDR environment variable.
func (Server) CACert ¶ added in v0.8.0
CACert returns the path of the certificate of the CA certificate file. This is used when creating a TLS connection with an entity that is presenting a certificate that is not signed by a well known CA available in the OS CA bundle. The value is set from the <PREFIX_>SERVER_CACERT environment variable.
type TLS ¶ added in v0.7.0
type TLS interface { // Cert returns the file name of the PEM encoded public key. Cert() string // Key returns the file name of the PEM encoded private key. Key() string // CACert returns the file name of the PEM encoded public key of the client CA. CACert() string }
TLS contains the information necessary to create a tls.Config.