Documentation
¶
Index ¶
- Variables
- func CheckHotspotSupported(ctx context.Context) (supported bool, err error)
- func CheckIfIsConnected(ctx context.Context) error
- func ConnectWifi(ctx context.Context, creds Credentials) error
- func DisconnectWifi(ctx context.Context) error
- func RunCommand(ctx context.Context, commands string) (stdout, stderr string, err error)
- func StartHotspot(ctx context.Context, forceReload bool) error
- func StopHotspot(ctx context.Context) error
- type Credentials
- type Wifi
Constants ¶
This section is empty.
Variables ¶
View Source
var TimeLimit = 10 * time.Second
Functions ¶
func CheckHotspotSupported ¶
func CheckIfIsConnected ¶
func ConnectWifi ¶
func ConnectWifi(ctx context.Context, creds Credentials) error
func DisconnectWifi ¶
func RunCommand ¶
exported
func StartHotspot ¶
startHotspot can be used to get the list of available wifis and their strength If forceReload is set to true it resets the network adapter to make sure it fetches the latest list, otherwise it reads from cache wifiInterface is the name of interface that it should look for in Linux. Default is wlan0
func StopHotspot ¶
Types ¶
type Credentials ¶
type Wifi ¶
Wifi is the data structure containing the basic elements
func Scan ¶
Scan can be used to get the list of available wifis and their strength If forceReload is set to true it resets the network adapter to make sure it fetches the latest list, otherwise it reads from cache wifiInterface is the name of interface that it should look for in Linux. Default is wlan0
Click to show internal directories.
Click to hide internal directories.