mirror of
https://github.com/containers/podman.git
synced 2025-10-11 16:26:00 +08:00
SearchImages: extend API with filter parameter
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
2
API.md
2
API.md
@ -107,7 +107,7 @@ in the [API.md](https://github.com/containers/libpod/blob/master/API.md) file in
|
||||
|
||||
[func RestartPod(name: string) string](#RestartPod)
|
||||
|
||||
[func SearchImages(query: string, limit: , tlsVerify: ) ImageSearchResult](#SearchImages)
|
||||
[func SearchImages(query: string, limit: int, tlsVerify: ?bool, filter: []string) ImageSearchResult](#SearchImages)
|
||||
|
||||
[func SendFile(type: string, length: int) string](#SendFile)
|
||||
|
||||
|
@ -681,7 +681,7 @@ method RemoveImage(name: string, force: bool) -> (image: string)
|
||||
# SearchImages searches available registries for images that contain the
|
||||
# contents of "query" in their name. If "limit" is given, limits the amount of
|
||||
# search results per registry.
|
||||
method SearchImages(query: string, limit: ?int, tlsVerify: ?bool) -> (results: []ImageSearchResult)
|
||||
method SearchImages(query: string, limit: ?int, tlsVerify: ?bool, filter: []string) -> (results: []ImageSearchResult)
|
||||
|
||||
# DeleteUnusedImages deletes any images not associated with a container. The IDs of the deleted images are returned
|
||||
# in a string array.
|
||||
|
@ -434,9 +434,10 @@ func (i *LibpodAPI) RemoveImage(call iopodman.VarlinkCall, name string, force bo
|
||||
|
||||
// SearchImages searches all registries configured in /etc/containers/registries.conf for an image
|
||||
// Requires an image name and a search limit as int
|
||||
func (i *LibpodAPI) SearchImages(call iopodman.VarlinkCall, query string, limit *int64, tlsVerify *bool) error {
|
||||
func (i *LibpodAPI) SearchImages(call iopodman.VarlinkCall, query string, limit *int64, tlsVerify *bool, filter []string) error {
|
||||
searchOptions := image.SearchOptions{
|
||||
Limit: 1000,
|
||||
Filter: filter,
|
||||
InsecureSkipTLSVerify: types.NewOptionalBool(!*tlsVerify),
|
||||
}
|
||||
results, err := image.SearchImages(query, searchOptions)
|
||||
|
Reference in New Issue
Block a user