kbtesting

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddElement

func AddElement(t *testing.T, g knowledgebase.Graph, e any) (failed bool)

AddElement is a utility function for adding an element to a graph. See MakeKB for more information on supported element types. Returns whether adding the element failed.

func MakeKB

func MakeKB(t *testing.T, elements ...any) *knowledgebase.KnowledgeBase

MakeKB is a utility function for creating a KnowledgeBase from a list of elements which can be of types: - ResourceTemplate, *ResourceTemplate : adds the given resource template - EdgeTemplate, *EdgeTemplate : adds the given edge template - []*EdgeTemplate : adds all the edges in the list - string : parses the string as either a QualifiedTypeName or a path of QualifiedTypeNames and adds as empty templates

func StringToGraphElement

func StringToGraphElement(e string) (any, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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