Documentation
¶
Index ¶
- type DiagramBuilder
- func (b *DiagramBuilder) AddEdge(from, to string) *DiagramBuilder
- func (b *DiagramBuilder) AddNode(id, contents string) *DiagramBuilder
- func (b *DiagramBuilder) AddNodeWithDimensions(id, contents string, width, height int) *DiagramBuilder
- func (b *DiagramBuilder) Build() *domain.Diagram
- func (b *DiagramBuilder) WithBorder(border int) *DiagramBuilder
- func (b *DiagramBuilder) WithLayout(layout domain.LayoutType) *DiagramBuilder
- func (b *DiagramBuilder) WithMargin(margin int) *DiagramBuilder
- func (b *DiagramBuilder) WithNodeHeight(h int) *DiagramBuilder
- func (b *DiagramBuilder) WithNodeWidth(w int) *DiagramBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiagramBuilder ¶
type DiagramBuilder struct {
// contains filtered or unexported fields
}
DiagramBuilder provides a fluent API for creating test diagrams.
func NewDiagram ¶
func NewDiagram() *DiagramBuilder
NewDiagram creates a new diagram builder with defaults.
func (*DiagramBuilder) AddEdge ¶
func (b *DiagramBuilder) AddEdge(from, to string) *DiagramBuilder
AddEdge adds an edge to the diagram.
func (*DiagramBuilder) AddNode ¶
func (b *DiagramBuilder) AddNode(id, contents string) *DiagramBuilder
AddNode adds a node to the diagram.
func (*DiagramBuilder) AddNodeWithDimensions ¶
func (b *DiagramBuilder) AddNodeWithDimensions(id, contents string, width, height int) *DiagramBuilder
AddNodeWithDimensions adds a node with specified dimensions.
func (*DiagramBuilder) Build ¶
func (b *DiagramBuilder) Build() *domain.Diagram
Build returns the constructed diagram.
func (*DiagramBuilder) WithBorder ¶
func (b *DiagramBuilder) WithBorder(border int) *DiagramBuilder
WithBorder sets the diagram border.
func (*DiagramBuilder) WithLayout ¶
func (b *DiagramBuilder) WithLayout(layout domain.LayoutType) *DiagramBuilder
WithLayout sets the layout type.
func (*DiagramBuilder) WithMargin ¶
func (b *DiagramBuilder) WithMargin(margin int) *DiagramBuilder
WithMargin sets the diagram margin.
func (*DiagramBuilder) WithNodeHeight ¶
func (b *DiagramBuilder) WithNodeHeight(h int) *DiagramBuilder
WithNodeHeight sets the diagram node height.
func (*DiagramBuilder) WithNodeWidth ¶
func (b *DiagramBuilder) WithNodeWidth(w int) *DiagramBuilder
WithNodeWidth sets the diagram node width.
Click to show internal directories.
Click to hide internal directories.