common

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocumentParser

type DocumentParser interface {
	// Parse breaks out the document into the graph components
	Parse(ctx context.Context, doc *processor.Document) error
	// GetIdentities gets the identity node from the document if they exist
	GetIdentities(ctx context.Context) []assembler.IdentityNode
	// CreateNodes creates the GuacNode for the graph inputs
	CreateNodes(ctx context.Context) []assembler.GuacNode
	// CreateEdges creates the GuacEdges that form the relationship for the graph inputs
	CreateEdges(ctx context.Context, foundIdentities []assembler.IdentityNode) []assembler.GuacEdge
}

type GraphBuilder

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

GraphBuilder creates the assembler inputs based on the documents being parsed

func NewGenericGraphBuilder

func NewGenericGraphBuilder(docParser DocumentParser, foundIdentities []assembler.IdentityNode) *GraphBuilder

NewGenericGraphBuilder initializes the graphbulder

func (*GraphBuilder) CreateAssemblerInput

func (b *GraphBuilder) CreateAssemblerInput(ctx context.Context, foundIdentities []assembler.IdentityNode) assembler.AssemblerInput

CreateAssemblerInput creates the GuacNodes and GuacEdges that are needed by the assembler

func (*GraphBuilder) GetIdentities

func (b *GraphBuilder) GetIdentities() []assembler.IdentityNode

GetIdentities returns the identity that is found when parsing a document

Jump to

Keyboard shortcuts

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