Documentation
¶
Index ¶
- type BoolExpression
- type NumberExpression
- func DifferenceOf(a, b client.Float, others ...client.Float) NumberExpression
- func Number(n client.Float, components ...client.Value) NumberExpression
- func ProductOf(a, b client.Float, others ...client.Float) NumberExpression
- func QuotientOf(a, b client.Float, others ...client.Float) NumberExpression
- func SumOf(a, b client.Float, others ...client.Float) NumberExpression
- type StringExpression
- type TernaryString
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoolExpression ¶
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 ¶
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 ¶
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.