aboutsummaryrefslogtreecommitdiff
path: root/pkg/bindings/volumes/volumes.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/bindings/volumes/volumes.go')
-rw-r--r--pkg/bindings/volumes/volumes.go15
1 files changed, 7 insertions, 8 deletions
diff --git a/pkg/bindings/volumes/volumes.go b/pkg/bindings/volumes/volumes.go
index a2164e0af..cef9246cb 100644
--- a/pkg/bindings/volumes/volumes.go
+++ b/pkg/bindings/volumes/volumes.go
@@ -7,7 +7,6 @@ import (
"strconv"
"strings"
- "github.com/containers/libpod/libpod"
"github.com/containers/libpod/pkg/bindings"
"github.com/containers/libpod/pkg/domain/entities"
jsoniter "github.com/json-iterator/go"
@@ -35,9 +34,9 @@ func Create(ctx context.Context, config entities.VolumeCreateOptions) (*entities
}
// Inspect returns low-level information about a volume.
-func Inspect(ctx context.Context, nameOrID string) (*libpod.InspectVolumeData, error) {
+func Inspect(ctx context.Context, nameOrID string) (*entities.VolumeConfigResponse, error) {
var (
- inspect libpod.InspectVolumeData
+ inspect entities.VolumeConfigResponse
)
conn, err := bindings.GetClient(ctx)
if err != nil {
@@ -52,9 +51,9 @@ func Inspect(ctx context.Context, nameOrID string) (*libpod.InspectVolumeData, e
// List returns the configurations for existing volumes in the form of a slice. Optionally, filters
// can be used to refine the list of volumes.
-func List(ctx context.Context, filters map[string][]string) ([]*libpod.VolumeConfig, error) {
+func List(ctx context.Context, filters map[string][]string) ([]*entities.VolumeListReport, error) {
var (
- vols []*libpod.VolumeConfig
+ vols []*entities.VolumeListReport
)
conn, err := bindings.GetClient(ctx)
if err != nil {
@@ -76,9 +75,9 @@ func List(ctx context.Context, filters map[string][]string) ([]*libpod.VolumeCon
}
// Prune removes unused volumes from the local filesystem.
-func Prune(ctx context.Context) ([]string, error) {
+func Prune(ctx context.Context) ([]*entities.VolumePruneReport, error) {
var (
- pruned []string
+ pruned []*entities.VolumePruneReport
)
conn, err := bindings.GetClient(ctx)
if err != nil {
@@ -86,7 +85,7 @@ func Prune(ctx context.Context) ([]string, error) {
}
response, err := conn.DoRequest(nil, http.MethodPost, "/volumes/prune", nil)
if err != nil {
- return pruned, err
+ return nil, err
}
return pruned, response.Process(&pruned)
}