package
1.101.9
Repository: https://github.com/vonage/gosrvlib.git
Documentation: pkg.go.dev

# Functions

New returns a new Processor with the rules and the given options.
ParseJSON parses and returns a [][]Rule from its JSON representation.
WithFieldNameTag allows to use the field names specified by the tag instead of the original struct names.
WithMaxResults sets the maximum length of the slice returned by Apply() and ApplySubset().
WithMaxRules sets the maximum number of rules to pass to the Processor.Apply() function without errors.
WithQueryFilterKey sets the query parameter key that Processor.ParseURLQuery() looks for.

# Constants

DefaultMaxResults is the default number of results for Apply.
DefaultMaxRules is the default maximum number of rules.
DefaultURLQueryFilterKey is the default URL query key used by Processor.ParseURLQuery().
FieldNameSeparator is the separator for Rule fields.
math.MaxInt32.
TypeContains is a filter type that matches when the reference string is a sub-string of the value.
TypeEqual is a filter type that matches exactly the reference value.
TypeEqualFold is a filter type that matches when strings, interpreted as UTF-8, are equal under simple Unicode case-folding, which is a more general form of case-insensitivity.
TypeGT is a filter type that matches when the value is greater than reference.
TypeGTE is a filter type that matches when the value is greater than or equal the reference.
TypeHasPrefix is a filter type that matches when the value begins with the reference string.
TypeHasSuffix is a filter type that matches when the value ends with the reference string.
TypeLT is a filter type that matches when the value is less than reference.
TypeLTE is a filter type that matches when the value is less than or equal the reference.
TypePrefixNot is a prefix that can be added to any type to get the negated value (opposite match).
TypeRegexp is a filter type that matches the value against a reference regular expression.

# Structs

Processor provides the filtering logic and methods.
Rule is an individual filter that can be evaluated against any value.

# Interfaces

Evaluator is the interface to provide functions for a filter type.

# Type aliases

Option is the function that allows to set configuration options.