spiegel_podman/pkg/api/handlers/compat
Matt Heon 174631f726 Convert SpecGen values to be nullable where possible
SpecGen is our primary container creation abstraction, and is
used to connect our CLI to the Libpod container creation backend.
Because container creation has a million options (I exaggerate
only slightly), the struct is composed of several other structs,
many of which are quite large.

The core problem is that SpecGen is also an API type - it's used
in remote Podman. There, we have a client and a server, and we
want to respect the server's containers.conf. But how do we tell
what parts of SpecGen were set by the client explicitly, and what
parts were not? If we're not using nullable values, an explicit
empty string and a value never being set are identical - and we
can't tell if it's safe to grab a default from the server's
containers.conf.

Fortunately, we only really need to do this for booleans. An
empty string is sufficient to tell us that a string was unset
(even if the user explicitly gave us an empty string for an
option, filling in a default from the config file is acceptable).
This makes things a lot simpler. My initial attempt at this
changed everything, including strings, and it was far larger and
more painful.

Also, begin the first steps of removing all uses of
containers.conf defaults from client-side. Two are gone entirely,
the rest are marked as remove-when-possible.

[NO NEW TESTS NEEDED] This is just a refactor.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-01-30 10:42:24 -05:00
..
auth.go fix(deps): update module github.com/docker/docker to v24 2023-05-22 15:32:12 +02:00
changes.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00
containers.go Update module github.com/docker/docker to v25 2024-01-24 13:21:28 +01:00
containers_archive.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00
containers_attach.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00
containers_create.go Convert SpecGen values to be nullable where possible 2024-01-30 10:42:24 -05:00
containers_export.go export: use io.Writer instead of file 2022-12-20 14:38:41 +01:00
containers_logs.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00
containers_pause.go bump go module to version 4 2022-01-18 12:47:07 +01:00
containers_prune.go pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
containers_restart.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00
containers_start.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00
containers_stats_freebsd.go cmd/podman/system: add API server support on FreeBSD 2023-06-29 13:10:44 +01:00
containers_stats_linux.go vendor: update c/common 2023-11-02 19:46:22 +01:00
containers_stop.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00
containers_top.go Fix output of podman --remote top 2023-10-16 17:25:10 -04:00
containers_unpause.go bump go module to version 4 2022-01-18 12:47:07 +01:00
events.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00
exec.go Replace strings.SplitN with strings.Cut 2024-01-11 13:50:15 +00:00
images.go Update module github.com/docker/docker to v25 2024-01-24 13:21:28 +01:00
images_build.go Replace strings.SplitN with strings.Cut 2024-01-11 13:50:15 +00:00
images_history.go Add sha256: to images history id for docker compatibility 2023-04-26 14:38:07 -04:00
images_prune.go Update module github.com/docker/docker to v25 2024-01-24 13:21:28 +01:00
images_push.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00
images_remove.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00
images_save.go golangci-lint: enable nolintlint 2022-06-14 16:29:42 +02:00
images_search.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00
images_tag.go Fix stutters 2022-09-10 07:52:00 -04:00
info.go Update module github.com/docker/docker to v25 2024-01-24 13:21:28 +01:00
networks.go Update module github.com/docker/docker to v25 2024-01-24 13:21:28 +01:00
ping.go /_ping handler: return OSType http header 2023-08-28 22:28:16 +08:00
resize.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00
secrets.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00
system.go Update module github.com/docker/docker to v25 2024-01-24 13:21:28 +01:00
types.go stats compat API: return "id" lowercase 2023-03-22 14:36:35 +01:00
unsupported.go bump go module to version 4 2022-01-18 12:47:07 +01:00
version.go api: fix slow version endpoint 2023-07-10 15:46:45 +02:00
volumes.go fix: Docker API compatible bool deserialization 2023-08-14 15:09:14 +02:00