strategies

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConditionalEquals        = "EQUALS"
	ConditionalNotEquals     = "NOT_EQUALS"
	ConditionalEndsWith      = "ENDS_WITH"
	ConditionalStartsWith    = "STARTS_WITH"
	ConditionalExcludes      = "EXCLUDES"
	ConditionalIncludes      = "INCLUDES"
	ConditionalGreater       = "GREATER"
	ConditionalGreaterEquals = "GREATER_EQUALS"
	ConditionalLess          = "LESS"
	ConditionalLessEquals    = "LESS_EQUALS"
	ConditionalRegex         = "REGEX"
)
View Source
const (
	FieldNameCountry  = "country"
	FieldNameDevice   = "device"
	FieldNamePlatform = "platform"
	FieldNameUserkey  = "userkey"
	FieldNameVersion  = "version"
)
View Source
const TypeBoolean = "BOOLEAN"

TypeBoolean is for true/false values:

View Source
const TypeDate = "DATE"

TypeDate is for date values (eg "YYYY-MM-DD"):

View Source
const TypeDateTime = "DATETIME"

TypeDateTime is for DATETIME values (eg "YYYY-MM-DDTHH:MM:SSZ"):

View Source
const TypeIPAddress = "IP_ADDRESS"

TypeIPAddress is for ip-address values (eg "1.2.3.4" or "10.0.0.0/16"):

View Source
const TypeNumber = "NUMBER"

TypeNumber is for numerical values:

View Source
const TypeSemanticVersion = "SEMANTIC_VERSION"

TypeSemanticVersion is for semver values (eg 2.1.3):

View Source
const TypeString = "STRING"

TypeString is for string values (eg "something"):

Variables

This section is empty.

Functions

func Boolean

func Boolean(conditional string, options []interface{}, value interface{}) (bool, error)

Boolean asserts the given parameters then passes on for evaluation:

func Date

func Date(conditional string, options []interface{}, value interface{}) (bool, error)

Date asserts the given parameters then passes on for evaluation:

func DateTime

func DateTime(conditional string, options []interface{}, value interface{}) (bool, error)

DateTime asserts the given parameters then passes on for evaluation:

func IPAddress

func IPAddress(conditional string, options []interface{}, value interface{}) (bool, error)

IPAddress asserts the given parameters then passes on for evaluation:

func Number

func Number(conditional string, options []interface{}, value interface{}) (bool, error)

Number asserts the given parameters then passes on for evaluation:

func SemanticVersion

func SemanticVersion(conditional string, options []interface{}, value interface{}) (bool, error)

SemanticVersion asserts the given parameters then passes on for evaluation:

func String

func String(conditional string, options []interface{}, value interface{}) (bool, error)

String asserts the given parameters then passes on for evaluation:

Types

This section is empty.

Jump to

Keyboard shortcuts

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