Documentation
¶
Index ¶
- func CmdExec(args ...string) (string, error)
- func Down(adapterID int) error
- func List() ([]int, error)
- func RestartBluetoothUnit(fn func(err error)) (int, error)
- func StartBluetoothUnit(fn func(err error)) (int, error)
- func StopBluetoothUnit(fn func(err error)) (int, error)
- func Up(adapterID int) error
- type RFKill
- func (rfkill RFKill) IsBlocked(identifier string) bool
- func (rfkill RFKill) IsBlockedAfterUnblocking(identifier string) bool
- func (rfkill RFKill) IsHardBlocked(identifier string) bool
- func (rfkill RFKill) IsInstalled() bool
- func (rfkill RFKill) IsSoftBlocked(identifier string) bool
- func (rfkill RFKill) ListAll() ([]RFKillResult, error)
- func (rfkill RFKill) SoftBlock(identifier string) error
- func (rfkill RFKill) SoftUnblock(identifier string) error
- type RFKillResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RestartBluetoothUnit ¶
RestartBluetoothUnit by its systemd unit
func StartBluetoothUnit ¶
StartBluetoothUnit by its systemd unit
func StopBluetoothUnit ¶
StopBluetoothUnit by its systemd unit
Types ¶
type RFKill ¶
type RFKill struct{}
RFKill is a wrapper for linux utility: rfkill Checks the status of kill switches. If either is set, the device will be disabled. Soft = Software (set by software) Hard = Hardware (physical on/off switch on the device) Identifiers = all, wifi, wlan, bluetooth, uwb, ultrawideband, wimax, wwan, gps, fm See: http://wireless.kernel.org/en/users/Documentation/rfkill
func (RFKill) IsBlockedAfterUnblocking ¶
IsBlockedAfterUnblocking Checks if an identifier has a software or hardware block after removing a software block if it exists
func (RFKill) IsHardBlocked ¶
IsHardBlocked Checks if an identifier has a hardware block
func (RFKill) IsInstalled ¶
IsInstalled Checks if the program rfkill exists using PATH environment variable
func (RFKill) IsSoftBlocked ¶
IsSoftBlocked Checks if an identifier has a software block
func (RFKill) ListAll ¶
func (rfkill RFKill) ListAll() ([]RFKillResult, error)
ListAll Returns a list of rfkill results for every identifier type
func (RFKill) SoftUnblock ¶
SoftUnblock Removes a software block on an identifier