Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder interface { WithTitle(t string) Builder WithRootComponentTag(t string) Builder WithComponentTag(t string) Builder WithComponentStyle(s ComponentStyle) Builder WithLineColor(c color.Color) Builder Build() View }
Builder simplifies instantiation of default View implementation.
WithTitle sets view title. WithRootComponentTag adds root tag to the view. If at least one root tag is defines, view will contain only those components which have connection (direct or in-direct) to at least one of components with root tag. WithComponentTag adds tag to the view. If at least one tag is defines, view will contain only those components which are tagged with at least one of those tags. WithComponentStyle adds custom component style to the view. ComponentStyle will be applied to the components tagged with component style ID. WithLineColor sets custom line color.
Build returns default View implementation constructed from the provided configuration. If not specified all colors are defaulted to either black or white.
type ComponentStyle ¶
type ComponentStyle struct {
// contains filtered or unexported fields
}
ComponentStyle is a structure that represents custom view style that can be applied to scraped components. ComponentStyle is applied to the components tagged with component style ID.
type ComponentStyleBuilder ¶
type ComponentStyleBuilder interface { WithBackgroundColor(c color.Color) ComponentStyleBuilder WithFontColor(c color.Color) ComponentStyleBuilder WithBorderColor(c color.Color) ComponentStyleBuilder WithShape(s string) ComponentStyleBuilder Build() ComponentStyle }
ComponentStyleBuilder simplifies instantiation of default ComponentStyle implementation.
WithBackgroundColor sets background color. WithFontColor sets font color. WithBorderColor sets border color WithShape sets component shape that corresponds to plantUML shapes (rectangle, component, database, etc.). If shape is not provided, it is defaulted to rectangle.
Build returns default ComponentStyle implementation constructed from the provided configuration.
func NewComponentStyle ¶
func NewComponentStyle(id string) ComponentStyleBuilder
NewView returns ComponentStyleBuilder with provided id.
type View ¶
View defines generic view.
RenderStructureTo renders provided model.Structure into any io.Writer. RenderStructureTo will return an error in case the writer cannot be used.
func NewViewFromConfigFile ¶
NewViewFromConfigFile instantiates a default View implementation with configuration loaded from provided YAML configuration file. NewViewFromConfigFile will return an error in case the YAML configuration file does not exist or contains invalid content.