dnsgraph

package
v4.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IncomingEdge edgeDirection = iota
	OutgoingEdge
)

Variables

This section is empty.

Functions

func GetRecordsNamesForGraphables

func GetRecordsNamesForGraphables[T Graphable](graphables []T) []string

Types

type DNSGraph

type DNSGraph[T Graphable] struct {
	All  dnsGraphNodes[T]
	Tree *dnstree.DomainTree[dnsGraphNodes[T]]
}

func CreateGraph

func CreateGraph[T Graphable](entries []T) *DNSGraph[T]

func (*DNSGraph[T]) AddEdge

func (graph *DNSGraph[T]) AddEdge(sourceNode *DNSGraphNode[T], dependency Dependency)

func (*DNSGraph[T]) AddNode

func (graph *DNSGraph[T]) AddNode(data T)

func (*DNSGraph[T]) RemoveNode

func (graph *DNSGraph[T]) RemoveNode(toRemove *DNSGraphNode[T])

type DNSGraphEdge

type DNSGraphEdge[T Graphable] struct {
	Dependency Dependency
	Node       *DNSGraphNode[T]
	Direction  edgeDirection
}

type DNSGraphEdges

type DNSGraphEdges[T Graphable] []DNSGraphEdge[T]

func (DNSGraphEdges[T]) Contains

func (edges DNSGraphEdges[T]) Contains(toFind *DNSGraphNode[T], direction edgeDirection) bool

func (DNSGraphEdges[T]) RemoveNode

func (edges DNSGraphEdges[T]) RemoveNode(toRemove *DNSGraphNode[T]) DNSGraphEdges[T]

type DNSGraphNode

type DNSGraphNode[T Graphable] struct {
	Data  T
	Edges DNSGraphEdges[T]
}

type Dependency

type Dependency struct {
	NameFQDN string
	Type     DependencyType
}

func CreateDependencies

func CreateDependencies(dependencyFQDNs []string, dependencyType DependencyType) []Dependency

type DependencyType

type DependencyType uint8
const (
	ForwardDependency DependencyType = iota
	BackwardDependency
)

type Graphable

type Graphable interface {
	GetType() NodeType
	GetName() string
	GetDependencies() []Dependency
}

type NodeType

type NodeType uint8
const (
	Change NodeType = iota
	Report
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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