Documentation ¶
Overview ¶
Package condition defines the Condition Evaluate contract.
Index ¶
Constants ¶
View Source
const (
// TypeKey is the JSON key indicating a condition payload.
TypeKey = "type"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition interface { // Evaluate evaluates a Condition implementation for groupIdx group of a matched expression. Evaluate(match string, regex *regexp.Regexp, groupIdx int) (bool, error) }
Condition represents the polymorphic behavior of the ability to Evaluate. Given a regular expression, match, and match index, it is useful to make assertions using Condition implementations. For example, if a Ping test returns a matching summary, it is convenient to evaluate that summary indicates zero errors.
Directories ¶
Path | Synopsis |
---|---|
Package intcondition exposes some common integer condition implementations.
|
Package intcondition exposes some common integer condition implementations. |
Package stringcondition exposes some common string condition implementations.
|
Package stringcondition exposes some common string condition implementations. |
Click to show internal directories.
Click to hide internal directories.