mirror of
https://github.com/h44z/wg-portal.git
synced 2025-10-13 19:46:19 +00:00
* mikrotik: allow to set DNS, wip: handle routes in wg-controller * replace old route handling for local controller * cleanup route handling for local backend * implement route handling for mikrotik controller
28 lines
858 B
Go
28 lines
858 B
Go
package domain
|
|
|
|
import "context"
|
|
|
|
type InterfaceController interface {
|
|
GetId() InterfaceBackend
|
|
GetInterfaces(_ context.Context) ([]PhysicalInterface, error)
|
|
GetInterface(_ context.Context, id InterfaceIdentifier) (*PhysicalInterface, error)
|
|
GetPeers(_ context.Context, deviceId InterfaceIdentifier) ([]PhysicalPeer, error)
|
|
SaveInterface(
|
|
_ context.Context,
|
|
id InterfaceIdentifier,
|
|
updateFunc func(pi *PhysicalInterface) (*PhysicalInterface, error),
|
|
) error
|
|
DeleteInterface(_ context.Context, id InterfaceIdentifier) error
|
|
SavePeer(
|
|
_ context.Context,
|
|
deviceId InterfaceIdentifier,
|
|
id PeerIdentifier,
|
|
updateFunc func(pp *PhysicalPeer) (*PhysicalPeer, error),
|
|
) error
|
|
DeletePeer(_ context.Context, deviceId InterfaceIdentifier, id PeerIdentifier) error
|
|
PingAddresses(
|
|
ctx context.Context,
|
|
addr string,
|
|
) (*PingerResult, error)
|
|
}
|