mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 07:19:07 +00:00
Add Static Route Backend
This commit is contained in:
parent
dec123e9ee
commit
3197f291fa
4 changed files with 40 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
|||
package definitions
|
||||
|
||||
type Network struct {
|
||||
Interfaces map[string]Interface `json:"interfaces" validate:"required,dive"`
|
||||
Interfaces map[string]Interface `json:"interfaces" validate:"required,dive"`
|
||||
StaticRoutes []StaticRoute `json:"static_routes" validate:"required,dive"`
|
||||
}
|
||||
|
|
13
internal/definitions/static_route.go
Normal file
13
internal/definitions/static_route.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
package definitions
|
||||
|
||||
import (
|
||||
"net/netip"
|
||||
)
|
||||
|
||||
type StaticRoute struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
Interface string `json:"interface,omitempty"`
|
||||
Gateway netip.Addr `json:"gateway,omitempty"`
|
||||
Destination IPNet `json:"destination,omitempty"`
|
||||
Metric uint `json:"metric,omitempty"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue