smegmesh/pkg/wg/types.go
Tim Beatham 472718c9a3 Standardising filenames, interfacing out
for tests and modifying network device
manipulation
2023-10-28 16:38:25 +01:00

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
}