Documentation
¶
Index ¶
- Variables
- type Edge
- func (c *Edge) AttrsMap() map[string]string
- func (c *Edge) DeleteAttr(key string)
- func (e *Edge) From() *Node
- func (c *Edge) GetAttr(key string) (string, bool)
- func (c *Edge) ReplaceAttrs(m map[string]string)
- func (c *Edge) SetAttr(key, value string) error
- func (e *Edge) To() *Node
- func (e *Edge) Type() string
- type Lilgraph
- func (g *Lilgraph) AddEdge(from *Node, to *Node, edgeType string) (*Edge, bool, error)
- func (g *Lilgraph) AddNode(id string, typ string) (*Node, bool, error)
- func (g *Lilgraph) DeleteEdge(e *Edge) bool
- func (g *Lilgraph) DeleteNode(n *Node) bool
- func (g *Lilgraph) Edges() iter.Seq[*Edge]
- func (g *Lilgraph) Find(id string) *Node
- func (g *Lilgraph) FindEdge(from *Node, to *Node, edgeType string) (*Edge, bool)
- func (g *Lilgraph) FindEdges(from *Node, to *Node) iter.Seq[*Edge]
- func (g *Lilgraph) MarshalText() (text []byte, err error)
- func (g *Lilgraph) Nodes() iter.Seq[*Node]
- func (g *Lilgraph) SortTopo() error
- type Node
- func (c *Node) AttrsMap() map[string]string
- func (c *Node) DeleteAttr(key string)
- func (n *Node) EdgesFrom() iter.Seq[*Edge]
- func (n *Node) EdgesTo() iter.Seq[*Edge]
- func (c *Node) GetAttr(key string) (string, bool)
- func (n *Node) Id() string
- func (c *Node) ReplaceAttrs(m map[string]string)
- func (c *Node) SetAttr(key, value string) error
- func (c *Node) Type() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidId = errors.New("invalid node id") ErrParseFail = errors.New("failed parsing") ErrLoop = errors.New("cannot create edge from a node to itself") ErrBadParseType = errors.New("unexpected parser result type") ErrTypeChange = errors.New("nodes cannot be redefined with a different type") ErrTypeInAttrs = errors.New("attributes called 'type' aren't allowed to avoid ambiguity") ErrCyclic = errors.New("graph is cyclic") )
Functions ¶
This section is empty.
Types ¶
type Edge ¶
type Edge struct {
// contains filtered or unexported fields
}
func (*Edge) DeleteAttr ¶
func (c *Edge) DeleteAttr(key string)
func (*Edge) ReplaceAttrs ¶
type Lilgraph ¶
type Lilgraph struct {
// contains filtered or unexported fields
}
func (*Lilgraph) DeleteEdge ¶
func (*Lilgraph) DeleteNode ¶
func (*Lilgraph) MarshalText ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) DeleteAttr ¶
func (c *Node) DeleteAttr(key string)
func (*Node) ReplaceAttrs ¶
Click to show internal directories.
Click to hide internal directories.