types

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrSdkCantBeEmpty represent error when no SDK key found in client api
	ErrSdkCantBeEmpty = ErrorType("Sdk can't be empty!")
	// ErrWrongTypeAssertion is custom error for wrong type assertions
	ErrWrongTypeAssertion = ErrorType("Wrong type assertion")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array struct {
	reflect.Kind
	// contains filtered or unexported fields
}

Array type for clause attribute evaluation

func NewArray

func NewArray(kind reflect.Kind, value interface{}) *Array

NewArray creates a Array instance with the object value TBD

type Boolean

type Boolean bool

Boolean type for clause attribute evaluation

func NewBoolean

func NewBoolean(value interface{}) (*Boolean, error)

NewBoolean creates a Boolean instance with the object value

func (Boolean) Contains

func (b Boolean) Contains(value interface{}) bool

Contains always return false

func (Boolean) EndsWith

func (b Boolean) EndsWith(value interface{}) bool

EndsWith always return false

func (Boolean) Equal

func (b Boolean) Equal(value interface{}) bool

Equal check if the boolean and value are equal

func (Boolean) EqualSensitive

func (b Boolean) EqualSensitive(value interface{}) bool

EqualSensitive always return false

func (Boolean) GreaterThan

func (b Boolean) GreaterThan(value interface{}) bool

GreaterThan always return false

func (Boolean) GreaterThanEqual

func (b Boolean) GreaterThanEqual(value interface{}) bool

GreaterThanEqual always return false

func (Boolean) In

func (b Boolean) In(value interface{}) bool

In always return false

func (Boolean) LessThan

func (b Boolean) LessThan(value interface{}) bool

LessThan always return false

func (Boolean) LessThanEqual

func (b Boolean) LessThanEqual(value interface{}) bool

LessThanEqual always return false

func (Boolean) Match

func (b Boolean) Match(value interface{}) bool

Match always return false

func (Boolean) StartsWith

func (b Boolean) StartsWith(value interface{}) bool

StartsWith always return false

type ErrorType

type ErrorType string

ErrorType is custom type for using it in const declarations

func (ErrorType) Error

func (e ErrorType) Error() string

type Integer

type Integer int64

Integer type for clause attribute evaluation

func NewInteger

func NewInteger(value interface{}) (*Integer, error)

NewInteger creates a Integer instance with the object value

func (Integer) Contains

func (n Integer) Contains(interface{}) bool

Contains always return false

func (Integer) EndsWith

func (n Integer) EndsWith(interface{}) bool

EndsWith always return false

func (Integer) Equal

func (n Integer) Equal(value interface{}) bool

Equal check if the number and value are equal

func (Integer) EqualSensitive

func (n Integer) EqualSensitive(interface{}) bool

EqualSensitive always return false

func (Integer) GreaterThan

func (n Integer) GreaterThan(value interface{}) bool

GreaterThan checks if the number is greater than the value

func (Integer) GreaterThanEqual

func (n Integer) GreaterThanEqual(value interface{}) bool

GreaterThanEqual checks if the number is greater or equal than the value

func (Integer) In

func (n Integer) In(value interface{}) bool

In checks if the number exist in slice of numbers (value)

func (Integer) LessThan

func (n Integer) LessThan(value interface{}) bool

LessThan checks if the number is less than the value

func (Integer) LessThanEqual

func (n Integer) LessThanEqual(value interface{}) bool

LessThanEqual checks if the number is less or equal than the value

func (Integer) Match

func (n Integer) Match(interface{}) bool

Match always return false

func (Integer) StartsWith

func (n Integer) StartsWith(interface{}) bool

StartsWith always return false

type JSON

type JSON map[string]interface{}

JSON type

type Number

type Number float64

Number type for clause attribute evaluation

func NewNumber

func NewNumber(value interface{}) (*Number, error)

NewNumber creates a Number instance with the object value

func (Number) Contains

func (n Number) Contains(value interface{}) bool

Contains always return false

func (Number) EndsWith

func (n Number) EndsWith(value interface{}) bool

EndsWith always return false

func (Number) Equal

func (n Number) Equal(value interface{}) bool

Equal check if the number and value are equal

func (Number) EqualSensitive

func (n Number) EqualSensitive(value interface{}) bool

EqualSensitive always return false

func (Number) GreaterThan

func (n Number) GreaterThan(value interface{}) bool

GreaterThan checks if the number is greater than the value

func (Number) GreaterThanEqual

func (n Number) GreaterThanEqual(value interface{}) bool

GreaterThanEqual checks if the number is greater or equal than the value

func (Number) In

func (n Number) In(value interface{}) bool

In checks if the number exist in slice of numbers (value)

func (Number) LessThan

func (n Number) LessThan(value interface{}) bool

LessThan checks if the number is less than the value

func (Number) LessThanEqual

func (n Number) LessThanEqual(value interface{}) bool

LessThanEqual checks if the number is less or equal than the value

func (Number) Match

func (n Number) Match(value interface{}) bool

Match always return false

func (Number) StartsWith

func (n Number) StartsWith(value interface{}) bool

StartsWith always return false

type String

type String string

String type for clause attribute evaluation

func NewString

func NewString(value interface{}) (*String, error)

NewString creates a string with the object value

func (String) Contains

func (s String) Contains(value interface{}) bool

Contains check if the string contains the value

func (String) EndsWith

func (s String) EndsWith(value interface{}) bool

EndsWith check if the string ends with the value

func (String) Equal

func (s String) Equal(value interface{}) bool

Equal check if the string and value are equal

func (String) EqualSensitive

func (s String) EqualSensitive(value interface{}) bool

EqualSensitive check if the string and value are equal (case sensitive)

func (String) GreaterThan

func (s String) GreaterThan(value interface{}) bool

GreaterThan checks if the string is greater than the value

func (String) GreaterThanEqual

func (s String) GreaterThanEqual(value interface{}) bool

GreaterThanEqual checks if the string is greater or equal than the value

func (String) In

func (s String) In(value interface{}) bool

In checks if the string exist in slice of strings (value)

func (String) LessThan

func (s String) LessThan(value interface{}) bool

LessThan checks if the string is less than the value

func (String) LessThanEqual

func (s String) LessThanEqual(value interface{}) bool

LessThanEqual checks if the string is less or equal than the value

func (String) Match

func (s String) Match(value interface{}) bool

Match check if the string match the regex value

func (String) StartsWith

func (s String) StartsWith(value interface{}) bool

StartsWith check if the string starts with the value

func (String) String

func (s String) String() string

String implement Stringer interface

type ValueType

type ValueType interface {
	StartsWith(value interface{}) bool
	EndsWith(value interface{}) bool
	Match(value interface{}) bool
	Contains(value interface{}) bool
	EqualSensitive(value interface{}) bool
	Equal(value interface{}) bool
	GreaterThan(value interface{}) bool
	GreaterThanEqual(value interface{}) bool
	LessThan(value interface{}) bool
	LessThanEqual(value interface{}) bool
	In(value interface{}) bool
}

ValueType interface used for different clause types

Jump to

Keyboard shortcuts

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