github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/networking/v2/apiversions/requests.go (about) 1 package apiversions 2 3 import ( 4 "github.com/huaweicloud/golangsdk" 5 "github.com/huaweicloud/golangsdk/pagination" 6 ) 7 8 // ListVersions lists all the Neutron API versions available to end-users. 9 func ListVersions(c *golangsdk.ServiceClient) pagination.Pager { 10 return pagination.NewPager(c, apiVersionsURL(c), func(r pagination.PageResult) pagination.Page { 11 return APIVersionPage{pagination.SinglePageBase(r)} 12 }) 13 } 14 15 // ListVersionResources lists all of the different API resources for a 16 // particular API versions. Typical resources for Neutron might be: networks, 17 // subnets, etc. 18 func ListVersionResources(c *golangsdk.ServiceClient, v string) pagination.Pager { 19 return pagination.NewPager(c, apiInfoURL(c, v), func(r pagination.PageResult) pagination.Page { 20 return APIVersionResourcePage{pagination.SinglePageBase(r)} 21 }) 22 }