moby--moby/registry
Sebastiaan van Stijn a5be5801e9
search: un-export registry.DefaultSearchLimit, and fix API status codes
Move the default to the service itself, and produce the correct status code
if an invalid limit was specified. The default is currently set both on the
cli and on the daemon side, and it should be only set on one of them.

There is a slight change in behavior; previously, searching with `--limit=0`
would produce an error, but with this change, it's considered the equivalent
of "no limit set" (and using the default).

We could keep the old behavior by passing a pointer (`nil` means "not set"),
but I left that for a follow-up exercise (we may want to pass an actual
config instead of separate arguments, as well as some other things that need
cleaning up).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-18 09:41:56 +01:00
..
resumable
auth.go registry: minor improvements and cleanup 2022-03-17 17:12:21 +01:00
auth_test.go
config.go registry: serviceConfig: don't embed registry.ServiceConfig 2022-03-17 17:12:30 +01:00
config_test.go
config_unix.go
config_windows.go
endpoint_test.go
endpoint_v1.go registry: minor improvements and cleanup 2022-03-17 17:12:21 +01:00
errors.go
registry.go registry: defaultService: use sync.RWMutex 2022-03-17 17:12:23 +01:00
registry_mock_test.go
registry_test.go registry: move allowNondistributableArtifacts, isSecureIndex to config 2022-03-17 17:12:28 +01:00
service.go search: un-export registry.DefaultSearchLimit, and fix API status codes 2022-03-18 09:41:56 +01:00
service_v2.go registry: move allowNondistributableArtifacts, isSecureIndex to config 2022-03-17 17:12:28 +01:00
session.go search: un-export registry.DefaultSearchLimit, and fix API status codes 2022-03-18 09:41:56 +01:00
types.go