summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/images.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/varlinkapi/images.go')
-rw-r--r--pkg/varlinkapi/images.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index 0ca867410..63d500204 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -910,3 +910,16 @@ func (i *LibpodAPI) LoadImage(call iopodman.VarlinkCall, name, inputFile string,
}
return call.ReplyLoadImage(br)
}
+
+// Diff ...
+func (i *LibpodAPI) Diff(call iopodman.VarlinkCall, name string) error {
+ var response []iopodman.DiffInfo
+ changes, err := i.Runtime.GetDiff("", name)
+ if err != nil {
+ return call.ReplyErrorOccurred(err.Error())
+ }
+ for _, change := range changes {
+ response = append(response, iopodman.DiffInfo{Path: change.Path, ChangeType: change.Kind.String()})
+ }
+ return call.ReplyDiff(response)
+}