github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/builtin/providers/cloudstack/config.go (about) 1 package cloudstack 2 3 import "github.com/xanzy/go-cloudstack/cloudstack" 4 5 // Config is the configuration structure used to instantiate a 6 // new CloudStack client. 7 type Config struct { 8 APIURL string 9 APIKey string 10 SecretKey string 11 HTTPGETOnly bool 12 Timeout int64 13 } 14 15 // NewClient returns a new CloudStack client. 16 func (c *Config) NewClient() (*cloudstack.CloudStackClient, error) { 17 cs := cloudstack.NewAsyncClient(c.APIURL, c.APIKey, c.SecretKey, false) 18 cs.HTTPGETOnly = c.HTTPGETOnly 19 cs.AsyncTimeout(c.Timeout) 20 return cs, nil 21 }