You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+95-1Lines changed: 95 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,101 @@ If no `<dest>` file is specified, the output is sent to stdout. Mainly useful f
109
109
110
110
The templates used by docker-gen are written using the Go [text/template](http://golang.org/pkg/text/template/) language. In addition to the [built-in functions](http://golang.org/pkg/text/template/#hdr-Functions) supplied by Go, docker-gen provides a number of additional functions to make it simpler (or possible) to generate your desired output.
111
111
112
-
Within those templates, the object emitted by docker-gen will have [this structure](https://github.com/jwilder/docker-gen/wiki/Docker-Gen-Emit-Structure).
112
+
#### Emit Structure
113
+
114
+
Within the templates, the object emitted by docker-gen will be a structure consisting of following Go structs:
115
+
116
+
```go
117
+
typeRuntimeContainerstruct {
118
+
IDstring
119
+
Addresses []Address
120
+
Gatewaystring
121
+
Namestring
122
+
Hostnamestring
123
+
ImageDockerImage
124
+
Envmap[string]string
125
+
Volumesmap[string]Volume
126
+
NodeSwarmNode
127
+
Labelsmap[string]string
128
+
IPstring
129
+
}
130
+
131
+
typeAddressstruct {
132
+
IPstring
133
+
Portstring
134
+
HostPortstring
135
+
Protostring
136
+
HostIPstring
137
+
}
138
+
139
+
typeDockerImagestruct {
140
+
Registrystring
141
+
Repositorystring
142
+
Tagstring
143
+
}
144
+
145
+
typeVolumestruct {
146
+
Pathstring
147
+
HostPathstring
148
+
ReadWritebool
149
+
}
150
+
151
+
typeSwarmNodestruct {
152
+
IDstring
153
+
Namestring
154
+
AddressAddress
155
+
}
156
+
```
157
+
158
+
For example, this is a JSON version of an emitted RuntimeContainer struct:
0 commit comments