Documentation ¶
Index ¶
- Constants
- Variables
- func MakeDiagramFilename(prefix, id, format string) string
- func MakeMdFilename(prefix, id string) string
- type Attr
- type Attrs
- type Cluster
- type ClusterMetadata
- type Clusters
- type ColorSet
- type ColorSets
- type Component
- type ComponentMetadata
- type Components
- type Config
- func (cfg *Config) Build() error
- func (cfg *Config) BuildForIcons() error
- func (cfg *Config) BuildNestedClusters(layers []string) (Clusters, Nodes, []*Edge, error)
- func (cfg *Config) ClusterComponents() Components
- func (cfg *Config) Clusters() Clusters
- func (cfg *Config) ColorSets() ColorSets
- func (cfg *Config) Components() Components
- func (cfg *Config) Edges() []*Edge
- func (cfg *Config) Elements() []Element
- func (cfg *Config) FindComponent(s string) (*Component, error)
- func (cfg *Config) FindLabel(name string) (*Label, error)
- func (cfg *Config) FindLayer(s string) (*Layer, error)
- func (cfg *Config) FindNode(name string) (*Node, error)
- func (cfg *Config) FindOrCreateLabel(name string) *Label
- func (cfg *Config) Format() string
- func (cfg *Config) GlobalComponents() Components
- func (cfg *Config) HideDetails() error
- func (cfg *Config) IconMap() *IconMap
- func (cfg *Config) Labels() Labels
- func (cfg *Config) Layers() []*Layer
- func (cfg *Config) LoadConfigFile(path string) error
- func (cfg *Config) LoadRealNodes(in []byte) error
- func (cfg *Config) LoadRealNodesFile(path string) error
- func (dest *Config) Merge(src *Config) (err error)
- func (cfg *Config) NodeComponents() Components
- func (cfg *Config) PrimaryView() *View
- func (cfg *Config) PruneClustersByLabels(clusters Clusters, globalNodes Nodes, globalComponents Components, ...) (Clusters, Nodes, Components, []*Edge, error)
- func (cfg *Config) PruneClustersByRelations(clusters Clusters, globalNodes Nodes, globalComponents Components, ...) (Clusters, Nodes, Components, []*Edge, error)
- func (cfg *Config) PruneNodesByLabels(nodes Nodes, labelStrs []string) (Nodes, error)
- func (d *Config) UnmarshalYAML(data []byte) error
- type CustomIcons
- type Edge
- type Element
- type ElementType
- type Graph
- type Icon
- type IconMap
- type Label
- type Labels
- type Layer
- type LayerMetadata
- type Node
- type NodeMetadata
- type Nodes
- type RealNode
- type RealNodes
- type Relation
- type RelationType
- type Relations
- type View
- type Views
Constants ¶
View Source
const DefaultBaseColor = "#4B75B9"
View Source
const DefaultDocPath = "archdoc"
View Source
const DefaultFormat = "svg"
DefaultFormat is the default view format
View Source
const DefaultTextColor = "#333333"
View Source
const Esc = "\\"
View Source
const IconHeight = 80.0
View Source
const IconWidth = 80.0
View Source
const Q = "?"
View Source
const Sep = ":"
Variables ¶
View Source
var DefaultConfigFilePaths = []string{"ndiag.yml"}
View Source
var DefaultDescPath = "ndiag.descriptions"
View Source
var DefaultIconPath = "ndiag.icons"
View Source
var RelationTypeDefault = &RelationType{ Name: "relation", ComponentsKey: "components", Attrs: Attrs{ &Attr{ Key: "color", Value: "#4B75B9", }, &Attr{ Key: "arrowhead", Value: "dot", }, &Attr{ Key: "arrowhead", Value: "dot", }, &Attr{ Key: "style", Value: "bold,dashed", }, }, }
View Source
var RelationTypeNetwork = &RelationType{ Name: "network", ComponentsKey: "route", Attrs: Attrs{ &Attr{ Key: "color", Value: "#33333399", }, &Attr{ Key: "arrowhead", Value: "normal", }, &Attr{ Key: "arrowhead", Value: "normal", }, &Attr{ Key: "style", Value: "bold", }, }, }
Functions ¶
func MakeDiagramFilename ¶ added in v0.12.0
func MakeMdFilename ¶ added in v0.12.0
Types ¶
type Cluster ¶
type Cluster struct { Layer *Layer Name string Desc string Parent *Cluster Children Clusters Nodes Nodes Components Components Metadata ClusterMetadata }
func (*Cluster) DescFilename ¶ added in v0.12.0
func (*Cluster) ElementType ¶ added in v0.12.0
func (c *Cluster) ElementType() ElementType
func (*Cluster) OverrideMetadata ¶ added in v0.9.0
type ClusterMetadata ¶ added in v0.7.0
type Clusters ¶
type Clusters []*Cluster
func (Clusters) FindByLayer ¶
type Component ¶
type Component struct { Name string Desc string Cluster *Cluster Node *Node Edges []*Edge Labels Labels Metadata ComponentMetadata }
func (*Component) DescFilename ¶ added in v0.12.0
func (*Component) ElementType ¶ added in v0.12.0
func (c *Component) ElementType() ElementType
func (*Component) OverrideMetadata ¶ added in v0.7.1
type ComponentMetadata ¶ added in v0.7.0
type Components ¶ added in v0.12.0
type Components []*Component
type Config ¶
type Config struct { Name string `yaml:"name"` Desc string `yaml:"desc,omitempty"` DocPath string `yaml:"docPath"` DescPath string `yaml:"descPath,omitempty"` IconPath string `yaml:"iconPath,omitempty"` Graph *Graph `yaml:"graph,omitempty"` HideViews bool `yaml:"hideViews,omitempty"` HideLayers bool `yaml:"hideLayers,omitempty"` HideRealNodes bool `yaml:"hideRealNodes,omitempty"` HideLabels bool `yaml:"hideLabels,omitempty"` Views Views `yaml:"views"` Nodes Nodes `yaml:"nodes"` Relations Relations `yaml:"relations,omitempty"` Dict *dict.Dict `yaml:"dict,omitempty"` BaseColor string `yaml:"baseColor,omitempty"` TextColor string `yaml:"textColor,omitempty"` CustomIcons CustomIcons `yaml:"customIcons,omitempty"` // contains filtered or unexported fields }
func (*Config) BuildForIcons ¶ added in v0.9.0
func (*Config) BuildNestedClusters ¶
func (*Config) ClusterComponents ¶
func (cfg *Config) ClusterComponents() Components
func (*Config) Components ¶ added in v0.10.0
func (cfg *Config) Components() Components
func (*Config) FindOrCreateLabel ¶ added in v0.10.0
func (*Config) GlobalComponents ¶
func (cfg *Config) GlobalComponents() Components
func (*Config) HideDetails ¶ added in v0.14.0
func (*Config) LoadConfigFile ¶
func (*Config) LoadRealNodes ¶
func (*Config) LoadRealNodesFile ¶
func (*Config) NodeComponents ¶
func (cfg *Config) NodeComponents() Components
func (*Config) PrimaryView ¶ added in v0.10.0
func (*Config) PruneClustersByLabels ¶ added in v0.8.0
func (*Config) PruneClustersByRelations ¶ added in v0.12.0
func (cfg *Config) PruneClustersByRelations(clusters Clusters, globalNodes Nodes, globalComponents Components, relations Relations) (Clusters, Nodes, Components, []*Edge, error)
func (*Config) PruneNodesByLabels ¶ added in v0.8.0
func (*Config) UnmarshalYAML ¶
type CustomIcons ¶ added in v0.14.0
func (CustomIcons) FindByKey ¶ added in v0.14.0
func (icons CustomIcons) FindByKey(key string) (*glyph.Blueprint, error)
func (CustomIcons) Merge ¶ added in v0.14.0
func (dest CustomIcons) Merge(src CustomIcons) CustomIcons
type Edge ¶
Edge is ndiag edge
func MergeEdges ¶ added in v0.1.0
func SplitRelations ¶ added in v0.4.0
type Element ¶ added in v0.10.0
type Element interface { ElementType() ElementType Id() string FullName() string DescFilename() string }
Element is ndiag element
type ElementType ¶ added in v0.12.0
type ElementType int
const ( TypeNode ElementType = iota + 1 TypeComponent TypeRelation TypeLayer TypeCluster TypeLabel TypeView )
func (ElementType) String ¶ added in v0.12.0
func (v ElementType) String() string
type Graph ¶ added in v0.6.0
func (*Graph) UnmarshalYAML ¶ added in v0.14.0
type IconMap ¶ added in v0.9.0
type IconMap struct {
// contains filtered or unexported fields
}
func NewIconMap ¶ added in v0.9.0
func (*IconMap) GeneratePNGGlyphIcons ¶ added in v0.9.0
func (*IconMap) GenerateSVGGlyphIcons ¶ added in v0.9.0
func (*IconMap) RemoveTempIconDir ¶ added in v0.9.0
type Label ¶ added in v0.8.0
func (*Label) DescFilename ¶ added in v0.12.0
func (*Label) ElementType ¶ added in v0.12.0
func (l *Label) ElementType() ElementType
type Layer ¶
type Layer struct { Name string Desc string Metadata LayerMetadata }
func (*Layer) DescFilename ¶ added in v0.12.0
func (*Layer) ElementType ¶ added in v0.12.0
func (l *Layer) ElementType() ElementType
type LayerMetadata ¶ added in v0.7.0
type Node ¶
type Node struct { Name string `yaml:"name"` Desc string `yaml:"desc,omitempty"` Match string `yaml:"match,omitempty"` MatchRegexp string `yaml:"matchRegexp,omitempty"` Components Components `yaml:"components,omitempty"` Clusters Clusters `yaml:"clusters,omitempty"` Metadata NodeMetadata `yaml:"metadata,omitempty"` RealNodes RealNodes `yaml:"-"` Labels Labels // contains filtered or unexported fields }
func (*Node) DescFilename ¶ added in v0.12.0
func (*Node) ElementType ¶ added in v0.12.0
func (n *Node) ElementType() ElementType
func (*Node) OverrideMetadata ¶ added in v0.14.0
func (*Node) UnmarshalYAML ¶
type NodeMetadata ¶ added in v0.7.0
type Relation ¶ added in v0.4.0
type Relation struct { Desc string Type *RelationType Components Components Labels Labels Attrs Attrs // contains filtered or unexported fields }
func (*Relation) DescFilename ¶ added in v0.12.0
func (*Relation) ElementType ¶ added in v0.12.0
func (r *Relation) ElementType() ElementType
type RelationType ¶ added in v0.4.0
type Relations ¶ added in v0.11.0
type Relations []*Relation
func (Relations) FindByLabels ¶ added in v0.11.0
type View ¶ added in v0.10.0
type View struct { Name string `yaml:"name"` Desc string `yaml:"desc,omitempty"` Layers []string `yaml:"layers"` Labels []string `yaml:"labels,omitempty"` }
func (*View) DescFilename ¶ added in v0.12.0
func (*View) ElementType ¶ added in v0.12.0
func (v *View) ElementType() ElementType
Click to show internal directories.
Click to hide internal directories.