Commit Graph

6 Commits

Author SHA1 Message Date
Luke Granger-Brown 6dfa314396
Add AsRequest method on LoadBalancer
Updating a LoadBalancer requires a LoadBalancerRequest, which is not
easily creatable from a LoadBalancer.

Serializing the LoadBalancer to JSON and then deserializing it to a
LoadBalancerRequest mostly works, except that Region is a string on
the Request but not on the LB (since the LB returns the entire
Region object), so json.Unmarshal returns an error.

An explicit AsRequest method makes it easier for consumers of the API
to modify existing LoadBalancer objects, and is designed to avoid
modifying attributes on the original LoadBalancer when the
LoadBalancerRequest is modified.
2017-07-22 15:36:38 +01:00
Guus van Weelden 9e24e26f6b use http.MethodX instead of "GET"/"POST"/"DELETE" 2017-07-02 13:55:56 +02:00
akutz 8ed9e9ea6c Portable Go Context Usage
This patch updates the godo package to use a portable Go context -- a
Context that works with Go versions prior to Go 1.7 as well as Go 1.7
and onwards.
2017-04-07 15:32:33 -05:00
Marko Mudrinić 54b246befd
Removing executable permissions from Load Balancer files 2017-02-24 23:09:29 +01:00
Antoine Grondin dc14e4b04d add context.Context to all calls 2017-02-23 14:25:29 -05:00
Viola Holownia c99e714f33 Add support for LoadBalancers 2017-02-14 15:36:18 -05:00