// ListImages returns a List of Images
// TODO: filter images based on request
ListImages returns a List of Images
TODO: filter images based on request
// ListImages returns a List of Images // TODO : filter images based on request
func (s *ImageService) ListImages(ctx context.Context, req *runtimeapi.ListImagesRequest) (*runtimeapi.ListImagesResponse, error) {
	images, err := s.client.ImageList(ctx, types.ImageListOptions{})
	if err != nil {
		return nil, err
	}
	respImages := []*runtimeapi.Image{}
	for _, image := range images {
		respImages = append(respImages, &runtimeapi.Image{
			Id:          image.ID,
			RepoTags:    image.RepoTags,
			RepoDigests: image.RepoDigests,
			Size_:       uint64(image.Size),
		})
	}
	return &runtimeapi.ListImagesResponse{
		Images: respImages,
	}, nil
}
func ( s * ImageService ) ListImages ( ctx context . Context , req * runtimeapi . ListImagesRequest ) ( * runtimeapi . ListImagesResponse , error ) { images , err := s . client . ImageList ( ctx , types . ImageListOptions { } ) if err != nil { return nil , err } respImages := [ ] * runtimeapi . Image { } for _ , image := range images { respImages = append ( respImages , & runtimeapi . Image { Id : image . ID , RepoTags : image . RepoTags , RepoDigests : image . RepoDigests , Size_ : uint64 ( image . Size ) , } ) } return & runtimeapi . ListImagesResponse { Images : respImages , } , nil }
ListImages returns a List of Images
TODO: filter images based on request
ListImages returns a List of Images TODO : filter images based on request