dot

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicEdge added in v1.1.0

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

func (BasicEdge) Render added in v1.1.0

func (r BasicEdge) Render() string

type BasicGraph added in v1.1.0

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

BasicGraph renders graph to Dot without colors with simples syntax without HTML. TODO: consider adding colors in background https://stackoverflow.com/questions/17765301/-dot-how-to-change-the-colour-of-one-record-in-multi-record-shape

func NewBasicGraph added in v1.1.0

func NewBasicGraph(
	graph graph.Graph,
	orientation Orientation,
) BasicGraph

NewBasicGraph creates renderable graph from graph data

func NewColoredGraph added in v1.1.0

func NewColoredGraph(
	graph graph.Graph,
	orientation Orientation,
	colorer Colorer,
) BasicGraph

NewColoredGraph creates renderable colored graph from graph data

func (BasicGraph) Render added in v1.1.0

func (r BasicGraph) Render() string

type BasicNodeLabel added in v1.1.0

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

BasicNodeLabel is label content for non-colorized Graphviz node

func (BasicNodeLabel) Render added in v1.1.0

func (r BasicNodeLabel) Render() string

type Color

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

Color transforms Go color to Graphviz RGBA format which is slightly odd

func (Color) Render added in v1.1.0

func (s Color) Render() string

type ColoredNodeLabel added in v1.1.0

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

ColoredNodeLabel is label content for colorized Graphviz node

func (ColoredNodeLabel) Render added in v1.1.0

func (r ColoredNodeLabel) Render() string

type Colorer added in v1.1.0

type Colorer interface {
	Color(k string, v interface{}) color.Color
}

type Node added in v1.1.0

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

func (Node) Render added in v1.1.0

func (r Node) Render() string

type NodeShape added in v1.1.0

type NodeShape string

NodeShape should match Graphviz values

const (
	NoneShape   NodeShape = "none"
	RecordShape NodeShape = "record"
)

type Orientation added in v1.1.0

type Orientation string

Orientation should match Graphviz allowed values

const (
	LR Orientation = "LR"
	TB Orientation = "TB"
)

type Renderable added in v1.1.0

type Renderable interface {
	Render() string
}

type Value added in v1.1.0

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

Value coerces to json.Number and tries to avoid adding decimal points to integers

func (Value) Render added in v1.1.0

func (r Value) Render() string

Jump to

Keyboard shortcuts

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