Documentation
¶
Index ¶
- func CheckHttpAuth(w http.ResponseWriter, r *http.Request) bool
- func CheckUserPass(user, pass string) bool
- func Discover(config Config_t) (map[string]map[string]string, error)
- func DiscoverCli(config Config_t)
- func GenerateRootPage(w http.ResponseWriter, devices map[string]map[string]string, message string) error
- func HttpLog(r *http.Request, status int)
- func ReadDevices(config Config_t) (map[string]map[string]string, error)
- func ReadUsers() (map[string]string, error)
- func StartHttp(config Config_t)
- func UpdateDevices(config Config_t, deviceList, newDevices map[string]map[string]string) bool
- func WriteDevices(config Config_t, deviceList map[string]map[string]string) error
- type Config_t
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckHttpAuth ¶
func CheckHttpAuth(w http.ResponseWriter, r *http.Request) bool
func CheckUserPass ¶
func DiscoverCli ¶
func DiscoverCli(config Config_t)
func GenerateRootPage ¶
func UpdateDevices ¶
Types ¶
type Config_t ¶
type Config_t struct { HttpPort int `json:"http_port"` EthDevice string `json:"eth_device"` DevicesFile string `json:"devices_file"` DiscoveryTimeout int `json:"discovery_timeout"` HtmlTemplate string `json:"html_tmpl"` UsersFile string `json:"users_file"` UseTls bool `json:"use_tls"` TlsCertFile string `json:"tls_cert_file"` TlsKeyFile string `json:"tls_key_file"` }
func ReadConfig ¶
Click to show internal directories.
Click to hide internal directories.