Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrConfigNotFound = "wilson: Error: The configuration could not be downloaded or read locally from disk." ErrConfigNotValid = "wilson: Error: The configuration failed." ErrConfigDecodeFailed = "wilson: Error: The configuration could not be decoded from JSON." ErrorStartup = "wilson: Error: Wilson is adrift: " HelpURLFlag = "The URL to a JSON configuration" NoticeStarted = "wilson: Notice: Wilson is listening to you" NoticeConfigUpdated = "wilson: Notice: The configuration was refreshed as requested" WarnConfigWriteFailed = "wilson: Warning: Failed to write the configuration to disk." WarnPolicyBadMAC = "wilson: Warning: Failed to extract a valid OUI from address " WarnPolicyDiscardRequest = "wilson: Warning: Discarding request for invalid OUI " )
View Source
const Schema string = `` /* 1765-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { ConfigFile string `json:"configFile"` ConfigRefresh float64 `json:"configRefresh"` ConfigUrl string `json:"configUrl"` ServerBinding string `json:"serverBinding"` ServerSecret string `json:"serverSecret"` Policies []Pol `json:"policies"` }
func Config ¶
func Config(url string) Configuration
A public function to perform most of the lifting
func RefreshConfig ¶
func RefreshConfig(seconds float64, url string) Configuration
Refresh the configuration on a given interval using a go routine
Click to show internal directories.
Click to hide internal directories.