model

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseTypeFlag       = "{{TYPE}}"
	PackageBaseTypeURL = "tree"
	FileBaseTypeURL    = "blob"
)

Variables

This section is empty.

Functions

func NewGenerator

func NewGenerator(numberNodes int) *generator

Types

type Node

type Node struct {
	Name               string   `json:"name"`
	URL                string   `json:"url"`
	Branch             string   `json:"branch"`
	Type               NodeType `json:"type"`
	Width              float64  `json:"width"`
	Depth              float64  `json:"depth"`
	Position           Position `json:"position"`
	NumberOfLines      int      `json:"numberOfLines"`
	NumberOfMethods    int      `json:"numberOfMethods"`
	NumberOfAttributes int      `json:"numberOfAttributes"`
	Children           []*Node  `json:"children"`
	Line               int      `json:"-"`
	// contains filtered or unexported fields
}

func New

func New(items map[string]*analyzer.NodeInfo, repositoryName string, repositoryBranch string) *Node

func (*Node) GenerateChildList

func (n *Node) GenerateChildList(parentPath string)

func (*Node) GenerateChildrenPosition

func (n *Node) GenerateChildrenPosition()

type NodeType

type NodeType string
const (
	StructType  NodeType = "STRUCT"
	FileType    NodeType = "FILE"
	PackageType NodeType = "PACKAGE"
)

type Position

type Position struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

Jump to

Keyboard shortcuts

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