Documentation
¶
Index ¶
- func RestartBluetoothUnit(fn func(err error)) (int, error)
- func StartBluetoothUnit(fn func(err error)) (int, error)
- func StopBluetoothUnit(fn func(err error)) (int, error)
- type HCIConfig
- type HCIConfigResult
- 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 HCIConfig ¶
type HCIConfig struct {
// contains filtered or unexported fields
}
HCIConfig an hciconfig command wrapper
func NewHCIConfig ¶
func (*HCIConfig) Down ¶
func (h *HCIConfig) Down() (HCIConfigResult, error)
Down Turn down an HCI device
func (*HCIConfig) Status ¶
func (h *HCIConfig) Status() (HCIConfigResult, error)
Status return status information for a hci device
type HCIConfigResult ¶
HCIConfigResult contains details for an adapter
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