use newer netip types

This commit is contained in:
Samuel Lorch 2023-04-23 19:40:11 +02:00
parent d4fc2116b5
commit 627a1105ee
3 changed files with 4 additions and 8 deletions

View file

@ -5,7 +5,6 @@ import (
"net/netip"
"go4.org/netipx"
"nfsense.net/nfsense/internal/definitions/common"
)
type Address struct {
@ -13,7 +12,7 @@ type Address struct {
Comment string `json:"comment,omitempty"`
Host *netip.Addr `json:"host,omitempty" validate:"excluded_unless=Type 0"`
Range *netipx.IPRange `json:"range,omitempty" validate:"excluded_unless=Type 1"`
NetworkAddress *common.IPNet `json:"network,omitempty" validate:"excluded_unless=Type 2"`
NetworkAddress *netip.Prefix `json:"network,omitempty" validate:"excluded_unless=Type 2"`
Children *[]string `json:"children,omitempty"`
}