This is an automated email from the ASF dual-hosted git repository.

dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git

commit 6ec02e4446ab847de2fa7aef4b04b6a5b9670d61
Author: Dan Kirkwood <dang...@apache.org>
AuthorDate: Thu Mar 1 15:27:07 2018 -0700

    lastUpdated field must be tc.TimeNoMod
---
 lib/go-tc/hwinfos.go                                         | 12 ++++++------
 lib/go-tc/servers.go                                         |  2 +-
 traffic_ops/traffic_ops_golang/api/change_log.go             | 12 ++++++------
 traffic_ops/traffic_ops_golang/division/divisions.go         |  4 ++--
 traffic_ops/traffic_ops_golang/division/divisions_test.go    |  2 +-
 traffic_ops/traffic_ops_golang/hwinfo_test.go                |  2 +-
 traffic_ops/traffic_ops_golang/parameters_test.go            |  2 +-
 traffic_ops/traffic_ops_golang/region/regions.go             |  4 ++--
 traffic_ops/traffic_ops_golang/region/regions_test.go        |  2 +-
 traffic_ops/traffic_ops_golang/servers_test.go               |  2 +-
 traffic_ops/traffic_ops_golang/status/statuses.go            |  4 ++--
 traffic_ops/traffic_ops_golang/status/statuses_test.go       |  2 +-
 .../traffic_ops_golang/systeminfo/system_info_test.go        |  4 ++--
 13 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/lib/go-tc/hwinfos.go b/lib/go-tc/hwinfos.go
index 022923e..f1a6c0a 100644
--- a/lib/go-tc/hwinfos.go
+++ b/lib/go-tc/hwinfos.go
@@ -24,10 +24,10 @@ type HWInfoResponse struct {
 }
 
 type HWInfo struct {
-       Description    string `json:"description" db:"description"`
-       ID             int    `json:"-" db:"id"`
-       LastUpdated    Time   `json:"lastUpdated" db:"last_updated"`
-       ServerHostName string `json:"serverHostName" db:"serverhostname"`
-       ServerID       int    `json:"serverId" db:"serverid"`
-       Val            string `json:"val" db:"val"`
+       Description    string    `json:"description" db:"description"`
+       ID             int       `json:"-" db:"id"`
+       LastUpdated    TimeNoMod `json:"lastUpdated" db:"last_updated"`
+       ServerHostName string    `json:"serverHostName" db:"serverhostname"`
+       ServerID       int       `json:"serverId" db:"serverid"`
+       Val            string    `json:"val" db:"val"`
 }
diff --git a/lib/go-tc/servers.go b/lib/go-tc/servers.go
index 24ffbc5..123be14 100644
--- a/lib/go-tc/servers.go
+++ b/lib/go-tc/servers.go
@@ -55,7 +55,7 @@ type Server struct {
        IPAddress        string              `json:"ipAddress" db:"ip_address"`
        IPGateway        string              `json:"ipGateway" db:"ip_gateway"`
        IPNetmask        string              `json:"ipNetmask" db:"ip_netmask"`
-       LastUpdated      Time            `json:"lastUpdated" db:"last_updated"`
+       LastUpdated      TimeNoMod           `json:"lastUpdated" 
db:"last_updated"`
        MgmtIPAddress    string              `json:"mgmtIpAddress" 
db:"mgmt_ip_address"`
        MgmtIPGateway    string              `json:"mgmtIpGateway" 
db:"mgmt_ip_gateway"`
        MgmtIPNetmask    string              `json:"mgmtIpNetmask" 
db:"mgmt_ip_netmask"`
diff --git a/traffic_ops/traffic_ops_golang/api/change_log.go 
b/traffic_ops/traffic_ops_golang/api/change_log.go
index 4136bbd..579d063 100644
--- a/traffic_ops/traffic_ops_golang/api/change_log.go
+++ b/traffic_ops/traffic_ops_golang/api/change_log.go
@@ -29,12 +29,12 @@ import (
 )
 
 type ChangeLog struct {
-       ID          int     `json:"id" db:"id"`
-       Level       string  `json:"level" db:"level"`
-       Message     string  `json:"message" db:"message"`
-       TMUser      int     `json:"tmUser" db:"tm_user"`
-       TicketNum   string  `json:"ticketNum" db:"ticketnum"`
-       LastUpdated tc.Time `json:"lastUpdated" db:"last_updated"`
+       ID          int          `json:"id" db:"id"`
+       Level       string       `json:"level" db:"level"`
+       Message     string       `json:"message" db:"message"`
+       TMUser      int          `json:"tmUser" db:"tm_user"`
+       TicketNum   string       `json:"ticketNum" db:"ticketnum"`
+       LastUpdated tc.TimeNoMod `json:"lastUpdated" db:"last_updated"`
 }
 
 type ChangeLogger interface {
diff --git a/traffic_ops/traffic_ops_golang/division/divisions.go 
b/traffic_ops/traffic_ops_golang/division/divisions.go
index a461a3c..f548912 100644
--- a/traffic_ops/traffic_ops_golang/division/divisions.go
+++ b/traffic_ops/traffic_ops_golang/division/divisions.go
@@ -106,7 +106,7 @@ func (division *TODivision) Create(db *sqlx.DB, user 
auth.CurrentUser) (error, t
        defer resultRows.Close()
 
        var id int
-       var lastUpdated tc.Time
+       var lastUpdated tc.TimeNoMod
        rowsAffected := 0
        for resultRows.Next() {
                rowsAffected++
@@ -208,7 +208,7 @@ func (division *TODivision) Update(db *sqlx.DB, user 
auth.CurrentUser) (error, t
        }
        defer resultRows.Close()
 
-       var lastUpdated tc.Time
+       var lastUpdated tc.TimeNoMod
        rowsAffected := 0
        for resultRows.Next() {
                rowsAffected++
diff --git a/traffic_ops/traffic_ops_golang/division/divisions_test.go 
b/traffic_ops/traffic_ops_golang/division/divisions_test.go
index 10ab007..c783838 100644
--- a/traffic_ops/traffic_ops_golang/division/divisions_test.go
+++ b/traffic_ops/traffic_ops_golang/division/divisions_test.go
@@ -36,7 +36,7 @@ func getTestDivisions() []tc.Division {
        testCase := tc.Division{
                ID:          1,
                Name:        "division1",
-               LastUpdated: tc.Time{Time: time.Now()},
+               LastUpdated: tc.TimeNoMod{Time: time.Now()},
        }
        regions = append(regions, testCase)
 
diff --git a/traffic_ops/traffic_ops_golang/hwinfo_test.go 
b/traffic_ops/traffic_ops_golang/hwinfo_test.go
index 0a2a4f8..415f8de 100644
--- a/traffic_ops/traffic_ops_golang/hwinfo_test.go
+++ b/traffic_ops/traffic_ops_golang/hwinfo_test.go
@@ -40,7 +40,7 @@ func getTestHWInfo() []tc.HWInfo {
                ServerHostName: "testserver1",
                Description:    "Description",
                Val:            "Val",
-               LastUpdated:    tc.Time{Time: time.Now()},
+               LastUpdated:    tc.TimeNoMod{Time: time.Now()},
        }
        hwinfo = append(hwinfo, testHWInfo)
 
diff --git a/traffic_ops/traffic_ops_golang/parameters_test.go 
b/traffic_ops/traffic_ops_golang/parameters_test.go
index 8a26b6b..1b9049c 100644
--- a/traffic_ops/traffic_ops_golang/parameters_test.go
+++ b/traffic_ops/traffic_ops_golang/parameters_test.go
@@ -38,7 +38,7 @@ func getTestParameters() []tc.Parameter {
        testParameter := tc.Parameter{
                ConfigFile:  "global",
                ID:          1,
-               LastUpdated: tc.Time{Time: time.Now()},
+               LastUpdated: tc.TimeNoMod{Time: time.Now()},
                Name:        "paramname1",
                Profiles:    json.RawMessage(`["foo","bar"]`),
                Secure:      false,
diff --git a/traffic_ops/traffic_ops_golang/region/regions.go 
b/traffic_ops/traffic_ops_golang/region/regions.go
index 52d881d..6719f3e 100644
--- a/traffic_ops/traffic_ops_golang/region/regions.go
+++ b/traffic_ops/traffic_ops_golang/region/regions.go
@@ -155,7 +155,7 @@ func (region *TORegion) Update(db *sqlx.DB, user 
auth.CurrentUser) (error, tc.Ap
        }
        defer resultRows.Close()
 
-       var lastUpdated tc.Time
+       var lastUpdated tc.TimeNoMod
        rowsAffected := 0
        for resultRows.Next() {
                rowsAffected++
@@ -220,7 +220,7 @@ func (region *TORegion) Create(db *sqlx.DB, user 
auth.CurrentUser) (error, tc.Ap
        defer resultRows.Close()
 
        var id int
-       var lastUpdated tc.Time
+       var lastUpdated tc.TimeNoMod
        rowsAffected := 0
        for resultRows.Next() {
                rowsAffected++
diff --git a/traffic_ops/traffic_ops_golang/region/regions_test.go 
b/traffic_ops/traffic_ops_golang/region/regions_test.go
index 0a9f28f..3f08cc1 100644
--- a/traffic_ops/traffic_ops_golang/region/regions_test.go
+++ b/traffic_ops/traffic_ops_golang/region/regions_test.go
@@ -38,7 +38,7 @@ func getTestRegions() []tc.Region {
                DivisionName: "west",
                ID:           1,
                Name:         "region1",
-               LastUpdated:  tc.Time{Time: time.Now()},
+               LastUpdated:  tc.TimeNoMod{Time: time.Now()},
        }
        regions = append(regions, testCase)
 
diff --git a/traffic_ops/traffic_ops_golang/servers_test.go 
b/traffic_ops/traffic_ops_golang/servers_test.go
index f52d880..012b0d5 100644
--- a/traffic_ops/traffic_ops_golang/servers_test.go
+++ b/traffic_ops/traffic_ops_golang/servers_test.go
@@ -56,7 +56,7 @@ func getTestServers() []tc.Server {
                IPAddress:      "ipAddress",
                IPGateway:      "ipGateway",
                IPNetmask:      "ipNetmask",
-               LastUpdated:    tc.Time{Time: time.Now()},
+               LastUpdated:    tc.TimeNoMod{Time: time.Now()},
                MgmtIPAddress:  "mgmtIpAddress",
                MgmtIPGateway:  "mgmtIpGateway",
                MgmtIPNetmask:  "mgmtIpNetmask",
diff --git a/traffic_ops/traffic_ops_golang/status/statuses.go 
b/traffic_ops/traffic_ops_golang/status/statuses.go
index d273e03..ff5b395 100644
--- a/traffic_ops/traffic_ops_golang/status/statuses.go
+++ b/traffic_ops/traffic_ops_golang/status/statuses.go
@@ -155,7 +155,7 @@ func (status *TOStatus) Update(db *sqlx.DB, user 
auth.CurrentUser) (error, tc.Ap
        }
        defer resultRows.Close()
 
-       var lastUpdated tc.Time
+       var lastUpdated tc.TimeNoMod
        rowsAffected := 0
        for resultRows.Next() {
                rowsAffected++
@@ -222,7 +222,7 @@ func (status *TOStatus) Create(db *sqlx.DB, user 
auth.CurrentUser) (error, tc.Ap
        defer resultRows.Close()
 
        var id int
-       var lastUpdated tc.Time
+       var lastUpdated tc.TimeNoMod
        rowsAffected := 0
        for resultRows.Next() {
                rowsAffected++
diff --git a/traffic_ops/traffic_ops_golang/status/statuses_test.go 
b/traffic_ops/traffic_ops_golang/status/statuses_test.go
index ca37fa4..cc8b80b 100644
--- a/traffic_ops/traffic_ops_golang/status/statuses_test.go
+++ b/traffic_ops/traffic_ops_golang/status/statuses_test.go
@@ -38,7 +38,7 @@ func getTestStatuses() []tc.Status {
                Description: "description",
                ID:          1,
                Name:        "cdn1",
-               LastUpdated: tc.Time{Time: time.Now()},
+               LastUpdated: tc.TimeNoMod{Time: time.Now()},
        }
        cdns = append(cdns, testStatus)
 
diff --git a/traffic_ops/traffic_ops_golang/systeminfo/system_info_test.go 
b/traffic_ops/traffic_ops_golang/systeminfo/system_info_test.go
index 902ea40..e1628d4 100644
--- a/traffic_ops/traffic_ops_golang/systeminfo/system_info_test.go
+++ b/traffic_ops/traffic_ops_golang/systeminfo/system_info_test.go
@@ -37,7 +37,7 @@ var sysInfoParameters = []tc.Parameter{
        tc.Parameter{
                ConfigFile:  "global",
                ID:          1,
-               LastUpdated: tc.Time{Time: time.Now()},
+               LastUpdated: tc.TimeNoMod{Time: time.Now()},
                Name:        "paramname1",
                Profiles:    json.RawMessage(`["foo","bar"]`),
                Secure:      false,
@@ -47,7 +47,7 @@ var sysInfoParameters = []tc.Parameter{
        tc.Parameter{
                ConfigFile:  "global",
                ID:          2,
-               LastUpdated: tc.Time{Time: time.Now()},
+               LastUpdated: tc.TimeNoMod{Time: time.Now()},
                Name:        "paramname2",
                Profiles:    json.RawMessage(`["foo","bar"]`),
                Secure:      false,

-- 
To stop receiving notification emails like this one, please contact
dang...@apache.org.

Reply via email to