wireguard

package
v0.0.0-...-da402ac Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	Interface ClientInterface
	Peer      ClientPeer
}

type ClientInterface

type ClientInterface struct {
	Address    string
	DNS        string
	PrivateKey string
}

type ClientPeer

type ClientPeer struct {
	PublicKey  string
	AllowedIPs string
	Endpoint   string
}

type Config

type Config struct {
	Interface
	Peer []Peer
}

type ConfigManager

type ConfigManager struct {
	ConfigFilePath string
	Hostname       string
	DNS            string
	InterfaceName  string
	ProcessManager ProcessManagerInterface
}

func (*ConfigManager) AddPeer

func (c *ConfigManager) AddPeer(publicKey string, name string) error

func (*ConfigManager) GetClientConfig

func (c *ConfigManager) GetClientConfig(publicKey string) (*ClientConfig, string, error)

func (*ConfigManager) ListPeers

func (c *ConfigManager) ListPeers() ([]Peer, error)

func (*ConfigManager) RemovePeer

func (c *ConfigManager) RemovePeer(publicKey string) error

type Interface

type Interface struct {
	Address    string
	PrivateKey string
	ListenPort string
}

type Peer

type Peer struct {
	AllowedIPs string
	PublicKey  string
	Name       string
}

type ProcessManager

type ProcessManager struct {
	InterfaceName string
}

func (*ProcessManager) ReloadConfig

func (pm *ProcessManager) ReloadConfig() error

type ProcessManagerInterface

type ProcessManagerInterface interface {
	ReloadConfig() error
}

type ProcessManagerStub

type ProcessManagerStub struct{}

func (*ProcessManagerStub) ReloadConfig

func (pm *ProcessManagerStub) ReloadConfig() error

Jump to

Keyboard shortcuts

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