func VultrFromJSON(jsonData []byte) (compute.Provider, error) { var cfg VultrJSONConfig err := json.Unmarshal(jsonData, &cfg) if err != nil { return nil, err } return &Vultr{ client: vultr.NewClient(cfg.ApiKey, nil), }, nil }
func MakeVultr(apiKey string, regionId int) *Vultr { this := new(Vultr) this.regionId = regionId this.client = vultr.NewClient(apiKey, nil) return this }