mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2025-07-19 05:02:27 +02:00
24 lines
508 B
Go
24 lines
508 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
|
|
// AddAddress adds an address to the given interface name
|
|
AddAddress(ifName string, addr string) error
|
|
// RemoveInterface removes the specified interface
|
|
RemoveInterface(ifName string) error
|
|
}
|