Vendor main dependencies.
This commit is contained in:
parent
49a09ab7dd
commit
dd5e3fba01
2738 changed files with 1045689 additions and 0 deletions
24
vendor/github.com/JamesClonk/vultr/lib/iso.go
generated
vendored
Normal file
24
vendor/github.com/JamesClonk/vultr/lib/iso.go
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
package lib
|
||||
|
||||
// ISO image on Vultr
|
||||
type ISO struct {
|
||||
ID int `json:"ISOID"`
|
||||
Created string `json:"date_created"`
|
||||
Filename string `json:"filename"`
|
||||
Size int `json:"size"`
|
||||
MD5sum string `json:"md5sum"`
|
||||
}
|
||||
|
||||
// GetISO returns a list of all ISO images on Vultr account
|
||||
func (c *Client) GetISO() ([]ISO, error) {
|
||||
var isoMap map[string]ISO
|
||||
if err := c.get(`iso/list`, &isoMap); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var isoList []ISO
|
||||
for _, iso := range isoMap {
|
||||
isoList = append(isoList, iso)
|
||||
}
|
||||
return isoList, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue