mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 18:38:22 +00:00
Address use IPNet
This commit is contained in:
parent
49d4d3fade
commit
1b046714b1
1 changed files with 1 additions and 2 deletions
|
@ -2,14 +2,13 @@ package definitions
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/netip"
|
||||
)
|
||||
|
||||
type Interface struct {
|
||||
Alias string `json:"alias" validate:"min=0,max=3"`
|
||||
Type InterfaceType `json:"type" validate:"min=0,max=3"`
|
||||
AddressingMode InterfaceAddressingMode `json:"addressing_mode" validate:"min=0,max=2"`
|
||||
Address *netip.Addr `json:"address,omitempty" validate:"excluded_unless=AddressingMode 1"`
|
||||
Address *IPNet `json:"address,omitempty" validate:"excluded_unless=AddressingMode 1"`
|
||||
HardwareInterface *string `json:"hardware_interface,omitempty"`
|
||||
// TODO fix Validator for int pointers with min=0,max=4094
|
||||
VlanID *uint `json:"vlan_id,omitempty" validate:"excluded_unless=Type 1"`
|
||||
|
|
Loading…
Add table
Reference in a new issue