Documentation
¶
Index ¶
- type DotRenderer
- func (d *DotRenderer) BeginSubgraph(name, label string)
- func (d *DotRenderer) EndSubgraph()
- func (d *DotRenderer) FormatAttrs(attrs map[string]string) string
- func (d *DotRenderer) RenderEdge(from, to string, attrs map[string]string)
- func (d *DotRenderer) RenderNode(name string, attrs map[string]string)
- func (d *DotRenderer) String() string
- func (d *DotRenderer) Writef(format string, args ...any)
- type Graph
- type GraphOptions
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
Click to show internal directories.
Click to hide internal directories.