mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2024-12-14 10:31:25 +01:00
ceb43a1db1
- Got unit tests passing - Improved manager unit tests
21 lines
508 B
Go
21 lines
508 B
Go
package wg
|
|
|
|
import "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
|
|
|
type WgInterfaceManipulator interface {
|
|
// CreateInterface creates a WireGuard interface
|
|
CreateInterface(port int, privateKey *wgtypes.Key) (string, error)
|
|
// AddAddress adds an address to the given interface name
|
|
AddAddress(ifName string, addr string) error
|
|
// RemoveInterface removes the specified interface
|
|
RemoveInterface(ifName string) error
|
|
}
|
|
|
|
type WgError struct {
|
|
msg string
|
|
}
|
|
|
|
func (m *WgError) Error() string {
|
|
return m.msg
|
|
}
|