Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScanNetworks ¶
func ScanNetworks() (map[string]WpaNetwork, error)
ScanNetworks returns a map of WpaNetwork data structures.
Types ¶
type NabtoClient ¶
NabtoClient has Nabto config
func (*NabtoClient) ApplyConfig ¶
func (nc *NabtoClient) ApplyConfig()
ApplyConfig configures systemd to load the variables needed to run the unabto tunnel
func (*NabtoClient) DeleteACL ¶
func (nc *NabtoClient) DeleteACL()
DeleteACL removes the ACL files, so the client need to reconfigure
type PushbulletClient ¶
type PushbulletClient struct { AccessToken string `json:"access_token"` Enabled bool `json:"enabled"` }
PushbulletClient has the struct for the pushbullet config
func (*PushbulletClient) DeleteConfig ¶
func (pb *PushbulletClient) DeleteConfig()
DeleteConfig the PushBullet Config
func (*PushbulletClient) LoadConfig ¶
func (pb *PushbulletClient) LoadConfig()
LoadConfig pulls config from viper
func (*PushbulletClient) SaveConfig ¶
func (pb *PushbulletClient) SaveConfig()
SaveConfig saves the config
func (*PushbulletClient) SendMessage ¶
func (pb *PushbulletClient) SendMessage(message string)
SendMessage sends a message via PushBullet
type PushoverClient ¶
type PushoverClient struct { UserKey string `json:"user_key"` AppKey string `json:"app_key"` Enabled bool `json:"enabled"` }
PushoverClient has the struct for the pushbullet config
func (*PushoverClient) DeleteConfig ¶
func (po *PushoverClient) DeleteConfig()
DeleteConfig the PushBullet Config
func (*PushoverClient) LoadConfig ¶
func (po *PushoverClient) LoadConfig()
LoadConfig pulls config from viper
func (*PushoverClient) SaveConfig ¶
func (po *PushoverClient) SaveConfig()
SaveConfig saves the config
func (*PushoverClient) SendMessage ¶
func (po *PushoverClient) SendMessage(message string)
SendMessage sends a message via PushBullet
func (*PushoverClient) SendMessageWithImage ¶
func (po *PushoverClient) SendMessageWithImage(message, imagePath string)
SendMessageWithImage sends a message via PushBullet with a image attached
type Wifi ¶
type Wifi struct { SSID string `json:"ssid"` Password string `json:",omitempty" yaml:",omitempty"` EncryptedPassword string `json:"encrypted_password"` Priority int `json:"priority"` UseForSync bool `json:"use_for_sync"` }
Wifi properties struct
func (*Wifi) EncryptPassword ¶
func (w *Wifi) EncryptPassword()
EncryptPassword encrypts the password in the Wifi struct and removes the unencrypted password
type Wifis ¶
type Wifis struct {
List []Wifi `json:"wifis"`
}
Wifis is a slice of Wifi
func (*Wifis) AddWifiToList ¶
AddWifiToList appends the given Wifi to the list
func (*Wifis) DeleteWifiFromList ¶
DeleteWifiFromList will remove a wifi (given the SSID string) from the list if it's there
func (Wifis) GetWpaSupplicantConf ¶
GetWpaSupplicantConf generates a wpa_supplicant.conf file
func (*Wifis) ParseViperWifi ¶
func (ws *Wifis) ParseViperWifi()
ParseViperWifi parses the wifis from viper
func (Wifis) WriteConfig ¶
WriteConfig writes the config to disk