engine

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2018 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cell

type Cell struct {
	// contains filtered or unexported fields
}

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine the F1 Engine

func NewEngine

func NewEngine(xlFile *xlsx.File) *Engine

NewEngine Create a new g to execute formula suitable for xlFile

func (*Engine) EvalFormula

func (g *Engine) EvalFormula(f *f1F.Formula) (value interface{}, valueType f1F.NodeType)

EvalFormula Execute formula by running AST nodes as necessary

func (*Engine) Execute

func (g *Engine) Execute(inputs map[string]string, outputs *map[string]OutParam) (err error)

Execute the g

func (*Engine) GetCell

func (g *Engine) GetCell(cellIDString string) (cell Cell, err error)

func (*Engine) GetRange

func (g *Engine) GetRange(rangeIDString string) (cellRange Range, err error)

func (*Engine) Inspect

func (g *Engine) Inspect() map[string]string

func (*Engine) SetCell

func (g *Engine) SetCell(cellID string, value interface{})

SetCell Set value for a cell

type EngineError

type EngineError struct {
	// contains filtered or unexported fields
}

func Error

func Error(message string) EngineError

type Invoke

type Invoke struct {
	// contains filtered or unexported fields
}

type OutParam

type OutParam struct {
	Format string
	Value  interface{}
}

func NewOutParam

func NewOutParam(format string) OutParam

func (OutParam) MarshalJSON added in v1.0.2

func (outParam OutParam) MarshalJSON() ([]byte, error)

MarshalJSON serializes out param

type Range

type Range struct {
	// contains filtered or unexported fields
}

func (*Range) To2DSlice

func (cellRange *Range) To2DSlice() (cells [][]Cell, ok bool)

func (*Range) ToSlice

func (cellRange *Range) ToSlice() (cells []Cell, ok bool)

ToSlice Get a copy of the 1D Range

Jump to

Keyboard shortcuts

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