types

package
v0.0.0-...-001399e Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Id         int64
	Labels     []string
	Properties map[string]any
}

Node is a representation of a neo4j driver Node

var (
	EmptyNode  Node   = Node{}
	EmptyNodes []Node = []Node{}
)

func NewNode

func NewNode(id int64, labels []string, props map[string]any) (n Node)

func (*Node) Attributes

func (n *Node) Attributes() (attrs []encoding.Attribute)

func (Node) DOTID

func (n Node) DOTID() string

DOTIDD allows Node to have better labels in dot files

func (Node) ID

func (n Node) ID() int64

ID allows Node to satisfy the interface requirements of a gonum graph.Node

func (Node) String

func (n Node) String() string

String prints all labels of a Node in a neo4j format

type RelationshipEdge

type RelationshipEdge struct {
	Id         int64
	Start      Node
	End        Node
	Types      []string
	Properties map[string]any
	// contains filtered or unexported fields
}

RelationshipEdge is a representation of a neo4j driver RelationshipEdge

var (
	EmptyRelationshipEdge  RelationshipEdge   = RelationshipEdge{}
	EmptyRelationshipEdges []RelationshipEdge = []RelationshipEdge{}
)

func NewRelationshipEdge

func NewRelationshipEdge(id int64, from, to Node, types []string, props map[string]any) RelationshipEdge

func (*RelationshipEdge) Attributes

func (r *RelationshipEdge) Attributes() (attrs []encoding.Attribute)

func (RelationshipEdge) From

func (r RelationshipEdge) From() graph.Node

From allows a neo4j Relationship to satisfy the interface requirements of a gonum graph.Edge

func (RelationshipEdge) ReversedEdge

func (r RelationshipEdge) ReversedEdge() graph.Edge

ReveresedEdge allows a neo4j Relationship to satisfy the interface requirements of a gonum graph.Edge

func (*RelationshipEdge) String

func (r *RelationshipEdge) String() string

String prints all types of a Relationship in neo4j format

func (RelationshipEdge) To

func (r RelationshipEdge) To() graph.Node

To allows a neo4j Relationship to satisfy the interface requirements of a gonum graph.Edge

func (RelationshipEdge) Weight

func (r RelationshipEdge) Weight() float64

type RelationshipLine

type RelationshipLine struct {
	Id         int64
	Start      Node
	End        Node
	Types      []string
	Properties map[string]any
	// contains filtered or unexported fields
}
var (
	EmptyRelationshipLine  RelationshipLine   = RelationshipLine{}
	EmptyRelationshipLines []RelationshipLine = []RelationshipLine{}
)

func NewRelationshipLine

func NewRelationshipLine(id int64, from, to Node, types []string, props map[string]any) RelationshipLine

func (*RelationshipLine) Attributes

func (r *RelationshipLine) Attributes() (attrs []encoding.Attribute)

func (RelationshipLine) From

func (r RelationshipLine) From() graph.Node

From allows a neo4j Relationship to satisfy the interface requirements of a gonum graph.Line

func (RelationshipLine) ID

func (r RelationshipLine) ID() int64

ID allows a neo4j Relationship to satisfy the interface requirements of a gonum graph.Line

func (RelationshipLine) ReversedLine

func (r RelationshipLine) ReversedLine() graph.Line

ReversedLine allows a neo4j Relationship to satisfy the interface requirements of a gonum graph.Line

func (*RelationshipLine) String

func (r *RelationshipLine) String() string

String prints all types of a Relationship in neo4j format

func (RelationshipLine) To

func (r RelationshipLine) To() graph.Node

To allows a neo4j Relationship to satisfy the interface requirements of a gonum graph.Line

func (RelationshipLine) Weight

func (r RelationshipLine) Weight() float64

Jump to

Keyboard shortcuts

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