github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/builtin/providers/profitbricks/config.go (about) 1 package profitbricks 2 3 import ( 4 "github.com/profitbricks/profitbricks-sdk-go" 5 ) 6 7 type Config struct { 8 Username string 9 Password string 10 Endpoint string 11 Retries int 12 } 13 14 // Client() returns a new client for accessing digital ocean. 15 func (c *Config) Client() (*Config, error) { 16 profitbricks.SetAuth(c.Username, c.Password) 17 profitbricks.SetDepth("5") 18 if len(c.Endpoint) > 0 { 19 profitbricks.SetEndpoint(c.Endpoint) 20 } 21 return c, nil 22 }