mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
Initial Work on Backend Interface Management
This commit is contained in:
parent
d54ceb8a0f
commit
a90e7648db
10 changed files with 196 additions and 12 deletions
20
internal/api/network/interfaces.go
Normal file
20
internal/api/network/interfaces.go
Normal file
|
@ -0,0 +1,20 @@
|
|||
package network
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"nfsense.net/nfsense/internal/definitions"
|
||||
)
|
||||
|
||||
type GetInterfacesParameters struct {
|
||||
}
|
||||
|
||||
type GetInterfacesResult struct {
|
||||
Interfaces []definitions.Interface
|
||||
}
|
||||
|
||||
func (f *Network) GetInterfaces(ctx context.Context, params GetInterfacesParameters) (GetInterfacesResult, error) {
|
||||
return GetInterfacesResult{
|
||||
Interfaces: f.Conf.Network.Interfaces,
|
||||
}, nil
|
||||
}
|
9
internal/api/network/network.go
Normal file
9
internal/api/network/network.go
Normal file
|
@ -0,0 +1,9 @@
|
|||
package network
|
||||
|
||||
import (
|
||||
"nfsense.net/nfsense/internal/definitions"
|
||||
)
|
||||
|
||||
type Network struct {
|
||||
Conf *definitions.Config
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue