Documentation
¶
Index ¶
Constants ¶
View Source
const PluginKind = "Canvas"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnchorPoint ¶
type AnchorPoint string
const ( AnchorN AnchorPoint = "n" AnchorS AnchorPoint = "s" AnchorE AnchorPoint = "e" AnchorW AnchorPoint = "w" AnchorNW AnchorPoint = "nw" AnchorNE AnchorPoint = "ne" AnchorSW AnchorPoint = "sw" AnchorSE AnchorPoint = "se" )
type BackgroundSpec ¶
type BackgroundSpec struct {
ID string `json:"id" yaml:"id"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Position Point `json:"position" yaml:"position"`
Width float64 `json:"width" yaml:"width"`
Height float64 `json:"height" yaml:"height"`
Color string `json:"color,omitempty" yaml:"color,omitempty"`
Opacity *float64 `json:"opacity,omitempty" yaml:"opacity,omitempty"`
Image string `json:"image,omitempty" yaml:"image,omitempty"`
ImageFit ImageFit `json:"imageFit,omitempty" yaml:"imageFit,omitempty"`
Global bool `json:"global,omitempty" yaml:"global,omitempty"`
}
type Builder ¶
type Builder struct {
PluginSpec `json:",inline" yaml:",inline"`
}
type EdgeSpec ¶
type EdgeSpec struct {
ID string `json:"id" yaml:"id"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Source string `json:"source" yaml:"source"`
Target *string `json:"target,omitempty" yaml:"target,omitempty"`
SourceAnchor AnchorPoint `json:"sourceAnchor,omitempty" yaml:"sourceAnchor,omitempty"`
TargetAnchor AnchorPoint `json:"targetAnchor,omitempty" yaml:"targetAnchor,omitempty"`
FreeEndpoint *Point `json:"freeEndpoint,omitempty" yaml:"freeEndpoint,omitempty"`
Bidirectional bool `json:"bidirectional,omitempty" yaml:"bidirectional,omitempty"`
ThicknessMode ThicknessMode `json:"thicknessMode,omitempty" yaml:"thicknessMode,omitempty"`
StrokeWidth *float64 `json:"strokeWidth,omitempty" yaml:"strokeWidth,omitempty"`
SourceQueryIndex *uint `json:"sourceQueryIndex,omitempty" yaml:"sourceQueryIndex,omitempty"`
TargetQueryIndex *uint `json:"targetQueryIndex,omitempty" yaml:"targetQueryIndex,omitempty"`
SourceLabelTemplate string `json:"sourceLabelTemplate,omitempty" yaml:"sourceLabelTemplate,omitempty"`
TargetLabelTemplate string `json:"targetLabelTemplate,omitempty" yaml:"targetLabelTemplate,omitempty"`
}
type EdgeThresholdStep ¶
type LabelPosition ¶
type LabelPosition string
const ( AbovePosition LabelPosition = "above" BelowPosition LabelPosition = "below" LeftPosition LabelPosition = "left" RightPosition LabelPosition = "right" CenterPosition LabelPosition = "center" )
type NodeSpec ¶
type NodeSpec struct {
ID string `json:"id" yaml:"id"`
Position Point `json:"position" yaml:"position"`
Width float64 `json:"width" yaml:"width"`
Height float64 `json:"height" yaml:"height"`
Kind NodeKind `json:"kind" yaml:"kind"`
Label string `json:"label,omitempty" yaml:"label,omitempty"`
LabelPosition LabelPosition `json:"labelPosition,omitempty" yaml:"labelPosition,omitempty"`
LabelPadding float64 `json:"labelPadding,omitempty" yaml:"labelPadding,omitempty"`
Icon string `json:"icon,omitempty" yaml:"icon,omitempty"`
URL string `json:"url,omitempty" yaml:"url,omitempty"`
Background string `json:"background,omitempty" yaml:"background,omitempty"`
BackgroundImage string `json:"backgroundImage,omitempty" yaml:"backgroundImage,omitempty"`
QueryIndex *uint `json:"queryIndex,omitempty" yaml:"queryIndex,omitempty"`
ColorMode ColorMode `json:"colorMode,omitempty" yaml:"colorMode,omitempty"`
// Color is a hex color string (e.g. "#ff0000").
Color string `json:"color,omitempty" yaml:"color,omitempty"`
}
type PluginSpec ¶
type PluginSpec struct {
Thresholds *common.Thresholds `json:"thresholds,omitempty" yaml:"thresholds,omitempty"`
Format *common.Format `json:"format,omitempty" yaml:"format,omitempty"`
EdgeThresholdWidths []EdgeThresholdStep `json:"edgeThresholdWidths,omitempty" yaml:"edgeThresholdWidths,omitempty"`
EdgeDefaultStrokeWidth *float64 `json:"edgeDefaultStrokeWidth,omitempty" yaml:"edgeDefaultStrokeWidth,omitempty"`
QuerySettings []QueryColorSettings `json:"querySettings,omitempty" yaml:"querySettings,omitempty"`
Backgrounds []BackgroundSpec `json:"backgrounds,omitempty" yaml:"backgrounds,omitempty"`
Nodes []NodeSpec `json:"nodes,omitempty" yaml:"nodes,omitempty"`
Edges []EdgeSpec `json:"edges,omitempty" yaml:"edges,omitempty"`
}
type QueryColorSettings ¶
type ThicknessMode ¶
type ThicknessMode string
const ( FixedThicknessMode ThicknessMode = "fixed" ThresholdThicknessMode ThicknessMode = "threshold" )
Click to show internal directories.
Click to hide internal directories.