Documentation ¶
Overview ¶
Package config provides handling of configuration through a config file
Index ¶
- Constants
- func BaseURL() string
- func Debug() bool
- func File() string
- func Password() string
- func Read(create bool) error
- func SessionID() string
- func SetBaseURL(url string)
- func SetPassword(password string)
- func SetSessionID(ID string)
- func SetUsername(username string)
- func Username() string
- func UsingConfigFile() bool
- func Write() error
Constants ¶
View Source
const ( DefaultConfigFileBaseName = ".kizcool" DefaultConfigFileExtension = ".yaml" TahomaBaseURL = "https://tahomalink.com/enduser-mobile-web" )
Defaults for config file
Variables ¶
This section is empty.
Functions ¶
func Read ¶
Read reads in config file. It should be called before using other functions in this package. The local directory is searched first, then the user's home directory If no file is found and create is true, a config file with defaults is created.
func SetSessionID ¶
func SetSessionID(ID string)
SetSessionID stores the session ID in the configuration file
func UsingConfigFile ¶
func UsingConfigFile() bool
UsingConfigFile is true if a config file is used, false otherwise (e.g. only env variables)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.