Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDatasourceNotLoaded = errors.New("could not load configuration: no database source specified")
ErrDatasourceNotLoaded is returned when the datasource variable in the configuration file is not loaded properly
Functions ¶
func RegisterCommand ¶
func RegisterCommand(name string, factory CommandFactory) error
RegisterCommand adds a new command factory that will be used to build cli commands and returns error if factory is nil or command has always been registered
Types ¶
type Config ¶
type Config struct { Database datastore.BackendConfig API *api.Config }
Config is the global configuration for an instance of Port Authority
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig is a configuration that can be used as a fallback value
func LoadConfig ¶
LoadConfig is a shortcut to open a file, read it, and generate a Config. It supports relative and absolute paths. Given "", it returns DefaultConfig.
Click to show internal directories.
Click to hide internal directories.