forked from huaweicloud/huaweicloud-sdk-go
/
urls.go
39 lines (31 loc) · 1.35 KB
/
urls.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package cloudimages
import "github.com/YoungPioneers/huaweicloud-sdk-go"
// getImageTagsURL generate a url for getting tags of an image
func getImageTagsURL(c *gophercloud.ServiceClient) string {
return c.ServiceURL("cloudimages", "tags")
}
// putImageTagsURL generate a url for adding tag to an image
func putImageTagsURL(c *gophercloud.ServiceClient) string {
return c.ServiceURL("cloudimages", "tags")
}
// importImageURL generate a url for registering an image
func importImageURL(c *gophercloud.ServiceClient, imageID string) string {
return c.ServiceURL("cloudimages", imageID, "upload")
}
// exportImageURL generate a url for download an image to OBS
func exportImageURL(c *gophercloud.ServiceClient, imageID string) string {
return c.ServiceURL("cloudimages", imageID, "file")
}
// copyImageURL generate a url for copy image between regions
func copyImageURL(c *gophercloud.ServiceClient, imageID string) string {
return c.ServiceURL("cloudimages", imageID, "copy")
}
// imageMemberOpURL generate a URL for adding, updating or removing members to
// or from an image
func imageMemberOpURL(c *gophercloud.ServiceClient) string {
return c.ServiceURL("cloudimages", "members")
}
// getCloudImagesQuota generate a URL for query the quota of cloud images
func getCloudImagesQuota(c *gophercloud.ServiceClient) string {
return c.ServiceURL("cloudimages", "quota")
}