Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildArgsMap ¶
BuildArgsMap builds a map of the DWDirective's arguments in the form: args["key"] = value
func Validate ¶ added in v0.0.7
func Validate(rules []DWDirectiveRuleSpec, directives []string, onValidDirectiveFunc func(index int, rule DWDirectiveRuleSpec)) error
Validate a list of directives against the supplied rules. When a directive is valid for a particular rule, the `onValidDirectiveFunc` function is called.
func ValidateArgs ¶
func ValidateArgs(spec DWDirectiveRuleSpec, args map[string]string, uniqueMap map[string]bool) error
ValidateArgs validates a map of arguments against the rule specification
Types ¶
type DWDirectiveRuleDef ¶
type DWDirectiveRuleDef struct { Key string `json:"key"` Type string `json:"type"` Pattern string `json:"pattern,omitempty"` Min int `json:"min,omitempty"` Max int `json:"max,omitempty"` IsRequired bool `json:"isRequired,omitempty"` IsValueRequired bool `json:"isValueRequired,omitempty"` UniqueWithin string `json:"uniqueWithin,omitempty"` }
DWDirectiveRuleDef defines the DWDirective parser rules +kubebuilder:object:generate=true
func (*DWDirectiveRuleDef) DeepCopy ¶
func (in *DWDirectiveRuleDef) DeepCopy() *DWDirectiveRuleDef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DWDirectiveRuleDef.
func (*DWDirectiveRuleDef) DeepCopyInto ¶
func (in *DWDirectiveRuleDef) DeepCopyInto(out *DWDirectiveRuleDef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DWDirectiveRuleSpec ¶
type DWDirectiveRuleSpec struct { // Name of the #DW command. jobdw, stage_in, etc. Command string `json:"command"` // Override for the Driver ID. If left empty this defaults to the // name of the DWDirectiveRule DriverLabel string `json:"driverLabel,omitempty"` // Comma separated list of states that this rule wants to register for. // These watch states will result in an entry in the driver status array // in the Workflow resource WatchStates string `json:"watchStates,omitempty"` // List of key/value pairs this #DW command is expected to have RuleDefs []DWDirectiveRuleDef `json:"ruleDefs"` }
DWDirectiveRuleSpec defines the desired state of DWDirective +kubebuilder:object:generate=true
func (*DWDirectiveRuleSpec) DeepCopy ¶
func (in *DWDirectiveRuleSpec) DeepCopy() *DWDirectiveRuleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DWDirectiveRuleSpec.
func (*DWDirectiveRuleSpec) DeepCopyInto ¶
func (in *DWDirectiveRuleSpec) DeepCopyInto(out *DWDirectiveRuleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.