Documentation
¶
Overview ¶
Code generated by funcs-gen. DO NOT EDIT.
Code generated by funcs-gen. DO NOT EDIT.
Package funcs contains implementations of functions for the expressions as well as utility functions for those functions.
Code generated by funcs-gen. DO NOT EDIT.
Code generated by funcs-gen. DO NOT EDIT.
Code generated by funcs-gen. DO NOT EDIT.
Code generated by funcs-gen. DO NOT EDIT.
Code generated by funcs-gen. DO NOT EDIT.
Code generated by funcs-gen. DO NOT EDIT.
Code generated by funcs-gen. DO NOT EDIT.
Code generated by funcs-gen. DO NOT EDIT.
Code generated by funcs-gen. DO NOT EDIT.
Index ¶
- func BoolVar() *varBool
- func BytesVar() *varBytes
- func DoubleVar() *varDouble
- func Equal(l, r Comparable) bool
- func Hash(name string, hs ...Hashable) uint64
- func IntVar() *varInt
- func IsConst(typ reflect.Type) bool
- func IsFalse(fn Bool) bool
- func IsSimpleEqual(f Bool) bool
- func IsTrue(fn Bool) bool
- func Register(name string, fnc interface{})
- func Sprint(s Stringer) string
- func StringVar() *varString
- func UintVar() *varUint
- type Bool
- func And(v1, v2 Bool) Bool
- func BoolEq(a, b Bool) Bool
- func BoolNe(a, b Bool) Bool
- func BytesEq(a, b Bytes) Bool
- func BytesGE(a, b Bytes) Bool
- func BytesGt(a, b Bytes) Bool
- func BytesLE(a, b Bytes) Bool
- func BytesLt(a, b Bytes) Bool
- func BytesNe(a, b Bytes) Bool
- func Contains(s, sub String) Bool
- func ContainsInt(element Int, list ConstInts) (Bool, error)
- func ContainsString(element String, list ConstStrings) (Bool, error)
- func ContainsUint(element Uint, list ConstUints) (Bool, error)
- func DoubleEq(a, b Double) Bool
- func DoubleGE(a, b Double) Bool
- func DoubleGt(a, b Double) Bool
- func DoubleLE(a, b Double) Bool
- func DoubleLt(a, b Double) Bool
- func DoubleNe(a, b Double) Bool
- func ElemBools(list Bools, n Int) Bool
- func EqualFold(s, t String) Bool
- func HasPrefix(a, b String) Bool
- func HasSuffix(a, b String) Bool
- func IntEq(a, b Int) Bool
- func IntGE(a, b Int) Bool
- func IntGt(a, b Int) Bool
- func IntLE(a, b Int) Bool
- func IntLt(a, b Int) Bool
- func IntNe(a, b Int) Bool
- func Not(v1 Bool) Bool
- func Or(v1, v2 Bool) Bool
- func PrintBool(e Bool) Bool
- func Regex(expr ConstString, input String) (Bool, error)
- func StringEq(a, b String) Bool
- func StringNe(a, b String) Bool
- func TrimBool(f Bool) Bool
- func TypeBool(v Bool) Bool
- func TypeBytes(v Bytes) Bool
- func TypeDouble(v Double) Bool
- func TypeInt(v Int) Bool
- func TypeString(v String) Bool
- func TypeUint(v Uint) Bool
- func UintEq(a, b Uint) Bool
- func UintGE(a, b Uint) Bool
- func UintGt(a, b Uint) Bool
- func UintLE(a, b Uint) Bool
- func UintLt(a, b Uint) Bool
- func UintNe(a, b Uint) Bool
- type Bools
- type Bytes
- type Comparable
- type Const
- type ConstBool
- type ConstBools
- type ConstBytes
- type ConstDouble
- type ConstDoubles
- type ConstInt
- type ConstInts
- type ConstListOfBytes
- type ConstString
- type ConstStrings
- type ConstUint
- type ConstUints
- type Context
- type Double
- type Doubles
- type ErrContainsListNotConst
- type ErrNotBoolConst
- type ErrNotBytesConst
- type ErrNotDoubleConst
- type ErrNotIntConst
- type ErrNotStringConst
- type ErrNotUintConst
- type ErrRange
- type ErrRangeCheck
- type Factory
- type Func
- type Hashable
- type Int
- func ElemInts(list Ints, n Int) Int
- func LenBools(e Bools) Int
- func LenBytes(e Bytes) Int
- func LenDoubles(e Doubles) Int
- func LenInts(e Ints) Int
- func LenListOfBytes(e ListOfBytes) Int
- func LenString(e String) Int
- func LenStrings(e Strings) Int
- func LenUints(e Uints) Int
- func Now() Int
- func PrintInt(e Int) Int
- func TrimInt(f Int) Int
- type Ints
- type ListOf
- type ListOfBytes
- type Maker
- func (f *Maker) New(values ...interface{}) (interface{}, error)
- func (f *Maker) NewBool(values ...interface{}) (Bool, error)
- func (f *Maker) NewBools(values ...interface{}) (Bools, error)
- func (f *Maker) NewBytes(values ...interface{}) (Bytes, error)
- func (f *Maker) NewDouble(values ...interface{}) (Double, error)
- func (f *Maker) NewDoubles(values ...interface{}) (Doubles, error)
- func (f *Maker) NewInt(values ...interface{}) (Int, error)
- func (f *Maker) NewInts(values ...interface{}) (Ints, error)
- func (f *Maker) NewListOfBytes(values ...interface{}) (ListOfBytes, error)
- func (f *Maker) NewString(values ...interface{}) (String, error)
- func (f *Maker) NewStrings(values ...interface{}) (Strings, error)
- func (f *Maker) NewUint(values ...interface{}) (Uint, error)
- func (f *Maker) NewUints(values ...interface{}) (Uints, error)
- func (this *Maker) String() string
- type SetContext
- type Setter
- type String
- type Stringer
- type Strings
- type Uint
- type Uints
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsConst ¶
IsConst returns whether a reflected type is a function that is actually a constant value.
func IsSimpleEqual ¶
IsSimpleEqual returns whether the input function is a simple equal expression, where one argument is a constant and the other is a variable.
Types ¶
type Bool ¶
Bool is an interface that represents a function that returns a bool.
func ContainsInt ¶
ContainsInt returns a function that checks whether the element is contained in the list.
func ContainsString ¶
func ContainsString(element String, list ConstStrings) (Bool, error)
ContainsString returns a function that checks whether the element is contained in the list.
func ContainsUint ¶
func ContainsUint(element Uint, list ConstUints) (Bool, error)
ContainsUint returns a function that checks whether the element is contained in the list.
func EqualFold ¶
EqualFold returns a eqFold function with the two input functions as its parameters.
func HasPrefix ¶
HasPrefix returns a hasPrefix function with the two input functions as its parameters.
func HasSuffix ¶
HasSuffix returns a hasSuffix function with the two input functions as its parameters.
func PrintBool ¶
PrintBool returns a function that prints out the value of the argument function and returns its value.
func Regex ¶
func Regex(expr ConstString, input String) (Bool, error)
Regex returns a new regex function given the first parameter as the expression string that needs to compiled and the second as the regex that should be matched.
func TypeBool ¶
TypeBool returns a function that returns true if the error returned by the argument function is nil.
func TypeBytes ¶
TypeBytes returns a function that returns true if the error returned by the argument function is nil.
func TypeDouble ¶
TypeDouble returns a function that returns true if the error returned by the argument function is nil.
func TypeInt ¶
TypeInt returns a function that returns true if the error returned by the argument function is nil.
func TypeString ¶
TypeString returns a function that returns true if the error returned by the argument function is nil.
type Bools ¶
Bools is an interface that represents a function that returns a list of bools.
func NewListOfBool ¶
NewListOfBool returns a new function that when evaluated returns a list of type Bool
func PrintBools ¶
PrintBools returns a function that prints out the value of the argument function and returns its value.
func RangeBools ¶
RangeBools returns a function that returns a range of elements from a list.
type Bytes ¶
Bytes is an interface that represents a function that returns []byte.
func ElemListOfBytes ¶
func ElemListOfBytes(list ListOfBytes, n Int) Bytes
ElemListOfBytes returns a function that returns the n'th element of the list.
func PrintBytes ¶
PrintBytes returns a function that prints out the value of the argument function and returns its value.
type Comparable ¶
type Comparable interface { Compare(Comparable) int Hashable Stringer }
type Const ¶
type Const interface {
IsConst()
}
Const is an interface that when implemented implies that the function is actually a constant value.
type ConstBools ¶
type ConstBools interface { Bools }
func BoolsConst ¶
func BoolsConst(v []bool) ConstBools
BoolsConst returns a new constant function of type Bools
type ConstBytes ¶
type ConstBytes interface { Bytes }
func BytesConst ¶
func BytesConst(v []byte) ConstBytes
BytesConst returns a new constant function of type Bytes
type ConstDouble ¶
type ConstDouble interface { Double }
func DoubleConst ¶
func DoubleConst(v float64) ConstDouble
DoubleConst returns a new constant function of type Double
type ConstDoubles ¶
type ConstDoubles interface { Doubles }
func DoublesConst ¶
func DoublesConst(v []float64) ConstDoubles
DoublesConst returns a new constant function of type Doubles
type ConstListOfBytes ¶
type ConstListOfBytes interface { ListOfBytes }
func ListOfBytesConst ¶
func ListOfBytesConst(v [][]byte) ConstListOfBytes
ListOfBytesConst returns a new constant function of type ListOfBytes
type ConstString ¶
type ConstString interface { String }
func StringConst ¶
func StringConst(v string) ConstString
StringConst returns a new constant function of type String
type ConstStrings ¶
type ConstStrings interface { Strings }
func StringsConst ¶
func StringsConst(v []string) ConstStrings
StringsConst returns a new constant function of type Strings
type ConstUints ¶
type ConstUints interface { Uints }
func UintsConst ¶
func UintsConst(v []uint64) ConstUints
UintsConst returns a new constant function of type Uints
type Double ¶
Double is an interface that represents a function that returns a double.
func ElemDoubles ¶
ElemDoubles returns a function that returns the n'th element of the list.
func PrintDouble ¶
PrintDouble returns a function that prints out the value of the argument function and returns its value.
func TrimDouble ¶
TrimDouble turns functions into constants, if they can be evaluated at compile time.
type Doubles ¶
Doubles is an interface that represents a function that returns a list of doubles.
func NewListOfDouble ¶
NewListOfDouble returns a new function that when evaluated returns a list of type Double
func PrintDoubles ¶
PrintDoubles returns a function that prints out the value of the argument function and returns its value.
func RangeDoubles ¶
RangeDoubles returns a function that returns a range of elements from a list.
func TrimDoubles ¶
TrimDoubles turns functions into constants, if they can be evaluated at compile time.
type ErrContainsListNotConst ¶
type ErrContainsListNotConst struct{}
func (ErrContainsListNotConst) Error ¶
func (ErrContainsListNotConst) Error() string
type ErrNotBoolConst ¶
type ErrNotBoolConst struct{}
func (ErrNotBoolConst) Error ¶
func (this ErrNotBoolConst) Error() string
type ErrNotBytesConst ¶
type ErrNotBytesConst struct{}
func (ErrNotBytesConst) Error ¶
func (this ErrNotBytesConst) Error() string
type ErrNotDoubleConst ¶
type ErrNotDoubleConst struct{}
func (ErrNotDoubleConst) Error ¶
func (this ErrNotDoubleConst) Error() string
type ErrNotIntConst ¶
type ErrNotIntConst struct{}
func (ErrNotIntConst) Error ¶
func (this ErrNotIntConst) Error() string
type ErrNotStringConst ¶
type ErrNotStringConst struct{}
func (ErrNotStringConst) Error ¶
func (this ErrNotStringConst) Error() string
type ErrNotUintConst ¶
type ErrNotUintConst struct{}
func (ErrNotUintConst) Error ¶
func (this ErrNotUintConst) Error() string
type ErrRange ¶
ErrRange specifies a range error that tried to slice a list where the first specified index is bigger than the last specified index.
type ErrRangeCheck ¶
ErrRangeCheck specifies a range check error that resulted while trying to access an element in a list.
func NewRangeCheckErr ¶
func NewRangeCheckErr(index, l int) ErrRangeCheck
NewRangeCheckErr returns a range check error
func (ErrRangeCheck) Error ¶
func (this ErrRangeCheck) Error() string
type Func ¶
type Func interface { Comparable HasVariable() bool }
type Int ¶
Int is an interface that represents a function that returns an int.
func LenDoubles ¶
LenDoubles returns a function that returns the length of a list of type Doubles
func LenListOfBytes ¶
func LenListOfBytes(e ListOfBytes) Int
LenListOfBytes returns a function that returns the length of a list of type ListOfBytes
func LenStrings ¶
LenStrings returns a function that returns the length of a list of type Strings
type Ints ¶
Ints is an interface that represents a function that returns a list of ints.
func NewListOfInt ¶
NewListOfInt returns a new function that when evaluated returns a list of type Int
func PrintInts ¶
PrintInts returns a function that prints out the value of the argument function and returns its value.
type ListOf ¶
type ListOf interface {
IsListOf()
}
ListOf is an interface that when implemented specifies that this function does not only return a typed list, but is a typed list.
type ListOfBytes ¶
ListOfBytes is an interface that represents a function that returns a list of []byte.
func NewListOfBytes ¶
func NewListOfBytes(v []Bytes) ListOfBytes
NewListOfBytes returns a new function that when evaluated returns a list of type Bytes
func PrintListOfBytes ¶
func PrintListOfBytes(e ListOfBytes) ListOfBytes
PrintListOfBytes returns a function that prints out the value of the argument function and returns its value.
func RangeListOfBytes ¶
func RangeListOfBytes(list ListOfBytes, from, to Int) ListOfBytes
RangeListOfBytes returns a function that returns a range of elements from a list.
func TrimListOfBytes ¶
func TrimListOfBytes(f ListOfBytes) ListOfBytes
TrimListOfBytes turns functions into constants, if they can be evaluated at compile time.
type Maker ¶
type Maker struct { Name string In []types.Type InConst []bool Out types.Type // contains filtered or unexported fields }
func GetMaker ¶
Which returns the Funk (function creator) of the function given the function name and parameter types.
func (*Maker) NewBool ¶
NewBool dynamically creates and asserts the returning function is of type Bool. This function is used by the compose library to compile functions together.
func (*Maker) NewBools ¶
NewBools dynamically creates and asserts the returning function is of type Bools. This function is used by the compose library to compile functions together.
func (*Maker) NewBytes ¶
NewBytes dynamically creates and asserts the returning function is of type Bytes. This function is used by the compose library to compile functions together.
func (*Maker) NewDouble ¶
NewDouble dynamically creates and asserts the returning function is of type Double. This function is used by the compose library to compile functions together.
func (*Maker) NewDoubles ¶
NewDoubles dynamically creates and asserts the returning function is of type Doubles. This function is used by the compose library to compile functions together.
func (*Maker) NewInt ¶
NewInt dynamically creates and asserts the returning function is of type Int. This function is used by the compose library to compile functions together.
func (*Maker) NewInts ¶
NewInts dynamically creates and asserts the returning function is of type Ints. This function is used by the compose library to compile functions together.
func (*Maker) NewListOfBytes ¶
func (f *Maker) NewListOfBytes(values ...interface{}) (ListOfBytes, error)
NewListOfBytes dynamically creates and asserts the returning function is of type ListOfBytes. This function is used by the compose library to compile functions together.
func (*Maker) NewString ¶
NewString dynamically creates and asserts the returning function is of type String. This function is used by the compose library to compile functions together.
func (*Maker) NewStrings ¶
NewStrings dynamically creates and asserts the returning function is of type Strings. This function is used by the compose library to compile functions together.
func (*Maker) NewUint ¶
NewUint dynamically creates and asserts the returning function is of type Uint. This function is used by the compose library to compile functions together.
type SetContext ¶
type SetContext interface {
SetContext(*Context)
}
type String ¶
String is an interface that represents a function that returns a string.
func ElemStrings ¶
ElemStrings returns a function that returns the n'th element of the list.
func PrintString ¶
PrintString returns a function that prints out the value of the argument function and returns its value.
func TrimString ¶
TrimString turns functions into constants, if they can be evaluated at compile time.
type Strings ¶
Strings is an interface that represents a function that returns a list of strings.
func NewListOfString ¶
NewListOfString returns a new function that when evaluated returns a list of type String
func PrintStrings ¶
PrintStrings returns a function that prints out the value of the argument function and returns its value.
func RangeStrings ¶
RangeStrings returns a function that returns a range of elements from a list.
func TrimStrings ¶
TrimStrings turns functions into constants, if they can be evaluated at compile time.
type Uint ¶
Uint is an interface that represents a function that returns a uint.
type Uints ¶
Uints is an interface that represents a function that returns a list of uints.
func NewListOfUint ¶
NewListOfUint returns a new function that when evaluated returns a list of type Uint
func PrintUints ¶
PrintUints returns a function that prints out the value of the argument function and returns its value.
func RangeUints ¶
RangeUints returns a function that returns a range of elements from a list.