Documentation
¶
Index ¶
- Constants
- func ParseValidatorStatus(status ValidatorStatus) (code api.ReturnStatusCodes, message string)
- func ValidateIPAddress(in *api.IPAddress) error
- func ValidateIPAddressAndExternalType(in *api.IPAddress, t api.IPType) error
- func ValidateIPCIDR(in *api.IPCIDR) error
- func ValidateInterfaceName(in string) error
- func ValidateLink(in *api.Link) error
- func ValidateLinkAddress(in *api.LinkAddress) error
- func ValidateLinkFilterElems(in map[string]string) error
- func ValidateMACAddress(in *api.MACAddress) error
- func ValidateNeighbor(in *api.Neighbor) error
- func ValidateRoute(in *api.Route) error
- func ValidateSubnetMask(in *api.IPMask) error
- type ValidatorStatus
Constants ¶
View Source
const (
MACAddressLength = 6
)
Variables ¶
This section is empty.
Functions ¶
func ParseValidatorStatus ¶
func ParseValidatorStatus(status ValidatorStatus) (code api.ReturnStatusCodes, message string)
func ValidateIPAddress ¶
func ValidateIPAddressAndExternalType ¶
Validates both the IP address and makes sure it matches with the defined type.
func ValidateIPCIDR ¶
func ValidateInterfaceName ¶
Validates an interface name for a link. Returns error if invalid.
func ValidateLink ¶
wrapper for validating the integrity of a link object. returns the status code for the link at this stage.
func ValidateLinkAddress ¶
func ValidateLinkAddress(in *api.LinkAddress) error
Validtes the link address object, returns nil if the link is fine and ready for sending to kernel.
func ValidateLinkFilterElems ¶
Validates incoming filter elements for filtering when getting a link from the kernel. Returns error if invalid.
func ValidateMACAddress ¶
func ValidateMACAddress(in *api.MACAddress) error
func ValidateNeighbor ¶
func ValidateRoute ¶
func ValidateSubnetMask ¶
Types ¶
type ValidatorStatus ¶
type ValidatorStatus struct {
// contains filtered or unexported fields
}
A custom error for validators to use that still conforms to the error interface.
func NewError ¶
func NewError(msg string, status_code api.ReturnStatusCodes) ValidatorStatus
func (ValidatorStatus) Error ¶
func (err ValidatorStatus) Error() string
Click to show internal directories.
Click to hide internal directories.