nm_device_manager

package
v0.0.0-...-ee8a461 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDeviceId

func GetDeviceId(device nm.Device) string

Types

type DeviceDetailedInfo

type DeviceDetailedInfo struct {
	ID              string `json:"id"`
	Interface       string `json:"interface"`
	Type            string `json:"type"`
	Driver          string `json:"driver"`
	DriverVersion   string `json:"driver_version"`
	FwVersion       string `json:"fw_version"`
	State           string `json:"state"`
	Managed         bool   `json:"managed"`
	AutoConnect     bool   `json:"auto_connect"`
	FirmwareMissing bool   `json:"firmware_missing"`
	NmPluginMissing bool   `json:"nm_plugin_missing"`
	Real            bool   `json:"real"`
	Mtu             uint32 `json:"mtu"`
	PhysicalPortId  string `json:"physical_port_id"`
}

func NewDeviceDetailedInfo

func NewDeviceDetailedInfo(device nm.Device) (*DeviceDetailedInfo, error)

type DeviceShortInfo

type DeviceShortInfo struct {
	ID        string `json:"id"`
	Interface string `json:"interface"`
	Type      string `json:"type"`
	Driver    string `json:"driver"`
	State     string `json:"state"`
}

func NewDeviceShortInfo

func NewDeviceShortInfo(device nm.Device) (*DeviceShortInfo, error)

type NmDeviceManager

type NmDeviceManager struct {
	// contains filtered or unexported fields
}

func NewNmDeviceManager

func NewNmDeviceManager() (NmDeviceManager, error)

func (NmDeviceManager) GetAllDevices

func (n NmDeviceManager) GetAllDevices() ([]nm.Device, error)

func (NmDeviceManager) GetDeviceById

func (n NmDeviceManager) GetDeviceById(id string) (nm.Device, error)

func (NmDeviceManager) GetFilteredDevices

func (n NmDeviceManager) GetFilteredDevices(deviceTypeFilter []nm.NmDeviceType) ([]nm.Device, error)

Jump to

Keyboard shortcuts

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