Documentation
¶
Index ¶
- type AutoConnectSettings
- type ConfigItem
- type ConfigPrioList
- type ConnectionNotAvailable
- type ConnectionSettings
- type DNSResult
- type GsmNetworkConfig
- type NetworkConfig
- func (nc *NetworkConfig) WithAutoconnect(acSetting *AutoConnectSettings) *NetworkConfig
- func (nc *NetworkConfig) WithCustomDNS(customDNS []string) *NetworkConfig
- func (nc *NetworkConfig) WithDeviceName(name string) *NetworkConfig
- func (nc *NetworkConfig) WithDeviceType(t NetworkInterfaceType) *NetworkConfig
- func (nc *NetworkConfig) WithName(name string) *NetworkConfig
- func (nc *NetworkConfig) WithUUID(uuidstr string) *NetworkConfig
- func (nc *NetworkConfig) WithV4Automatic() *NetworkConfig
- func (nc *NetworkConfig) WithV4Static(net *V4Config) *NetworkConfig
- func (nc *NetworkConfig) WithV6AddrModeEUI64() *NetworkConfig
- func (nc *NetworkConfig) WithV6Automatic() *NetworkConfig
- func (nc *NetworkConfig) WithV6Static(net *V6Config) *NetworkConfig
- type NetworkDevice
- type NetworkInterfaceType
- type NetworkService
- type Static
- type V4Config
- type V6Config
- type WirelessNetworkConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoConnectSettings ¶
type ConfigItem ¶
type ConfigItem struct {
Conn gonm.Connection
Device gonm.Device
Prio int
}
ConfigItem A simple priority based list
type ConfigPrioList ¶
type ConfigPrioList []ConfigItem
type ConnectionNotAvailable ¶
type ConnectionNotAvailable struct {
// contains filtered or unexported fields
}
func (*ConnectionNotAvailable) Error ¶
func (e *ConnectionNotAvailable) Error() string
type ConnectionSettings ¶
type ConnectionSettings struct {
// contains filtered or unexported fields
}
type GsmNetworkConfig ¶
type GsmNetworkConfig struct {
NetworkConfig
// contains filtered or unexported fields
}
func NewGSMNetworkConfig ¶
func NewGSMNetworkConfig(APN string, Username string, Password string) GsmNetworkConfig
type NetworkConfig ¶
type NetworkConfig struct {
// contains filtered or unexported fields
}
func NewNetworkConfig ¶
func NewNetworkConfig() NetworkConfig
func NewWiredNetworkConfig ¶
func NewWiredNetworkConfig() NetworkConfig
func (*NetworkConfig) WithAutoconnect ¶
func (nc *NetworkConfig) WithAutoconnect(acSetting *AutoConnectSettings) *NetworkConfig
func (*NetworkConfig) WithCustomDNS ¶
func (nc *NetworkConfig) WithCustomDNS(customDNS []string) *NetworkConfig
func (*NetworkConfig) WithDeviceName ¶
func (nc *NetworkConfig) WithDeviceName(name string) *NetworkConfig
func (*NetworkConfig) WithDeviceType ¶
func (nc *NetworkConfig) WithDeviceType(t NetworkInterfaceType) *NetworkConfig
WithDeviceType Sets the device type for the network configuration Please only use this if you know what you are doing
func (*NetworkConfig) WithName ¶
func (nc *NetworkConfig) WithName(name string) *NetworkConfig
func (*NetworkConfig) WithUUID ¶
func (nc *NetworkConfig) WithUUID(uuidstr string) *NetworkConfig
func (*NetworkConfig) WithV4Automatic ¶
func (nc *NetworkConfig) WithV4Automatic() *NetworkConfig
func (*NetworkConfig) WithV4Static ¶
func (nc *NetworkConfig) WithV4Static(net *V4Config) *NetworkConfig
func (*NetworkConfig) WithV6AddrModeEUI64 ¶
func (nc *NetworkConfig) WithV6AddrModeEUI64() *NetworkConfig
func (*NetworkConfig) WithV6Automatic ¶
func (nc *NetworkConfig) WithV6Automatic() *NetworkConfig
func (*NetworkConfig) WithV6Static ¶
func (nc *NetworkConfig) WithV6Static(net *V6Config) *NetworkConfig
type NetworkDevice ¶
type NetworkDevice struct {
Type NetworkInterfaceType
// contains filtered or unexported fields
}
type NetworkInterfaceType ¶
type NetworkInterfaceType string
This maps to the NetworkManager connection.type https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-configuring_ip_networking_with_nmcli#sec-Understanding_the_nmcli_Options
const ( Ethernet NetworkInterfaceType = "802-3-ethernet" WiFi NetworkInterfaceType = "802-11-wireless" GSM NetworkInterfaceType = "gsm" Invalid NetworkInterfaceType = "invalid" )
type NetworkService ¶
type NetworkService interface {
GetConnectionStateStr(NetworkInterfaceType) (string, error)
IsNetworkTypeActive(NetworkInterfaceType) (bool, error)
SetDeviceStateByType(NetworkInterfaceType, bool) error
HasConnectivity() bool
Shutdown()
EnforceNetworkPriority() error
// CreateConnection create a connection a connection
CreateConnection(config interface{}) error
// contains filtered or unexported methods
}
func NewService ¶
func NewService(sysdc *systemd.Connector) (NetworkService, error)
type WirelessNetworkConfig ¶
type WirelessNetworkConfig struct {
NetworkConfig
// contains filtered or unexported fields
}
func NewWirelessConfigFromNetworkConfig ¶
func NewWirelessConfigFromNetworkConfig(SSID string, PSK string, networkconf NetworkConfig) WirelessNetworkConfig
func NewWirelessNetworkConfig ¶
func NewWirelessNetworkConfig(SSID string, PSK string) WirelessNetworkConfig
Click to show internal directories.
Click to hide internal directories.