(ctx context.Context, dockerCLI command.Cli, getSize bool, typeConstraint objectType)
| 176 | } |
| 177 | |
| 178 | func inspectAll(ctx context.Context, dockerCLI command.Cli, getSize bool, typeConstraint objectType) inspect.GetRefFunc { |
| 179 | inspectAutodetect := []struct { |
| 180 | objectType objectType |
| 181 | isSizeSupported bool |
| 182 | isSwarmObject bool |
| 183 | objectInspector func(string) (any, []byte, error) |
| 184 | }{ |
| 185 | { |
| 186 | objectType: typeContainer, |
| 187 | isSizeSupported: true, |
| 188 | objectInspector: inspectContainers(ctx, dockerCLI, getSize), |
| 189 | }, |
| 190 | { |
| 191 | objectType: typeImage, |
| 192 | objectInspector: inspectImages(ctx, dockerCLI), |
| 193 | }, |
| 194 | { |
| 195 | objectType: typeNetwork, |
| 196 | objectInspector: inspectNetwork(ctx, dockerCLI), |
| 197 | }, |
| 198 | { |
| 199 | objectType: typeVolume, |
| 200 | objectInspector: inspectVolume(ctx, dockerCLI), |
| 201 | }, |
| 202 | { |
| 203 | objectType: typeService, |
| 204 | isSwarmObject: true, |
| 205 | objectInspector: inspectService(ctx, dockerCLI), |
| 206 | }, |
| 207 | { |
| 208 | objectType: typeTask, |
| 209 | isSwarmObject: true, |
| 210 | objectInspector: inspectTasks(ctx, dockerCLI), |
| 211 | }, |
| 212 | { |
| 213 | objectType: typeNode, |
| 214 | isSwarmObject: true, |
| 215 | objectInspector: inspectNode(ctx, dockerCLI), |
| 216 | }, |
| 217 | { |
| 218 | objectType: typePlugin, |
| 219 | objectInspector: inspectPlugin(ctx, dockerCLI), |
| 220 | }, |
| 221 | { |
| 222 | objectType: typeSecret, |
| 223 | isSwarmObject: true, |
| 224 | objectInspector: inspectSecret(ctx, dockerCLI), |
| 225 | }, |
| 226 | { |
| 227 | objectType: typeConfig, |
| 228 | isSwarmObject: true, |
| 229 | objectInspector: inspectConfig(ctx, dockerCLI), |
| 230 | }, |
| 231 | } |
| 232 | |
| 233 | // isSwarmManager does an Info API call to verify that the daemon is |
| 234 | // a swarm manager. |
| 235 | isSwarmManager := func() bool { |
no test coverage detected
searching dependent graphs…