github.com/gophercloud/gophercloud@v1.11.0/openstack/blockstorage/apiversions/doc.go (about) 1 /* 2 Package apiversions provides information and interaction with the different 3 API versions for the OpenStack Block Storage service, code-named Cinder. 4 5 Example of Retrieving all API Versions 6 7 allPages, err := apiversions.List(client).AllPages() 8 if err != nil { 9 panic("unable to get API versions: " + err.Error()) 10 } 11 12 allVersions, err := apiversions.ExtractAPIVersions(allPages) 13 if err != nil { 14 panic("unable to extract API versions: " + err.Error()) 15 } 16 17 for _, version := range allVersions { 18 fmt.Printf("%+v\n", version) 19 } 20 21 Example of Retrieving an API Version 22 23 version, err := apiversions.Get(client, "v3").Extract() 24 if err != nil { 25 panic("unable to get API version: " + err.Error()) 26 } 27 28 fmt.Printf("%+v\n", version) 29 */ 30 package apiversions