1206 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
b9dd7c0d59 client: tidy-up mock-utilities
- Add a `mockResponse` utility, and slightly enhance it to also include
  the request Headers and Status message, to be more closely to actual
  responses.
- Add a `mockJSONResponse` utility, implemented using `mockResponse`
- Remove `plainTextErrorMock` in favor of `mockResponse`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-23 13:01:41 +02:00
Sebastiaan van Stijn
a315437e1c client: rename transportFunc -> testRoundTripper
Rename it so that it's clearer that it's intended for test-purposes,
and adding a `skipConfigureTransport()` method to the signature to
prevent IDEs considering is a redundant convert, and to be more explicit
on intent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-23 13:01:33 +02:00
Sebastiaan van Stijn
d9c950f824 Merge pull request #51275 from thaJeztah/client_deadcode
client: remove unused hasEndpointSpecificMacAddress utility
2025-10-23 08:25:02 +02:00
Sebastiaan van Stijn
0049df8315 Merge pull request #51273 from austinvazquez/refactor-client-service-list
client: rename `ServiceListResult.Services` to `ServiceListResult.Items`
2025-10-23 00:19:30 +02:00
Sebastiaan van Stijn
f733b411a1 client: remove unused hasEndpointSpecificMacAddress utility
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-22 23:16:37 +02:00
Sebastiaan van Stijn
f2412e7ab4 Merge pull request #51262 from vvoland/client-containerexec-opts
client/container_exec: Wrap options and result
2025-10-22 23:08:50 +02:00
Austin Vazquez
5a5d39205c client: rename ServiceListResult.Services to ServiceListResult.Items
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-22 15:55:03 -05:00
Paweł Gronowski
94ab385eb5 client/container_exec: Wrap options and result, rename to Exec
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-22 22:48:59 +02:00
Akihiro Suda
00abc3a9d5 Merge pull request #51266 from thaJeztah/please_linters
client: please the linters
2025-10-23 01:42:46 +09:00
Sebastiaan van Stijn
4ae709eaa4 Merge pull request #51264 from vvoland/client-distrib-opts
client/distribution_inspect: Wrap options and result
2025-10-22 15:12:22 +02:00
Sebastiaan van Stijn
c1ab6eb5f9 Merge pull request #51256 from austinvazquez/refactor-client-plugin
client: refactor plugin api client functions to define options/result…
2025-10-22 15:11:39 +02:00
Sebastiaan van Stijn
5b46429122 client: please the linters
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-22 14:25:09 +02:00
Sebastiaan van Stijn
c7fe7136d2 client: gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-22 14:01:01 +02:00
Austin Vazquez
909e32b27d client: refactor plugin api client functions to define options/results structs
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-22 13:45:03 +02:00
Paweł Gronowski
eddf1a1ad6 Merge pull request #51260 from vvoland/client-node-opts
client/node: Wrap options and output
2025-10-22 13:09:21 +02:00
Paweł Gronowski
362e9d088f client/distribution_inspect: Wrap options and result
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-22 13:00:44 +02:00
Sebastiaan van Stijn
78d228b84e Merge pull request #51258 from thaJeztah/client_ping
api/types: move Ping and swarm.Status to client
2025-10-22 12:47:42 +02:00
Paweł Gronowski
7ceea4148a client/node: Wrap options and output
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-22 12:02:05 +02:00
Sebastiaan van Stijn
25c509b026 Merge pull request #51251 from thaJeztah/secret_refactor
client/secrets: Wrap results and options
2025-10-22 11:50:01 +02:00
Sebastiaan van Stijn
8dc5d1e64d api/types: move Ping and swarm.Status to client
The API does not produce these as a response; the fields in the Ping
struct, including the Swarm status are propagated from headers returned
by the /_ping endpoint.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-22 11:05:08 +02:00
Austin Vazquez
9821df9b8e Merge pull request #51227 from vvoland/client-image-opts
client/image: Wrap result and options in structs
2025-10-21 20:42:14 -05:00
Paweł Gronowski
6819a9fc1e client/image_tag: Wrap options and result
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-21 19:38:12 -05:00
Paweł Gronowski
347693a580 client/image_remove&search: Wrap options and result
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-21 19:37:18 -05:00
Paweł Gronowski
b3974f07f5 client/image_list: Wrap options and result
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-21 19:37:12 -05:00
Paweł Gronowski
a7f409014f client/image_create&import: Wrap options and result
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-21 19:27:46 -05:00
Paweł Gronowski
5cc1e5f800 client/build_cancel: Wrap options and result
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-21 19:27:46 -05:00
Paweł Gronowski
51ed1a9a37 client/image_build: Rename output to ImageBuildResult
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-21 19:27:46 -05:00
Austin Vazquez
cd08b79c02 client: refactor service api client functions for defined options/result structs
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-21 19:18:07 -05:00
Austin Vazquez
13374b5a72 Merge pull request #51254 from thaJeztah/refactor_plugin_inspect
client: PluginInspectWithRaw: refactor and rename to PluginInspect
2025-10-21 17:48:02 -05:00
Sebastiaan van Stijn
e3c6dc2a91 client: VolumeInspect: add options struct
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 23:36:20 +02:00
Sebastiaan van Stijn
8f50d38231 client: SwarmInspect: add options struct
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 23:30:21 +02:00
Sebastiaan van Stijn
95fac07ccc client/secrets: Wrap results and options
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 23:18:39 +02:00
Sebastiaan van Stijn
ebc92e015a client: PluginInspectWithRaw: refactor and rename to PluginInspect
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 23:14:08 +02:00
Austin Vazquez
94501410a5 Merge pull request #51249 from thaJeztah/config_list_refactor
client: rename ConfigListResult.Configs to ConfigListResult.Items
2025-10-21 15:15:04 -05:00
Austin Vazquez
a6be6140a9 Merge pull request #51247 from thaJeztah/remove_withraw
client: remove VolumeInspectWithRaw, merge with VolumeInspect
2025-10-21 15:13:55 -05:00
Sebastiaan van Stijn
2c5e0a008a client: rename ConfigListResult.Configs to ConfigListResult.Items
Also consolidate the options with the method.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 20:43:38 +02:00
Sebastiaan van Stijn
c18c432852 Merge pull request #51246 from thaJeztah/volume_list
client: rename VolumeListResult.List to VolumeListResult.Items
2025-10-21 19:19:23 +02:00
Sebastiaan van Stijn
67cbf36ac9 client: remove VolumeInspectWithRaw, merge with VolumeInspect
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 19:00:57 +02:00
Sebastiaan van Stijn
26d57f42a8 Merge pull request #51245 from thaJeztah/network_opts
client: NetworkInspect, NetworkList: wrap output structs, and remove NetworkInspectWithRaw
2025-10-21 18:50:33 +02:00
Austin Vazquez
e30e80de0a Merge pull request #51244 from austinvazquez/refactor-client-swarm
client: refactor swarm api functions to wrap params/responses
2025-10-21 11:35:56 -05:00
Sebastiaan van Stijn
5a04a9718d client: rename VolumeListResult.List to VolumeListResult.Items
Trying to find a common naming for these fields.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 18:07:50 +02:00
Sebastiaan van Stijn
485b95600a client: NetworkList: wrap result
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 17:40:19 +02:00
Sebastiaan van Stijn
3fbf5a3bd1 client: NetworkInspect: wrap result and remove NetworkInspectWithRaw
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 17:26:24 +02:00
Austin Vazquez
612342198c client: refactor swarm api functions to wrap params/responses
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-21 10:17:04 -05:00
Sebastiaan van Stijn
ac9838ffd1 Merge pull request #51236 from vvoland/client-image-opts-functionalwrap
client/image_(inspect,history,load,save): Wrap return values
2025-10-21 16:54:02 +02:00
Sebastiaan van Stijn
b60738d19f Merge pull request #51234 from austinvazquez/refactor-client-task
client: refactor task responses
2025-10-21 16:52:00 +02:00
Sebastiaan van Stijn
8c1a909601 Merge pull request #51148 from ndeloof/decode-JSONMessage-push
introduce ImagePushResponse
2025-10-21 16:15:49 +02:00
Austin Vazquez
38ef4fd576 client: refactor task responses
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 14:36:30 +02:00
Paweł Gronowski
2d69edd28a client/image_(inspect,history,load,save): Wrap return values
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 14:23:38 +02:00
Sebastiaan van Stijn
0030ba21e3 client: ContainerCreate: remove handling of legacy MacAddress
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 08:33:42 +02:00