cytoscape

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteGraphHTML

func WriteGraphHTML(writer io.Writer, graph *tfgraph.Graph, options *RenderingOptions)

WriteGraphHTML writes the specified Terraform graph to an HTML file using the given template.

func WriteGraphJSON

func WriteGraphJSON(writer io.Writer, graph *tfgraph.Graph, options *RenderingOptions)

WriteGraphJSON writes the specified Terraform graph in Cytoscape.js JSON format.

Types

type Edge

type Edge struct {
	Data    EdgeData `json:"data"`
	Classes []string `json:"classes,omitempty"`
}

Edge represents a graph edge.

type EdgeData

type EdgeData struct {
	// Standard properties.
	ID     string `json:"id"`
	Source string `json:"source"`
	Target string `json:"target"`

	// Custom properties.
	SourceType string `json:"sourceType"`
	TargetType string `json:"targetType"`
}

EdgeData represents the element data of a graph edge.

type Elements

type Elements struct {
	Nodes []*Node `json:"nodes"`
	Edges []*Edge `json:"edges"`
}

Elements represents a graph elements (nodes and edges).

type Node

type Node struct {
	Data    NodeData `json:"data"`
	Classes []string `json:"classes,omitempty"`
}

Node represents a graph node.

type NodeData

type NodeData struct {
	// Standard properties.
	ID     string  `json:"id"`
	Parent *string `json:"parent,omitempty"`

	// Custom properties.
	Label          string  `json:"label"`
	Type           string  `json:"type"`
	ParentModuleID *string `json:"parentModuleID,omitempty"`
}

NodeData represents the element data of a graph node.

type RenderingOptions

type RenderingOptions struct {
	GraphName    string
	EmbedModules bool
	HTMLTemplate fs.File
}

RenderingOptions contains all the options used during graph rendering.

Jump to

Keyboard shortcuts

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