vpn

package
v0.0.0-...-025b39b Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigTemplate

type ConfigTemplate struct {
	VpnServer string
	Vendor    string
}

Everything that belongs in the config template needs to be here

type VpnServer

type VpnServer struct {
	Type        string
	ConfigFile  string
	Konf        *koanf.Koanf
	WaitSeconds int
	// These values are only for Type == ssh
	Host     string
	Port     int
	Username string
	Password string
	// These values are modified at runtime
	Vendor string
	Exit   string
}

func NewVpn

func NewVpn(konf *koanf.Koanf) *VpnServer

func (*VpnServer) IsUp

func (vs *VpnServer) IsUp() (tribool.Tribool, error)

func (*VpnServer) Restart

func (vs *VpnServer) Restart() (bool, error)

func (*VpnServer) Status

func (vs *VpnServer) Status() (bytes.Buffer, error)

func (*VpnServer) UpdateConfig

func (vs *VpnServer) UpdateConfig(vendor string, exit string) error

Jump to

Keyboard shortcuts

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