github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/rds/v1/flavors/requests.go (about) 1 package flavors 2 3 import ( 4 "fmt" 5 6 "github.com/chnsz/golangsdk" 7 ) 8 9 var RequestOpts golangsdk.RequestOpts = golangsdk.RequestOpts{ 10 MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, 11 } 12 13 //list the flavors informations about a specified id of database 14 func List(client *golangsdk.ServiceClient, dataStoreID string, region string) (r ListResult) { 15 url := listURL(client) 16 url += fmt.Sprintf("?dbId=%s®ion=%s", dataStoreID, region) 17 _, r.Err = client.Get(url, &r.Body, &golangsdk.RequestOpts{ 18 OkCodes: []int{200}, 19 MoreHeaders: RequestOpts.MoreHeaders, JSONBody: nil, 20 }) 21 return 22 }