github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/blockstorage/v1/apiversions/requests.go (about)

     1  package apiversions
     2  
     3  import (
     4  	"github.com/huaweicloud/golangsdk"
     5  	"github.com/huaweicloud/golangsdk/pagination"
     6  )
     7  
     8  // List lists all the Cinder API versions available to end-users.
     9  func List(c *golangsdk.ServiceClient) pagination.Pager {
    10  	return pagination.NewPager(c, listURL(c), func(r pagination.PageResult) pagination.Page {
    11  		return APIVersionPage{pagination.SinglePageBase(r)}
    12  	})
    13  }
    14  
    15  // Get will retrieve the volume type with the provided ID. To extract the volume
    16  // type from the result, call the Extract method on the GetResult.
    17  func Get(client *golangsdk.ServiceClient, v string) (r GetResult) {
    18  	_, r.Err = client.Get(getURL(client, v), &r.Body, nil)
    19  	return
    20  }