Add DeleteImageById
diff --git a/images.go b/images.go
index 61a3369..a23e0bb 100644
--- a/images.go
+++ b/images.go
@@ -37,6 +37,20 @@
return is, err
}
+func (gsp *genericServersProvider) DeleteImageById(id string) error {
+ err := gsp.context.WithReauth(gsp.access, func() error {
+ url := gsp.endpoint + "/images/" + id
+ _, err := perigee.Request("DELETE", url, perigee.Options{
+ CustomClient: gsp.context.httpClient,
+ MoreHeaders: map[string]string{
+ "X-Auth-Token": gsp.access.AuthToken(),
+ },
+ })
+ return err
+ })
+ return err
+}
+
// ImageLink provides a reference to a image by either ID or by direct URL.
// Some services use just the ID, others use just the URL.
// This structure provides a common means of expressing both in a single field.