operators

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

package operators defines constant operator names and helper functions for identifying the operator and its kind.

Index

Constants

View Source
const (
	Sequence   = "_sequence_" // Sequence of conjunctions.
	LogicalAnd = "_&&_"       // Conjunction operator (a AND b).
	LogicalOr  = "_||_"       // Disjunction operator (a OR b).
	LogicalNot = "_!"         // Negation using the keyword NOT
	Negate     = "-_"         // Negation using the minus
	Index      = "_[_]"       // Index operation on a map or list.

	// Restriction operations.
	Global        = "_global_"
	Has           = "_:_"
	Equals        = "_==_"
	Greater       = "_>_"
	GreaterEquals = "_>=_"
	Less          = "_<_"
	LessEquals    = "_<=_"
	NotEquals     = "_!=_"
)

All CEL operators are modelled as function calls. The list of constants below uses mangled operator names to avoid collisions with user-defined functions.

Variables

This section is empty.

Functions

func Find

func Find(text string) (string, bool)

Find the operator name from the function name and whether it could be found.

func IsRestriction

func IsRestriction(op string) bool

Determine whether the operator is a restriction.

Types

This section is empty.

Jump to

Keyboard shortcuts

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