condition

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2021 License: GPL-2.0 Imports: 1 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL