mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2024-12-13 18:11:25 +01:00
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
|
||
|
}
|