mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2024-12-15 11:00:41 +01:00
472718c9a3
for tests and modifying network device manipulation
23 lines
465 B
Go
23 lines
465 B
Go
package wg
|
|
|
|
type WgError struct {
|
|
msg string
|
|
}
|
|
|
|
func (m *WgError) Error() string {
|
|
return m.msg
|
|
}
|
|
|
|
type CreateInterfaceParams struct {
|
|
IfName string
|
|
Port int
|
|
}
|
|
|
|
type WgInterfaceManipulator interface {
|
|
// CreateInterface creates a WireGuard interface
|
|
CreateInterface(params *CreateInterfaceParams) error
|
|
// Enable interface enables the given interface with
|
|
// the IP. It overrides the IP at the interface
|
|
EnableInterface(ifName string, ip string) error
|
|
}
|