File: doc.go

package info (click to toggle)
golang-github-gophercloud-gophercloud 0.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, bullseye-backports
  • size: 10,224 kB
  • sloc: sh: 125; makefile: 21
file content (27 lines) | stat: -rw-r--r-- 697 bytes parent folder | download
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
/*
Package imageimport enables management of images import and retrieval of the
Imageservice Import API information.

Example to Get an information about the Import API

  importInfo, err := imageimport.Get(imagesClient).Extract()
  if err != nil {
    panic(err)
  }

  fmt.Printf("%+v\n", importInfo)

Example to Create a new image import

  createOpts := imageimport.CreateOpts{
    Name: imageimport.WebDownloadMethod,
    URI:  "http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img",
  }
  imageID := "da3b75d9-3f4a-40e7-8a2c-bfab23927dea"

  err := imageimport.Create(imagesClient, imageID, createOpts).ExtractErr()
  if err != nil {
    panic(err)
  }
*/
package imageimport