netman

package
v0.0.0-...-61e9e54 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2017 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client type to support unit test mock and runtime execution

func DefaultClient

func DefaultClient() *Client

DefaultClient is the runtime client object

func NewClient

func NewClient(myobj dbus.BusObject) *Client

NewClient is the mocked client object

func (*Client) ConnectAp

func (c *Client) ConnectAp(ssid string, p string, ap2device map[string]string, ssid2ap map[string]string) error

ConnectAp attempts to Connect to an external AP

func (*Client) Connected

func (c *Client) Connected(devices []string) bool

Connected checks if any passed ethernet/wifi devices are connected

func (*Client) ConnectedWifi

func (c *Client) ConnectedWifi(wifiDevices []string) bool

ConnectedWifi checks if any passed wifi devices are connected

func (*Client) DisconnectWifi

func (c *Client) DisconnectWifi(wifiDevices []string) int

DisconnectWifi disconnects every interface passed. return shows number of disconnect calls made

func (*Client) GetAccessPoints

func (c *Client) GetAccessPoints(devices []string, ap2device map[string]string) []string

GetAccessPoints returns NetMan known external APs

func (*Client) GetDevices

func (c *Client) GetDevices() []string

GetDevices returns NetMan (NetworkManager) devices

func (*Client) GetWifiDevices

func (c *Client) GetWifiDevices(devices []string) []string

GetWifiDevices returns wifi NetMan devices

func (*Client) SetIfaceManaged

func (c *Client) SetIfaceManaged(iface string, state bool, devices []string) string

SetIfaceManaged sets passed device to be managed/unmanaged by network manager, return iface set, if any

func (*Client) Ssids

func (c *Client) Ssids() ([]SSID, map[string]string, map[string]string)

Ssids returns known SSIDs

func (*Client) WifisManaged

func (c *Client) WifisManaged(wifiDevices []string) (map[string]string, error)

WifisManaged returns map[iface]device of wifi iterfaces that are managed by network manager

type DbusClient

type DbusClient struct {
	BusObj     dbus.BusObject
	Connection *dbus.Conn
	// contains filtered or unexported fields
}

DbusClient properties for testing & runtime

func (*DbusClient) Object

func (d *DbusClient) Object(dest string, path dbus.ObjectPath) dbus.BusObject

Object is the mock implementation of the godbus Object function

type Objecter

type Objecter interface {
	Object(dest string, path dbus.ObjectPath) dbus.BusObject
}

Objecter allows mocking the godbus Object function

type SSID

type SSID struct {
	Ssid   string
	ApPath string
}

SSID holds SSID properties

Jump to

Keyboard shortcuts

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