Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vultr parse response : compute, dns, storage, bare metal #111

Merged
merged 6 commits into from
Jul 23, 2018

Conversation

OddCN
Copy link
Contributor

@OddCN OddCN commented Jul 20, 2018

user can use code below, to parse the result of listdDns()

the func ParseListDnsResp(response["body"]) will return a slice of BareMetalInfo

BareMetalInfo is a struct

	listDnsResp, err := vultrdns.ParseListDnsResp(response["body"])
	if err != nil {
		fmt.Println(err)
		return
	}

	for _, dns := range listDnsResp {
		fmt.Printf("%+v\n", dns)
	}

	fmt.Println(listDnsResp[0].Data)
	fmt.Println(listDnsResp[0].Name)
	fmt.Println(listDnsResp[0].Priority)
	fmt.Println(listDnsResp[0].RecordID)

int this PR, implemented

  • ParseListDnsResp()
  • ParseCreateDiskResp()
  • ParseCreateNodeResp()
  • ParseCreateBareMetalResp()
  • ParseListBareMetalResp()

and updated examples doc

@rehrumesh rehrumesh merged commit cff37c3 into leopardslab:master Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants