Documentation
¶
Index ¶
- Variables
- func CreateAndConnectOperator(insName string, def core.OperatorDef, ordered bool) (*core.Operator, error)
- func ParseJSONOperatorDef(defStr string) (core.OperatorDef, error)
- func ParsePortReference(refStr string, par *core.Operator) (*core.Port, error)
- func ParseTypeDef(defStr string) core.TypeDef
- func ParseYAMLOperatorDef(defStr string) (core.OperatorDef, error)
- func ParseYAMLPackageDef(defStr string) (core.PackageDef, error)
- func TestOperator(testDataFilePath string, writer io.Writer, failFast bool) (int, int, error)
- type Environ
- func (e *Environ) BuildAndCompileOperator(opFilePath string, gens map[string]*core.TypeDef, props map[string]interface{}) (*core.Operator, error)
- func (e *Environ) GetFilePathWithFileEnding(relFilePath string, enforcedPath string) (string, string, error)
- func (e *Environ) GetOperatorPath(operator string, currDir string) (string, error)
- func (e *Environ) IsLocalOperator(operator string) bool
- func (e *Environ) ListOperatorNames() ([]string, error)
- func (e *Environ) ReadOperatorDef(opDefFilePath string, pathsRead []string) (core.OperatorDef, error)
- func (e *Environ) ReadPackageDef(pkgDefFilePath string) (core.PackageDef, error)
- func (e *Environ) WorkingDir() string
- type TestCaseDef
- type TestDef
Constants ¶
This section is empty.
Variables ¶
View Source
var FILE_ENDINGS = []string{".yaml", ".json"} // Order of endings matters!
Functions ¶
func ParseJSONOperatorDef ¶
func ParseJSONOperatorDef(defStr string) (core.OperatorDef, error)
func ParsePortReference ¶
func ParseTypeDef ¶
func ParseYAMLOperatorDef ¶
func ParseYAMLOperatorDef(defStr string) (core.OperatorDef, error)
func ParseYAMLPackageDef ¶ added in v0.1.14
func ParseYAMLPackageDef(defStr string) (core.PackageDef, error)
func TestOperator ¶
TestOperator reads a file with test data and its corresponding operator and performs the tests. It returns the number of failed and succeeded tests and and error in case something went wrong. Test failures do not lead to an error. Test failures are printed to the writer.
Types ¶
type Environ ¶
type Environ struct {
// contains filtered or unexported fields
}
func NewEnviron ¶
func NewEnviron() *Environ
func NewTestEnviron ¶ added in v0.1.5
func (*Environ) BuildAndCompileOperator ¶
func (*Environ) GetFilePathWithFileEnding ¶
func (*Environ) GetOperatorPath ¶
func (*Environ) IsLocalOperator ¶
func (*Environ) ListOperatorNames ¶
func (*Environ) ReadOperatorDef ¶
func (e *Environ) ReadOperatorDef(opDefFilePath string, pathsRead []string) (core.OperatorDef, error)
ReadOperatorDef reads the operator definition for the given file.
func (*Environ) ReadPackageDef ¶ added in v0.1.14
func (e *Environ) ReadPackageDef(pkgDefFilePath string) (core.PackageDef, error)
ReadOperatorDef reads the operator definition for the given file.
func (*Environ) WorkingDir ¶
type TestCaseDef ¶
type TestCaseDef struct {
Name string `json:"name" yaml:"name"`
Description string `json:"description" yaml:"description"`
Generics map[string]*core.TypeDef `json:"generics" yaml:"generics"`
Properties map[string]interface{} `json:"properties" yaml:"properties"`
Data struct {
In []interface{} `json:"in" yaml:"in"`
Out []interface{} `json:"out" yaml:"out"`
}
}
type TestDef ¶
type TestDef struct {
OperatorFile string `json:"operatorFile" yaml:"operatorFile"`
Description string `json:"description" yaml:"description"`
TestCases []TestCaseDef `json:"testCases" yaml:"testCases"`
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.