Fixes
diff --git a/rackspace/db/v1/instances/results.go b/rackspace/db/v1/instances/results.go
index c2c68e1..d2eff6b 100644
--- a/rackspace/db/v1/instances/results.go
+++ b/rackspace/db/v1/instances/results.go
@@ -11,17 +11,42 @@
Version string
}
+// Instance represents a remote MySQL instance.
type Instance struct {
- Created string //time.Time
- Updated string //time.Time
+ // Indicates the datetime that the instance was created
+ Created string //time.Time
+
+ // Indicates the most recent datetime that the instance was updated.
+ Updated string //time.Time
+
+ // Indicates how the instance stores data.
Datastore Datastore
- Flavor os.Flavor
- Hostname string
- ID string
- Links []gophercloud.Link
- Name string
- Status string
- Volume os.Volume
+
+ // Indicates the hardware flavor the instance uses.
+ Flavor os.Flavor
+
+ // A DNS-resolvable hostname associated with the database instance (rather
+ // than an IPv4 address). Since the hostname always resolves to the correct
+ // IP address of the database instance, this relieves the user from the task
+ // of maintaining the mapping. Note that although the IP address may likely
+ // change on resizing, migrating, and so forth, the hostname always resolves
+ // to the correct database instance.
+ Hostname string
+
+ // Indicates the unique identifier for the instance resource.
+ ID string
+
+ // Exposes various links that reference the instance resource.
+ Links []gophercloud.Link
+
+ // The human-readable name of the instance.
+ Name string
+
+ // The build status of the instance.
+ Status string
+
+ // Information about the attached volume of the instance.
+ Volume os.Volume
}
func commonExtract(err error, body interface{}) (*Instance, error) {
@@ -46,10 +71,12 @@
return commonExtract(r.Err, r.Body)
}
+// GetResult represents the result of a Get operation.
type GetResult struct {
os.GetResult
}
+// Extract will extract an Instance from a GetResult.
func (r GetResult) Extract() (*Instance, error) {
return commonExtract(r.Err, r.Body)
}
@@ -58,6 +85,8 @@
gophercloud.Result
}
+// Extract will extract the configuration information (in the form of a map)
+// about a particular instance.
func (r ConfigResult) Extract() (map[string]string, error) {
if r.Err != nil {
return nil, r.Err
@@ -73,6 +102,7 @@
return response.Instance.Config, err
}
+// UpdateResult represents the result of an Update operation.
type UpdateResult struct {
gophercloud.ErrResult
}