Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Functions ¶
func Functions() map[string]govaluate.ExpressionFunction
Functions return function registry
Types ¶
type CustomError ¶
type CustomError struct {
EvalError EvalError
}
returned as err
func (*CustomError) Error ¶
func (e *CustomError) Error() string
type EvalError ¶
type EvalError struct { Source string `json:"source"` Expression string `json:"expression"` Message string `json:"message"` }
Eval or parsing errors
type ParsedEquations ¶
type ParsedEquations struct { RawEquations map[string]string Equations map[string]govaluate.EvaluableExpression Dependencies map[string][]string Errors []EvalError }
ParsedEquations raw equation, EvaluableExpression and dependencies
func Parse ¶
func Parse(rawEquations map[string]string, functions map[string]govaluate.ExpressionFunction) ParsedEquations
Parse string equation in a EvaluableExpressions and their dependencies
func (ParsedEquations) Solve ¶
func (parsedEquations ParsedEquations) Solve() (map[string]interface{}, error)
Solve the equation in correct order and return map of values
Click to show internal directories.
Click to hide internal directories.