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

     1  package flavors
     2  
     3  import (
     4  	"github.com/huaweicloud/golangsdk"
     5  )
     6  
     7  var RequestOpts golangsdk.RequestOpts = golangsdk.RequestOpts{
     8  	MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"},
     9  }
    10  
    11  //list the flavors informations about a specified id of database
    12  func List(client *golangsdk.ServiceClient, dataStoreID string, region string) (r ListResult) {
    13  
    14  	_, r.Err = client.Get(listURL(client, dataStoreID, region), &r.Body, &golangsdk.RequestOpts{
    15  		OkCodes:     []int{200},
    16  		MoreHeaders: RequestOpts.MoreHeaders, JSONBody: nil,
    17  	})
    18  	return
    19  }