Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConnectionError = errors.New("fail To connect to VPN")
Functions ¶
func NewVpnModel ¶
func NewVpnModel(s *spinner.Model, c Connection) tea.Model
NewVpnModel creates a model with a connection that defines how to connection to a network
Types ¶
type Connection ¶
type Connection interface { //EnsureConnected checks if you are logged to the connection. // //If the connection can not be established, should return an error. // //The connection process must be executed synchronously, if this function returns no error, that's mean that the //connection is established. EnsureConnected() error //Name of the connection for log purpose Name() string }
Connection is an interface that represent an object that can connect to a Network
type ConnectionEstablished ¶
type ConnectionEstablished struct{}
type ConnectionStatus ¶
type ConnectionStatus = int
const ( Connected ConnectionStatus = iota ConnectionFailed ConnectionStatus = iota Connecting ConnectionStatus = iota )
type NetworkManagerConnexion ¶
type NetworkManagerConnexion struct {
ConnectionName string
}
func (NetworkManagerConnexion) ConnectToVPN ¶
func (c NetworkManagerConnexion) ConnectToVPN() error
func (NetworkManagerConnexion) EnsureConnected ¶
func (c NetworkManagerConnexion) EnsureConnected() error
func (NetworkManagerConnexion) IsConnectedToVPN ¶
func (c NetworkManagerConnexion) IsConnectedToVPN() bool
func (NetworkManagerConnexion) Name ¶
func (c NetworkManagerConnexion) Name() string
Click to show internal directories.
Click to hide internal directories.