blob: c8e235dc3865c7881b43e3e30353627ada85e390 (
plain)
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
|
{{ define "structfield" }}
{{- if not $.IsBaseType -}}
// {{ template "docstring" . }}
{{- template "propertyValidationDocString" .}}
{{- end}}
{{ pascalize .Name}} {{ template "schemaType" . }} {{ .PrintTags }}
{{ end }}
{{- define "tuplefield" }}
{{- if not $.IsBaseType -}}
// {{ template "docstring" . }}
{{- template "propertyValidationDocString" .}}
{{ end }}
{{- pascalize .Name}} {{ template "schemaType" . }} `json:"-"
{{- if .CustomTag }} {{ .CustomTag }}{{ end }}` // custom serializer
{{ end }}
{{- define "structfieldIface" }}
{{- if not $.IsBaseType -}}
// {{ template "docstring" . }}
{{- template "propertyValidationDocString" .}}
{{- end }}
{{ pascalize .Name}}() {{ template "schemaType" . }}
Set{{ pascalize .Name}}({{ template "schemaType" . }})
{{ end }}
{{ define "tuplefieldIface" }}
{{- if not $.IsBaseType -}}
// {{ template "docstring" . }}
{{- template "propertyValidationDocString" . }}
{{ end }}
{{- pascalize .Name}}() {{ template "schemaType" . }}
Set{{ pascalize .Name}}({{ template "schemaType" . }})
{{ end }}
{{- define "privstructfield" }}
{{- camelize .Name}}Field {{ template "schemaType" . }}
{{ end }}
{{- define "privtuplefield" }}
{{- camelize .Name}}Field {{ template "schemaType" . }}
{{ end }}
|