Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigFilename ¶
Default location of the config file on the user's system.
func DefaultLogFilename ¶
Default location of a log file on the user's system.
func ReadConfig ¶
ReadConfig reads the given config file into the Config data structure.
func WriteDefaultConfig ¶
Writes a default config if one does not exist already. It will also create any necessary nested parent directories.
Types ¶
type AliasEntry ¶
type AliasEntry struct { Username string `mapstructure:"username"` Hostname string `mapstructure:"hostname"` RedisURI string `mapstructure:"redisuri"` }
Represents a unique alias identifying a user remotely accessible through drsh.
type Config ¶
type Config struct { Server struct { LogFile string `mapstructure:"logfile"` Hostname string `mapstructure:"hostname"` RedisURI string `mapstructure:"redisuri"` } `mapstructure:"server"` Client struct { LogFile string `mapstructure:"logfile"` Aliases map[string]AliasEntry `mapstructure:"aliases"` } `mapstructure:"client"` }
Mapped directly by viper on to a config file.
Click to show internal directories.
Click to hide internal directories.