graph

package
v0.0.0-...-3cdc9e2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinStyles

func JoinStyles(styles []Style, sep string) string

func Print

func Print(w io.Writer, groups []NodeGroup)

Print will print the given nodes as a dot-graph

Types

type Category

type Category uint8
const (
	CategoryNone Category = iota
	CategoryService1
	CategoryService2
	CategoryService3
	CategoryService4
	CategoryVault
	CategoryCadence
	CategoryUserInterface
	CategoryTool
	CategoryDatabase
	CategoryStorage
	CategoryScript

	// this category is reserved for volumes
	CategoryVolume
)

func DeterminteServiceCategory

func DeterminteServiceCategory(service, label string) Category

DetermineCategory tries to guess the category based on the service name & label (if provided)

func (Category) String

func (d Category) String() string

type Color

type Color string
const (
	Blue   Color = "/blues8/7"
	Green  Color = "/bugn8/7"
	Teal   Color = "/brbg8/7"
	Red    Color = "/orrd8/7"
	Grey   Color = "/greys8/7"
	Purple Color = "/bupu8/7"

	DarkBlue   Color = "/blues8/8"
	DarkGreen  Color = "/bugn8/8"
	DarkTeal   Color = "/brbg8/8"
	DarkRed    Color = "/orrd8/8"
	DarkGrey   Color = "/greys8/8"
	DarkPurple Color = "/bupu8/8"

	White Color = "white"
)

type Decorations

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

type Node

type Node struct {
	Name                string
	Label               string
	Category            Category
	VolumeMounts        []compose.VolumeMount
	ServiceDependencies []compose.ServiceDependency
}

func NodesFromFile

func NodesFromFile(file compose.File) []Node

type NodeGroup

type NodeGroup struct {
	Label string
	Nodes []Node
}

type Palette

type Palette struct {
	ColorFill   Color
	ColorBorder Color
	ColorFont   Color
}

type Shape

type Shape string
const (
	Box      Shape = "box"
	Diamond  Shape = "diamond"
	Cylinder Shape = "cylinder"
	Note     Shape = "note"
	Octagon  Shape = "octagon"
)

type Style

type Style string
const (
	Rounded Style = "rounded"
	Filled  Style = "filled"
	Bold    Style = "bold"
	Dotted  Style = "dotted"
	Dashed  Style = "dashed"
)

Jump to

Keyboard shortcuts

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