erd

package
v2.26.9 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 5 Imported by: 0

README

GoCharts ERD

The GoCharts erd package is designed to facilite creation of entity relationship diagrams.

The current code faciliates creation of markdown used in Mermaid.js Entity Relationship Diagrams as described here:

This is wrapped by the following Go module which this package also relies upon:

  1. github.com/nao1215/markdown/mermaid/er

Documentation

Index

Constants

View Source
const (
	TypeBool      = "bool"
	TypeDate      = "date"
	TypeDecimal   = "decimal"
	TypeInt       = "int"
	TypeString    = "string"
	TypeTimestamp = "timestamp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Relationship

type Relationship struct {
	LeftEntity        er.Entity
	RightEntity       er.Entity
	LeftRelationship  er.Relationship
	RightRelationship er.Relationship
	Identidy          er.Identify
	Comment           string
}

type Relationships

type Relationships []Relationship

func (Relationships) AddToDiagram

func (rels Relationships) AddToDiagram(d *er.Diagram) *er.Diagram

func (Relationships) DiagramString

func (rels Relationships) DiagramString() string

func (Relationships) MarkdownString

func (rels Relationships) MarkdownString(title string) (string, error)

func (Relationships) WriteFileHTML

func (rels Relationships) WriteFileHTML(filename, htmlTitle, diagramTitle string, perm os.FileMode) error

func (Relationships) WriteFileMarkdown

func (rels Relationships) WriteFileMarkdown(filename, title string, perm os.FileMode) error

Jump to

Keyboard shortcuts

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