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

     1  package datastores
     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 version informations about a specified type of database
    12  func List(client *golangsdk.ServiceClient, dataStoreName string) (r ListResult) {
    13  
    14  	_, r.Err = client.Get(listURL(client, dataStoreName), &r.Body, &golangsdk.RequestOpts{
    15  		OkCodes:     []int{200},
    16  		MoreHeaders: RequestOpts.MoreHeaders, JSONBody: nil,
    17  	})
    18  	return
    19  }