Version: v0.0.0-...-efdff95 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2018 License: MIT Imports: 11 Imported by: 0




This section is empty.


This section is empty.


func RestartBluetoothUnit

func RestartBluetoothUnit(fn func(err error)) (int, error)

RestartBluetoothUnit by its systemd unit

func StartBluetoothUnit

func StartBluetoothUnit(fn func(err error)) (int, error)

StartBluetoothUnit by its systemd unit

func StopBluetoothUnit

func StopBluetoothUnit(fn func(err error)) (int, error)

StopBluetoothUnit by its systemd unit


type HCIConfig

type HCIConfig struct {
	// contains filtered or unexported fields

HCIConfig an hciconfig command wrapper

func NewHCIConfig

func NewHCIConfig(adapterID string) *HCIConfig

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

func (*HCIConfig) Up

func (h *HCIConfig) Up() (HCIConfigResult, error)

Up Turn on an HCI device

type HCIConfigResult

type HCIConfigResult struct {
	Enabled bool
	Address string
	Type    string
	Bus     string

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:

func NewRFKill

func NewRFKill() RFKill

NewRFKill Creates a new RFKill instance

func (RFKill) IsBlocked

func (rfkill RFKill) IsBlocked(identifier string) bool

IsBlocked Checks if an identifier has a software or hardware block

func (RFKill) IsBlockedAfterUnblocking

func (rfkill RFKill) IsBlockedAfterUnblocking(identifier string) bool

IsBlockedAfterUnblocking Checks if an identifier has a software or hardware block after removing a software block if it exists

func (RFKill) IsHardBlocked

func (rfkill RFKill) IsHardBlocked(identifier string) bool

IsHardBlocked Checks if an identifier has a hardware block

func (RFKill) IsInstalled

func (rfkill RFKill) IsInstalled() bool

IsInstalled Checks if the program rfkill exists using PATH environment variable

func (RFKill) IsSoftBlocked

func (rfkill RFKill) IsSoftBlocked(identifier string) bool

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) SoftBlock

func (rfkill RFKill) SoftBlock(identifier string) error

SoftBlock RFKill Sets a software block on an identifier

func (RFKill) SoftUnblock

func (rfkill RFKill) SoftUnblock(identifier string) error

SoftUnblock Removes a software block on an identifier

type RFKillResult

type RFKillResult struct {
	Index          int
	IdentifierType string
	Description    string
	SoftBlocked    bool
	HardBlocked    bool

RFKillResult Result of rfkill request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL