github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/rds/v3/flavors/ListDatastores.go (about) 1 package flavors 2 3 import ( 4 "github.com/opentelekomcloud/gophertelekomcloud" 5 "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 ) 7 8 func ListDatastores(client *golangsdk.ServiceClient, databaseName string) ([]DataStores, error) { 9 // GET https://{Endpoint}/v3/{project_id}/datastores/{database_name} 10 raw, err := client.Get(client.ServiceURL("datastores", databaseName), nil, nil) 11 if err != nil { 12 return nil, err 13 } 14 15 var res []DataStores 16 err = extract.IntoSlicePtr(raw.Body, &res, "dataStores") 17 return res, err 18 } 19 20 type DataStores struct { 21 // Indicates the database version ID. Its value is unique. 22 Id string `json:"id" ` 23 // Indicates the database version number. Only the major version number (two digits) is returned. 24 // For example, if the version number is MySQL 5.6.X, only 5.6 is returned. 25 Name string `json:"name"` 26 }