edge

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

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

Edge represents a directed edge in the OpenGraph. Follows BloodHound OpenGraph schema requirements with start/end nodes, kind, and properties. All edges are directed and one-way as per BloodHound requirements.

Sources: - https://bloodhound.specterops.io/opengraph/schema#edges - https://bloodhound.specterops.io/opengraph/schema#minimal-working-json

func NewEdge

func NewEdge(startNodeID string, endNodeID string, kind string, p *properties.Properties) (*Edge, error)

NewEdge creates a new Edge instance

func (*Edge) Equal

func (e *Edge) Equal(other *Edge) bool

Equal checks if two edges are equal based on their start, end, and kind

func (*Edge) GetEndNodeID

func (e *Edge) GetEndNodeID() string

GetEndNodeID returns the end node ID

func (*Edge) GetKind

func (e *Edge) GetKind() string

GetKind returns the edge kind/type

func (*Edge) GetProperties

func (e *Edge) GetProperties() *properties.Properties

GetProperties returns the properties of the edge

func (*Edge) GetProperty

func (e *Edge) GetProperty(key string, defaultVal ...interface{}) interface{}

GetProperty gets a property from the edge

func (*Edge) GetStartNodeID

func (e *Edge) GetStartNodeID() string

GetStartNodeID returns the start node ID

func (*Edge) RemoveProperty

func (e *Edge) RemoveProperty(key string)

RemoveProperty removes a property from the edge

func (*Edge) SetProperty

func (e *Edge) SetProperty(key string, value interface{})

SetProperty sets a property on the edge

func (*Edge) String

func (e *Edge) String() string

String returns a string representation of the edge

func (*Edge) ToDict

func (e *Edge) ToDict() map[string]interface{}

ToDict converts edge to map for JSON serialization

Jump to

Keyboard shortcuts

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