Merge pull request #50787 from austinvazquez/move-registry-search-options-to-client

api/types/registry: move registry search options to client
This commit is contained in:
Sebastiaan van Stijn
2025-08-22 12:02:05 +02:00
committed by GitHub
9 changed files with 54 additions and 52 deletions

View File

@@ -1,26 +1,5 @@
package registry
import (
"context"
"github.com/moby/moby/api/types/filters"
)
// SearchOptions holds parameters to search images with.
type SearchOptions struct {
RegistryAuth string
// PrivilegeFunc is a function that clients can supply to retry operations
// after getting an authorization error. This function returns the registry
// authentication header value in base64 encoded format, or an error if the
// privilege request fails.
//
// For details, refer to [github.com/moby/moby/api/types/registry.RequestAuthConfig].
PrivilegeFunc func(context.Context) (string, error)
Filters filters.Args
Limit int
}
// SearchResult describes a search result returned from a registry
type SearchResult struct {
// StarCount indicates the number of stars this repository has