-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.go
103 lines (92 loc) · 1.6 KB
/
model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
package cdor
import (
"oss.terrastruct.com/d2/d2graph"
"oss.terrastruct.com/d2/d2target"
)
type Cdor struct {
graph *d2graph.Graph
nodes []*node
connections []*connection
d2s []string
globalOption *option
err error
*config
}
type node struct {
*Cdor
children []*node
connections []*connection
sqlFields []sqlField
id string
codeTag string
code string
idSolved bool
*option
}
type connection struct {
*Cdor
*conOption
isSingle bool
src, dst string
}
type option struct {
label string
blankLabel bool
shape string
tooltip string
link string
icon string
position string
labelPosition string
iconPosition string
width int
height int
gridRows int
gridCols int
gridGap int
verticalGap int
horizontalGap int
style
}
type style struct {
fill string
filled bool
filledFlag bool
stroke string
opacity float64
fillPattern string
strokeWidth int
strokeDash int
borderRadius int
shadow bool
is3d bool
multiple bool
doubleBorder bool
fontSize int
fontColor string
font string
animated bool
bold bool
italic bool
underline bool
}
type arrow struct {
srcHead option
dstHead option
}
type conOption struct {
arrow
option
}
type sqlField struct {
key string
value string
constraint string
}
type config struct {
cfg d2target.Config
elkLayout bool
isSequence bool
direction string
}
type ThemeOverrides = d2target.ThemeOverrides