Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // GenConfig when toggled causes ziggs to write its default config to the cwd and then exit. GenConfig = false // NoColor stops zerolog from outputting color, necessary on Windows. NoColor = true )
View Source
var ( // HTTPBind is defined via our toml configuration file. It is the address that ziggs listens on. HTTPBind string // HTTPPort is defined via our toml configuration file. It is the port that ziggs listens on. HTTPPort int // APIKey represents our key for API authentication. APIKey string // SSHListen is the address that ziggs listens on for SSH connections. SSHListen string // SSHHostKey is the path to the SSH host key, if any. If none is specified, one will be generated. SSHHostKey string // SSHPublicKeys is a list of public keys that are allowed to connect to ziggs via SSH. SSHPublicKeys []string )
"http"
View Source
var ( Debug bool Trace bool // Filename identifies the location of our configuration file. Filename string // Snek represents our instance of Viper. Snek *viper.Viper )
View Source
var ( // CurrentLogFile is used for accessing the location of the currently used log file across packages. CurrentLogFile string LogDir string )
View Source
var KnownBridges []KnownBridge
KnownBridges contains all of the bridges we already knew about from our config file.
Functions ¶
func Init ¶
func Init()
Init will initialize our toml configuration engine and define our default values.
func StartLogger ¶
StartLogger instantiates an instance of our zerolog loggger so we can hook it in our main package. While this does return a logger, it should not be used for additional retrievals of the logger. Use GetLogger()
Types ¶
type KnownBridge ¶
type KnownBridge struct { Hostname string `mapstructure:"hostname"` Username string `mapstructure:"username"` Proxy string `mapstructure:"proxy"` }
KnownBridge represents the part of our configuration that defines hue bridges to connect to.
Click to show internal directories.
Click to hide internal directories.