Documentation
¶
Overview ¶
Package stringcondition exposes some common string condition implementations.
Index ¶
Constants ¶
View Source
const (
// EqualsConditionKey is the sentinel key identifying a string == comparison.
EqualsConditionKey = "equals"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EqualsCondition ¶
type EqualsCondition struct {
// Type stores the sentinel which represents the type of Condition implemented.
Type string `json:"type" yaml:"type"`
// Expected is the expected string value.
Expected string `json:"expected,omitempty" yaml:"expected,omitempty"`
}
EqualsCondition is an implementation of the condition.Condition interface which evaluates string equality of a match against Expected. Although EqualsCondition is exported for serialization reasons, it is recommended to instantiate new instances of EqualsCondition using NewEqualsCondition.
func NewEqualsCondition ¶
func NewEqualsCondition(expected string) *EqualsCondition
NewEqualsCondition creates an EqualsCondition.
Click to show internal directories.
Click to hide internal directories.