1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Update digitalocean module (#622)

Related #619
This commit is contained in:
Juho Teperi
2020-02-14 13:40:14 +02:00
committed by GitHub
parent 0f07d91f54
commit 737c8b5616
36 changed files with 695 additions and 84 deletions

View File

@@ -125,6 +125,7 @@ type ProjectResourceLinks struct {
type projectsRoot struct {
Projects []Project `json:"projects"`
Links *Links `json:"links"`
Meta *Meta `json:"meta"`
}
type projectRoot struct {
@@ -134,6 +135,7 @@ type projectRoot struct {
type projectResourcesRoot struct {
Resources []ProjectResource `json:"resources"`
Links *Links `json:"links,omitempty"`
Meta *Meta `json:"meta"`
}
var _ ProjectsService = &ProjectsServiceOp{}
@@ -158,6 +160,9 @@ func (p *ProjectsServiceOp) List(ctx context.Context, opts *ListOptions) ([]Proj
if l := root.Links; l != nil {
resp.Links = l
}
if m := root.Meta; m != nil {
resp.Meta = m
}
return root.Projects, resp, err
}
@@ -238,6 +243,9 @@ func (p *ProjectsServiceOp) ListResources(ctx context.Context, projectID string,
if l := root.Links; l != nil {
resp.Links = l
}
if m := root.Meta; m != nil {
resp.Meta = m
}
return root.Resources, resp, err
}