change all time fields to have type time.Time (#190)
* add Volume.Unmarshal
* add volumetenants.VolumeExt.Unmarshal
* create servers.Server time.Time fields
* json.Unmarshal can correctly handle time.RFC3339 (Server time fields)
* add v3 Token UnmarshalJSON method
* check for empty string when unmarshaling time
* add Member UnmarshalJSON
* v3 tokens.Token ExtractInto
* v3 trust.Trust UnmarshalJSON
* time.Time fields swift response objects
* time.Time fields for orchestration response objects
* time.Time fields for shared file systems response objects
* if we don't use pointers for the custom time fields, we don't need to check if they're nil
* style guide fixes: 'r' for receiver, 's' for struct
* remove unnecessary pointers from UnmarshalJSON methods
diff --git a/openstack/orchestration/v1/stackevents/testing/fixtures.go b/openstack/orchestration/v1/stackevents/testing/fixtures.go
index a7af025..a40e8d4 100644
--- a/openstack/orchestration/v1/stackevents/testing/fixtures.go
+++ b/openstack/orchestration/v1/stackevents/testing/fixtures.go
@@ -16,7 +16,7 @@
var FindExpected = []stackevents.Event{
{
ResourceName: "hello_world",
- Time: gophercloud.JSONRFC3339NoZ(time.Date(2015, 2, 5, 21, 33, 11, 0, time.UTC)),
+ Time: time.Date(2015, 2, 5, 21, 33, 11, 0, time.UTC),
Links: []gophercloud.Link{
{
Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b/resources/hello_world/events/06feb26f-9298-4a9b-8749-9d770e5d577a",
@@ -39,7 +39,7 @@
},
{
ResourceName: "hello_world",
- Time: gophercloud.JSONRFC3339NoZ(time.Date(2015, 2, 5, 21, 33, 27, 0, time.UTC)),
+ Time: time.Date(2015, 2, 5, 21, 33, 27, 0, time.UTC),
Links: []gophercloud.Link{
{
Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b/resources/hello_world/events/93940999-7d40-44ae-8de4-19624e7b8d18",
@@ -133,7 +133,7 @@
var ListExpected = []stackevents.Event{
{
ResourceName: "hello_world",
- Time: gophercloud.JSONRFC3339NoZ(time.Date(2015, 2, 5, 21, 33, 11, 0, time.UTC)),
+ Time: time.Date(2015, 2, 5, 21, 33, 11, 0, time.UTC),
Links: []gophercloud.Link{
{
Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b/resources/hello_world/events/06feb26f-9298-4a9b-8749-9d770e5d577a",
@@ -156,7 +156,7 @@
},
{
ResourceName: "hello_world",
- Time: gophercloud.JSONRFC3339NoZ(time.Date(2015, 2, 5, 21, 33, 27, 0, time.UTC)),
+ Time: time.Date(2015, 2, 5, 21, 33, 27, 0, time.UTC),
Links: []gophercloud.Link{
{
Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b/resources/hello_world/events/93940999-7d40-44ae-8de4-19624e7b8d18",
@@ -258,7 +258,7 @@
var ListResourceEventsExpected = []stackevents.Event{
{
ResourceName: "hello_world",
- Time: gophercloud.JSONRFC3339NoZ(time.Date(2015, 2, 5, 21, 33, 11, 0, time.UTC)),
+ Time: time.Date(2015, 2, 5, 21, 33, 11, 0, time.UTC),
Links: []gophercloud.Link{
{
Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b/resources/hello_world/events/06feb26f-9298-4a9b-8749-9d770e5d577a",
@@ -281,7 +281,7 @@
},
{
ResourceName: "hello_world",
- Time: gophercloud.JSONRFC3339NoZ(time.Date(2015, 2, 5, 21, 33, 27, 0, time.UTC)),
+ Time: time.Date(2015, 2, 5, 21, 33, 27, 0, time.UTC),
Links: []gophercloud.Link{
{
Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b/resources/hello_world/events/93940999-7d40-44ae-8de4-19624e7b8d18",
@@ -382,7 +382,7 @@
// GetExpected represents the expected object from a Get request.
var GetExpected = &stackevents.Event{
ResourceName: "hello_world",
- Time: gophercloud.JSONRFC3339NoZ(time.Date(2015, 2, 5, 21, 33, 27, 0, time.UTC)),
+ Time: time.Date(2015, 2, 5, 21, 33, 27, 0, time.UTC),
Links: []gophercloud.Link{
{
Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b/resources/hello_world/events/93940999-7d40-44ae-8de4-19624e7b8d18",