infra

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPrivateKey = errors.New("invalid private key")

Functions

This section is empty.

Types

type WGCtrl

type WGCtrl struct {
	// contains filtered or unexported fields
}

func NewWGCtrl

func NewWGCtrl() (*WGCtrl, error)

func (*WGCtrl) DeletePeers

func (w *WGCtrl) DeletePeers(ctx context.Context, deviceName string, publicKeys []string) error

FIXME unify with RegisterPeers?

func (*WGCtrl) GetDevices

func (w *WGCtrl) GetDevices(ctx context.Context, filterPublicKeys []string) ([]*wgtypes.Device, error)

func (*WGCtrl) GetSingleDevice

func (w *WGCtrl) GetSingleDevice(ctx context.Context, name string, filterPublicKeys []string) ([]*wgtypes.Device, error)

func (*WGCtrl) RegisterPeers

func (w *WGCtrl) RegisterPeers(ctx context.Context, deviceName string, peers []wgtypes.PeerConfig) error

func (*WGCtrl) UpdatePrivateKey added in v0.2.0

func (w *WGCtrl) UpdatePrivateKey(ctx context.Context, deviceName string, device *wgtypes.Device, privateKey string) error

Jump to

Keyboard shortcuts

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