the

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolExpression

type BoolExpression struct {
	client.Bool
	// contains filtered or unexported fields
}

BoolExpression is an expression containing a client.Bool.

func Bool

func Bool(b client.Bool, components ...client.Value) BoolExpression

Bool returns a BoolExpression containing b.

func (BoolExpression) Components

func (b BoolExpression) Components() []client.Value

Components implements clientside.Compound

type NumberExpression

type NumberExpression struct {
	client.Float
	// contains filtered or unexported fields
}

NumberExpression is an expression containing a number.

func DifferenceOf

func DifferenceOf(a, b client.Float, others ...client.Float) NumberExpression

DifferenceOf returns the quotient of (a - b - others...)

func Number

func Number(n client.Float, components ...client.Value) NumberExpression

Number returns the NumberType of n.

func ProductOf

func ProductOf(a, b client.Float, others ...client.Float) NumberExpression

ProductOf returns the product of (a * b * others...)

func QuotientOf

func QuotientOf(a, b client.Float, others ...client.Float) NumberExpression

QuotientOf returns the quotient of (a / b / others...)

func SumOf

func SumOf(a, b client.Float, others ...client.Float) NumberExpression

SumOf returns the sum of (a + b + others...)

func (NumberExpression) Components

func (a NumberExpression) Components() []client.Value

Components implements clientside.Compound

func (NumberExpression) IsLessThan

func (a NumberExpression) IsLessThan(b client.Float) BoolExpression

IsLessThan returns a < b

func (NumberExpression) IsMoreThan

func (a NumberExpression) IsMoreThan(b client.Float) BoolExpression

IsMoreThan returns a > b

type StringExpression

type StringExpression struct {
	client.String
	// contains filtered or unexported fields
}

StringExpression is an expression containing a client.String.

func String

func String(s client.String, components ...client.Value) StringExpression

String returns a StringExpression containing s.

func (StringExpression) Components

func (a StringExpression) Components() []client.Value

Components implements clientside.Compound

func (StringExpression) If

func (a StringExpression) If(condition client.Bool) TernaryString

If returns a TernaryString.

func (StringExpression) Is

func (a StringExpression) Is(literal string) BoolExpression

Is returns a == b as a BoolExpression

type TernaryString

type TernaryString struct {
	Condition client.Bool
	IfTrue    StringExpression
}

TernaryString is a StringExpression that can be one of two values depending on a condition.

func (TernaryString) Otherwise

func (t TernaryString) Otherwise(value client.String) StringExpression

Otherwise returns the complete StringExpression of the TernaryString.

type Value

type Value struct {
	client.Value
	// contains filtered or unexported fields
}

Value is a value.

func ValueOf

func ValueOf(v client.Value, components ...client.Value) Value

ValueOf returns the Value of v.

func (Value) Components

func (a Value) Components() []client.Value

Components implements clientside.Compound

func (Value) Is

func (a Value) Is(b client.Value) BoolExpression

Is returns a == b as a Value

func (Value) IsNot

func (a Value) IsNot(b client.Value) BoolExpression

IsNot returns a != b as a Value

Jump to

Keyboard shortcuts

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