Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ConditionalAnchorErrMsg = "conditionalAnchorError"
ConditionalAnchorErrMsg - the error message for conditional anchor error
Functions ¶
func CopySlice ¶ added in v1.3.5
func CopySlice(s []interface{}) []interface{}
CopySlice creates a full copy of the target slice
func IsConditionalAnchorError ¶ added in v1.3.0
IsConditionalAnchorError checks if error message has conditional anchor error string
Types ¶
type AnchorError ¶ added in v1.3.0
type AnchorError int
AnchorError is the const specification of anchor errors
const ConditionalAnchorErr AnchorError = iota
ConditionalAnchorErr ...
type AnchorKey ¶
type AnchorKey struct { // AnchorError - used in validate to break execution of the recursion when if condition fails AnchorError ValidateAnchorError // contains filtered or unexported fields }
AnchorKey - contains map of anchors
func (*AnchorKey) CheckAnchorInResource ¶
func (ac *AnchorKey) CheckAnchorInResource(pattern interface{}, resource interface{})
CheckAnchorInResource checks if condition anchor key has values
func (*AnchorKey) IsAnchorError ¶
IsAnchorError - if any of the anchor key doesn't exists in the resource then it will return true if any of (key)=false then return IsAnchorError() as true if all the keys exists in the pattern exists in resource then return IsAnchorError() as false
type ValidateAnchorError ¶ added in v1.3.0
type ValidateAnchorError struct { Err AnchorError Message string }
ValidateAnchorError represents the error type of validation anchors
func NewConditionalAnchorError ¶ added in v1.3.0
func NewConditionalAnchorError(msg string) ValidateAnchorError
NewConditionalAnchorError returns a new instance of ConditionalAnchorError
func (ValidateAnchorError) Error ¶ added in v1.3.0
func (e ValidateAnchorError) Error() error
func (ValidateAnchorError) IsConditionAnchorError ¶ added in v1.3.0
func (e ValidateAnchorError) IsConditionAnchorError() bool
IsConditionAnchorError ...
func (ValidateAnchorError) IsNil ¶ added in v1.3.0
func (e ValidateAnchorError) IsNil() bool
IsNil ...