Documentation ¶
Index ¶
- func MakeCodeboxSet(codeboxMap map[string]BoxFunction) map[string]*Codebox
- func Run(t *testing.T, codeboxSet map[string]*Codebox, dataFileSlice []File)
- type BoxFunction
- type Codebox
- type Dict
- type FailStatus
- type File
- type Nodule
- func (n *Nodule) Clone() (m Nodule)
- func (n Nodule) Errorf(format string, a ...interface{}) error
- func (n Nodule) GetChildren() (children []focustree.Node)
- func (n Nodule) GetFlag() focustree.FlagType
- func (n *Nodule) Initialize() (err error)
- func (n *Nodule) InitializeFile() (err error)
- func (n Nodule) IsLeaf() bool
- func (n *Nodule) Populate(codeboxSet map[string]*Codebox, codebox *Codebox, input map[string]interface{}, ...) error
- func (n Nodule) Warning(info string)
- type S
- type TreeRoot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeCodeboxSet ¶
func MakeCodeboxSet(codeboxMap map[string]BoxFunction) map[string]*Codebox
MakeCodeboxSet names the box functions by their mapping key, making codeboxes
Types ¶
type BoxFunction ¶
BoxFunction is the type that user-defined functions must implement in codeboxes
type Codebox ¶
type Codebox struct { // Name is the name given when registring the codebox Name string // BoxFunction is the function which adapts to the code. BoxFunction BoxFunction }
Codebox is a function with a name to be matched with data from the yaml files
type File ¶
File represents a file by its path and content
func ReadLocalFile ¶
ReadLocalFile reads a file from the file system and returns a specimen.File
func VirtualFile ¶
VirtualFile creates a specimen.File from scratch
func VirtualFileDedent ¶
VirtualFileDedent dedents the givent content and creates a specimen.File
type Nodule ¶
type Nodule struct { File *File Mapping *yaml.Node // Kind is one of "File", "Node", "Slab" -- Kind is used in error reports Kind string // Location is a clickable link to the beginning of the nodule Location string Flag focustree.FlagType // Name is an indicative name for the nodule Name string Children []Nodule Codebox *Codebox Input map[string]interface{} Matrix map[string][]interface{} }
Nodule is a node inside a file
func (Nodule) GetChildren ¶
func (*Nodule) Initialize ¶
Initialize tries to compute the properties of a Nodule necessary to perform the slab selection.
func (*Nodule) InitializeFile ¶
type S ¶
type S struct {
// contains filtered or unexported fields
}
S is a context structure for the Specimen package
func (*S) ExpectEqual ¶
ExpectEqual test if the two given values are equal data structures
type TreeRoot ¶
type TreeRoot []Nodule
TreeRoot is used to gather the files for exploration by the focustree package