vpnmanager

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Name   string `json:"name"`
	Active bool   `json:"active"`
}

func ParseVPNConnectionList

func ParseVPNConnectionList(nmcliConShowOutput string) []Connection

type NetworkManager

type NetworkManager interface {
	ListConnections() ([]Connection, error)
	SetConnection(conn Connection) error
}

type NmcliClient

type NmcliClient struct{}

func (*NmcliClient) ListConnections

func (*NmcliClient) ListConnections() ([]Connection, error)

func (*NmcliClient) SetConnection

func (*NmcliClient) SetConnection(conn Connection) error

type VpnConnectionManager

type VpnConnectionManager struct {
	NetworkManager NetworkManager
	*mux.Router
}

func NewAPI

func NewAPI(netManager NetworkManager) *VpnConnectionManager

Jump to

Keyboard shortcuts

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