Skip to content

Commit

Permalink
Add resource type for load-balancers.
Browse files Browse the repository at this point in the history
Dedicated tagged resources were not added because the API does not
expose any LB-related information yet.
  • Loading branch information
Timo Reimann committed Mar 1, 2019
1 parent 886fc5e commit 5b3952a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5b3952a

Please sign in to comment.