filtersupport

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PR is an abbreviation for 'present'.
	PR CompareOperator = "pr"
	// EQ is an abbreviation for 'equals'.
	EQ CompareOperator = "eq"
	// NE is an abbreviation for 'not equals'.
	NE CompareOperator = "ne"
	// CO is an abbreviation for 'contains'.
	CO CompareOperator = "co"
	// IN is an abbreviation for 'in'.
	IN CompareOperator = "in"
	// SW is an abbreviation for 'starts with'.
	SW CompareOperator = "sw"
	// EW an abbreviation for 'ends with'.
	EW CompareOperator = "ew"
	// GT is an abbreviation for 'greater than'.
	GT CompareOperator = "gt"
	// LT is an abbreviation for 'less than'.
	LT CompareOperator = "lt"
	// GE is an abbreviation for 'greater or equal than'.
	GE CompareOperator = "ge"
	// LE is an abbreviation for 'less or equal than'.
	LE CompareOperator = "le"

	// AND is the logical operation and (&&).
	AND LogicalOperator = "and"
	// OR is the logical operation or (||).
	OR LogicalOperator = "or"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeExpression

type AttributeExpression struct {
	AttributePath string
	Operator      CompareOperator
	CompareValue  string
}

func (AttributeExpression) String

func (e AttributeExpression) String() string

type CompareOperator

type CompareOperator string

type Expression

type Expression interface {
	String() string
	// contains filtered or unexported methods
}

func ParseFilter

func ParseFilter(expression string) (*Expression, error)

type LogicalExpression

type LogicalExpression struct {
	Operator    LogicalOperator
	Left, Right Expression
}

func (LogicalExpression) String

func (e LogicalExpression) String() string

type LogicalOperator

type LogicalOperator string

type NotExpression

type NotExpression struct {
	Expression Expression
}

func (NotExpression) String

func (e NotExpression) String() string

type PrecedenceExpression

type PrecedenceExpression struct {
	Expression Expression
}

func (PrecedenceExpression) String

func (e PrecedenceExpression) String() string

type ValuePathExpression

type ValuePathExpression struct {
	Attribute   string
	VPathFilter Expression
}

func (ValuePathExpression) String

func (e ValuePathExpression) String() string

Jump to

Keyboard shortcuts

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