render

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustParseHex

func MustParseHex(s string) colorful.Color

Types

type CytoEdge

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

type CytoGraph

type CytoGraph struct {
	Nodes map[CytoID]*CytoNode
	Edges map[CytoID]*CytoEdge
	// contains filtered or unexported fields
}

func NewCytoGraph

func NewCytoGraph() *CytoGraph

func (*CytoGraph) GetID

func (cg *CytoGraph) GetID(fullName string, isNode bool) (isNew bool, id CytoID)

func (*CytoGraph) LoadCallGraph

func (cg *CytoGraph) LoadCallGraph(g *Graph, opts *RenderOptions) error

func (*CytoGraph) ProcessEdge

func (cg *CytoGraph) ProcessEdge(edge *Edge) CytoID

func (*CytoGraph) ProcessNode

func (cg *CytoGraph) ProcessNode(node *Node) CytoID

func (*CytoGraph) ProcessPkg

func (cg *CytoGraph) ProcessPkg(pkg *types.Package) CytoID

func (*CytoGraph) ProcessRecv

func (cg *CytoGraph) ProcessRecv(recv *types.Var) CytoID

func (*CytoGraph) WriteJson

func (cg *CytoGraph) WriteJson(w io.Writer) error

type CytoID

type CytoID string

type CytoJsonOut

type CytoJsonOut struct {
	Nodes []*CytoNode `json:"nodes"`
	Edges []*CytoEdge `json:"edges"`
}

type CytoNode

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

type EdgeData

type EdgeData struct {
	Id     CytoID `json:"id"`
	Source CytoID `json:"source"`
	Target CytoID `json:"target"`
}

type GradientTable

type GradientTable []struct {
	Col colorful.Color
	Pos float64
}

gradient code taken from the color library examples: https://github.com/lucasb-eyer/go-colorful/blob/master/doc/gradientgen/gradientgen.go

func (GradientTable) GetInterpolatedColorFor

func (self GradientTable) GetInterpolatedColorFor(t float64) colorful.Color

type NodeData

type NodeData struct {
	Id          CytoID  `json:"id"`
	Label       string  `json:"label"`
	Description *string `json:"description,omitempty"` // optional description
	Parent      CytoID  `json:"parent"`
	Color       string  `json:"color"`
}

type RenderOptions

type RenderOptions struct {
	IncludeGoRoot     bool
	IncludeUnexported bool
}

Jump to

Keyboard shortcuts

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