encoding

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: BSD-3-Clause Imports: 1 Imported by: 87

Documentation

Overview

Package encoding provides a common graph encoding API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Key, Value string
}

Attribute is an encoded key value attribute pair use in graph encoding.

type AttributeSetter

type AttributeSetter interface {
	SetAttribute(Attribute) error
}

AttributeSetter is implemented by types that can set an encoded graph attribute.

type Attributer

type Attributer interface {
	Attributes() []Attribute
}

Attributer defines graph.Node or graph.Edge values that can specify graph attributes.

type Attributes added in v0.11.0

type Attributes []Attribute

Attributes is a helper type providing simple attribute handling.

func (*Attributes) Attributes added in v0.11.0

func (a *Attributes) Attributes() []Attribute

Attributes returns all of the receiver's attributes.

func (*Attributes) SetAttribute added in v0.11.0

func (a *Attributes) SetAttribute(attr Attribute) error

SetAttribute sets attr in the receiver. Calling SetAttribute with an Attribute with a Key that is in the collection replaces the existing value and calling with an empty Value removes the attribute from the collection if it exists. SetAttribute always returns nil.

type Builder

type Builder interface {
	graph.Graph
	graph.Builder
}

Builder is a graph that can have user-defined nodes and edges added.

type MultiBuilder

type MultiBuilder interface {
	graph.Multigraph
	graph.MultigraphBuilder
}

MultiBuilder is a graph that can have user-defined nodes and edges added.

Directories

Path Synopsis
Package digraph6 implements graphs specified by digraph6 strings.
Package digraph6 implements graphs specified by digraph6 strings.
Package dot implements GraphViz DOT marshaling and unmarshaling of graphs.
Package dot implements GraphViz DOT marshaling and unmarshaling of graphs.
Package graph6 implements graphs specified by graph6 strings.
Package graph6 implements graphs specified by graph6 strings.
Package graphql implements JSON marshaling and unmarshaling of graph as used by GraphQL
Package graphql implements JSON marshaling and unmarshaling of graph as used by GraphQL

Jump to

Keyboard shortcuts

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