package graphjson
Import Path
github.com/d2lang/elk-go/graphjson (on go.dev)
Dependency Relation
imports 5 packages, and imported by 2 packages
Package-Level Type Names (total 9)
Edge accepts both ELK's extended sources/targets form and its deprecated
primitive source/target form.
AdditionalFields map[string]json.RawMessage
BendPoints []Point
Container *ID
ID ID
JunctionPoints []Point
Labels []*Label
LayoutOptions LayoutOptions
Sections []*EdgeSection
Source *ID
SourcePoint *Point
SourcePort *ID
Sources []ID
Target *ID
TargetPoint *Point
TargetPort *ID
Targets []ID
LayoutOptionKeys returns the layout-option member order captured while
decoding JSON. Programmatically constructed edges return nil.
( Edge) MarshalJSON() ([]byte, error)
(*Edge) UnmarshalJSON(data []byte) error
Edge : github.com/goccy/go-json.Marshaler
*Edge : github.com/goccy/go-json.Unmarshaler
Edge : encoding/json/v2.Marshaler
*Edge : encoding/json/v2.Unmarshaler
EdgeSection is one connected piece of an edge route.
AdditionalFields map[string]json.RawMessage
BendPoints []Point
EndPoint *Point
ID ID
IncomingSections []ID
IncomingShape *ID
LayoutOptions LayoutOptions
OutgoingSections []ID
OutgoingShape *ID
StartPoint *Point
LayoutOptionKeys returns the layout-option member order captured while
decoding JSON. Programmatically constructed sections return nil.
( EdgeSection) MarshalJSON() ([]byte, error)
(*EdgeSection) UnmarshalJSON(data []byte) error
EdgeSection : github.com/goccy/go-json.Marshaler
*EdgeSection : github.com/goccy/go-json.Unmarshaler
EdgeSection : encoding/json/v2.Marshaler
*EdgeSection : encoding/json/v2.Unmarshaler
Graph is the root-node spelling used by Layout.
ID is an ELK graph identifier. ELK's documented API uses string IDs, while
its JSON importer also accepts integral JSON numbers. ID preserves which
representation was supplied.
Int64 returns the numeric identifier and whether this ID is numeric.
IsNumber reports whether the ID uses the JSON number representation.
IsValid reports whether the ID was explicitly initialized.
( ID) MarshalJSON() ([]byte, error)
String returns the identifier's canonical text representation.
(*ID) UnmarshalJSON(data []byte) error
ID : github.com/goccy/go-json.Marshaler
*ID : github.com/goccy/go-json.Unmarshaler
ID : database/sql/driver.Validator
ID : encoding/json/v2.Marshaler
*ID : encoding/json/v2.Unmarshaler
ID : expvar.Var
ID : fmt.Stringer
func IDPtr(id ID) *ID
func IntID(value int64) ID
func StringID(value string) ID
func IDPtr(id ID) *ID
Label is a shape attached to a node, port, or edge.
AdditionalFields map[string]json.RawMessage
Height *float64
ID *ID
Labels []*Label
LayoutOptions LayoutOptions
Text *string
Width *float64
X *float64
Y *float64
LayoutOptionKeys returns the layout-option member order captured while
decoding JSON. Programmatically constructed labels return nil.
( Label) MarshalJSON() ([]byte, error)
(*Label) UnmarshalJSON(data []byte) error
Label : github.com/goccy/go-json.Marshaler
*Label : github.com/goccy/go-json.Unmarshaler
Label : encoding/json/v2.Marshaler
*Label : encoding/json/v2.Unmarshaler
LayoutOptions contains layout option values. ELK's JavaScript facade
accepts strings as documented as well as JSON booleans and numbers.
Node is both ELK's root graph type and its recursive node type. Nil slices
are absent JSON members; non-nil empty slices are emitted as empty arrays.
AdditionalFields map[string]json.RawMessage
Children []*Node
Edges []*Edge
Height *float64
ID ID
IndividualSpacings LayoutOptions
Labels []*Label
LayoutOptions LayoutOptions
Ports []*Port
Width *float64
X *float64
Y *float64
IndividualSpacingKeys returns the individual-spacing member order captured
while decoding JSON. Programmatically constructed nodes return nil.
LayoutOptionKeys returns the layout-option member order captured while
decoding JSON. Programmatically constructed nodes return nil.
( Node) MarshalJSON() ([]byte, error)
(*Node) UnmarshalJSON(data []byte) error
Node : github.com/goccy/go-json.Marshaler
*Node : github.com/goccy/go-json.Unmarshaler
Node : encoding/json/v2.Marshaler
*Node : encoding/json/v2.Unmarshaler
Point is a two-dimensional point in parent-relative ELK coordinates.
X float64
Y float64
( Point) MarshalJSON() ([]byte, error)
Point : github.com/goccy/go-json.Marshaler
Point : encoding/json/v2.Marshaler
Port is a connectable shape owned by a node.
AdditionalFields map[string]json.RawMessage
Height *float64
ID ID
Labels []*Label
LayoutOptions LayoutOptions
Width *float64
X *float64
Y *float64
LayoutOptionKeys returns the layout-option member order captured while
decoding JSON. Programmatically constructed ports return nil.
( Port) MarshalJSON() ([]byte, error)
(*Port) UnmarshalJSON(data []byte) error
Port : github.com/goccy/go-json.Marshaler
*Port : github.com/goccy/go-json.Unmarshaler
Port : encoding/json/v2.Marshaler
*Port : encoding/json/v2.Unmarshaler
Package-Level Functions (total 6)
Float64 returns a pointer suitable for optional numeric graph fields.
IDPtr returns a pointer to a copy of id.
IntID constructs an integer-valued graph identifier.
Number returns value, or zero when value is nil.
String returns a pointer suitable for optional text fields.
StringID constructs a string-valued graph identifier.
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |