Merge pull request #206 from digitalocean/add-load-balancer-resource

Add resource type for load-balancers.
This commit is contained in:
Timo Reimann 2019-03-01 22:46:42 +01:00 committed by GitHub
commit c2eb9167fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -39,6 +39,8 @@ const (
ImageResourceType ResourceType = "image"
//VolumeResourceType holds the string representing our ResourceType of Volume.
VolumeResourceType ResourceType = "volume"
//LoadBalancerResourceType holds the string representing our ResourceType of LoadBalancer.
LoadBalancerResourceType ResourceType = "load_balancer"
)
// Resource represent a single resource for associating/disassociating with tags
@ -63,13 +65,16 @@ type TaggedDropletsResources struct {
LastTaggedURI string `json:"last_tagged_uri,omitempty"`
}
// TaggedResourcesData represent the image resources a tag is attached to
// TaggedResourcesData represent the generic resources a tag is attached to
type TaggedResourcesData struct {
Count int `json:"count,float64,omitempty"`
LastTaggedURI string `json:"last_tagged_uri,omitempty"`
}
// TaggedImagesResources represent the image resources a tag is attached to
type TaggedImagesResources TaggedResourcesData
// TaggedVolumesResources represent the volume resources a tag is attached to
type TaggedVolumesResources TaggedResourcesData
// Tag represent DigitalOcean tag