forked from k1LoW/tbls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.md.tmpl
43 lines (31 loc) · 821 Bytes
/
index.md.tmpl
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
# {{ .Schema.Name }}
{{- if ne .Schema.Desc "" }}
## {{ "Description" | lookup }}
{{ .Schema.Desc | nl2mdnl }}
{{- end }}
{{- if ne (len .Schema.Labels) 0 }}
## {{ "Labels" | lookup }}
{{ .Schema.Labels | label_join }}
{{- end }}
{{- if ne (len .Schema.Viewpoints) 0 }}
## {{ "Viewpoints" | lookup }}
{{ range $v := .Viewpoints }}
|{{ range $d := $v }} {{ $d | nl2br }} |{{ end }}
{{- end -}}
{{- end }}
## {{ "Tables" | lookup }}
{{ range $t := .Tables }}
|{{ range $d := $t }} {{ $d | nl2br }} |{{ end }}
{{- end -}}
{{- if .Schema.Functions }}
## {{ "Functions" | lookup }}
{{ range $t := .Functions }}
|{{ range $d := $t }} {{ $d | nl2br }} |{{ end }}
{{- end -}}
{{- end -}}
{{- if .er }}
## {{ "Relations" | lookup }}
{{ .erDiagram }}
{{- end }}
---
> Generated by [tbls](https://github.com/k1LoW/tbls)