Documentation
¶
Overview ¶
Package knowledge provides protocol knowledge graph.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Edge ¶
type Edge struct {
From string `json:"from"`
To string `json:"to"`
Relation RelationType `json:"relation"`
}
Edge represents a knowledge graph edge.
type Graph ¶
Graph represents a protocol knowledge graph.
func (*Graph) AddEdge ¶
func (g *Graph) AddEdge(from, to string, rel RelationType)
AddEdge adds an edge.
type Node ¶
type Node struct {
ID string `json:"id"`
Type string `json:"type"` // protocol, rfc, org, usecase
Name string `json:"name"`
}
Node represents a knowledge graph node.
type RelationType ¶
type RelationType string
RelationType represents a relationship type.
const ( RelEncapsulates RelationType = "encapsulates" RelDefinedBy RelationType = "defined_by" RelUsedIn RelationType = "used_in" RelSucceeds RelationType = "succeeds" )
Click to show internal directories.
Click to hide internal directories.