Documentation ¶
Index ¶
- func LoadAndValidate(filename string) (*model.RoutemapRoot, model.RoutemapSummary, error)
- func ValidateLabels(labels []string, mapIdx int, summary *model.RoutemapSummary) error
- func ValidateNetmaskLen(ipnet *net.IPNet) error
- func ValidateNetwork(network string) (net.IP, *net.IPNet, error)
- func ValidateNetworks(nets []string, mapIdx int, summary *model.RoutemapSummary) error
- func ValidateProperCIDR(ip net.IP, ipnet *net.IPNet) error
- func ValidateVersion(version int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadAndValidate ¶
func LoadAndValidate(filename string) (*model.RoutemapRoot, model.RoutemapSummary, error)
func ValidateLabels ¶
func ValidateLabels(labels []string, mapIdx int, summary *model.RoutemapSummary) error
ValidateLabels validates the set of labels of the route map.
func ValidateNetmaskLen ¶
ValidateNetmaskLen verifies that the mask length does not exceeds the maximum allowed value.
func ValidateNetwork ¶
ValidateNetwork takes an string representing a network from the JSON source file and validates it. Returns the parsed IP and IPNet along with an error instance that can possibly be a multierr instance.
If the network can not be parsed, only the error instance will contain values. The correctness of the network depends on the returned error having a nil value.
func ValidateNetworks ¶
func ValidateNetworks(nets []string, mapIdx int, summary *model.RoutemapSummary) error
func ValidateProperCIDR ¶
ValidateProperCIDR verifies that the IP address corresponds to the network.
func ValidateVersion ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.