Documentation
¶
Overview ¶
manage and create configs for Altid services
Index ¶
Constants ¶
View Source
const ( ErrNoConfigure = "unable to find or create config for this service" ErrNoSuchKey = "no such key" ErrNoEntries = "unable to find config entries for this service" ErrMultiEntries = "config contains duplicate entries for this service" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶ added in v0.1.0
Config defines a services' configuration in a given config file
func New ¶ added in v0.1.0
func New(c Configurator, service string) (*Config, error)
New returns a valid config for a given service. If one is not found, the Configurators Configure method will be called to interactively create one
func (*Config) MustSearch ¶ added in v0.1.0
MustSearch returns a value or an empty string, if not found
func (*Config) Password ¶ added in v0.1.0
Password queries the database for a password, and uses the factotum
func (*Config) SSLCert ¶ added in v0.1.0
func (c *Config) SSLCert() (tls.Certificate, error)
SSLCert returns a tls.Certificate based on successfully finding a cert and key file listen in the configuration
type Configurator ¶ added in v0.1.0
Configurator is called when no entry is found for a given service It should query the user for each required value, returning a complete and usable Config
Click to show internal directories.
Click to hide internal directories.