dixrender

package
v2.0.0-beta.12 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DotRenderer

type DotRenderer struct {
	Buf *bytes.Buffer // Exported for testing
	// contains filtered or unexported fields
}

DotRenderer implements DOT format graph rendering

func NewDotRenderer

func NewDotRenderer() *DotRenderer

func (*DotRenderer) BeginSubgraph

func (d *DotRenderer) BeginSubgraph(name, label string)

func (*DotRenderer) EndSubgraph

func (d *DotRenderer) EndSubgraph()

func (*DotRenderer) FormatAttrs

func (d *DotRenderer) FormatAttrs(attrs map[string]string) string

FormatAttrs formats attributes map into DOT format string

func (*DotRenderer) RenderEdge

func (d *DotRenderer) RenderEdge(from, to string, attrs map[string]string)

func (*DotRenderer) RenderNode

func (d *DotRenderer) RenderNode(name string, attrs map[string]string)

func (*DotRenderer) String

func (d *DotRenderer) String() string

func (*DotRenderer) Writef

func (d *DotRenderer) Writef(format string, args ...any)

Writef writes a formatted string to the renderer buffer

type Graph

type Graph struct {
	Objects       string `json:"objects"`
	Providers     string `json:"providers"`
	ProviderTypes string `json:"provider_types"`
}

Graph represents dependency graphs in DOT format

type GraphOptions

type GraphOptions struct {
	// MaxDepth limits the depth of dependencies to show (0 = unlimited)
	MaxDepth int

	// GroupByPackage enables grouping nodes by package
	GroupByPackage bool

	// ShowStructFields controls whether to show struct field dependencies
	ShowStructFields bool

	// FilterPackages allows filtering by specific packages
	FilterPackages []string
}

GraphOptions holds configuration options for graph rendering

func NewGraphOptions

func NewGraphOptions() *GraphOptions

NewGraphOptions creates GraphOptions with sensible defaults

func (*GraphOptions) ShouldIncludeType

func (opts *GraphOptions) ShouldIncludeType(typ string) bool

ShouldIncludeType checks if a type should be included in the graph based on filters

Jump to

Keyboard shortcuts

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