dangogh commented on a change in pull request #1993: [Issue-1617] - Traffic Ops
Keeps track of configuration differences between database and Traffic Servers
URL:
https://github.com/apache/incubator-trafficcontrol/pull/1993#discussion_r173950711
##########
File path: traffic_ops/traffic_ops_golang/cfgdiffs.go
##########
@@ -0,0 +1,303 @@
+package main
+
+import (
+ "database/sql"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "net/http"
+
+ "github.com/apache/incubator-trafficcontrol/lib/go-log"
+
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/auth"
+
+ "github.com/jmoiron/sqlx"
+)
+
+const CfgDiffsPrivLevel = auth.PrivLevelReadOnly
+const CfgDiffsWritePrivLevel = auth.PrivLevelOperations
+
+type CfgFileDiffs struct {
+ FileName string `json:"fileName"`
+ DBLinesMissing []string `json:"dbLinesMissing"`
+ DiskLinesMissing []string `json:"diskLinesMissing"`
+ ReportTimestamp string `json:"timestamp"`
+}
+
+type CfgFileDiffsResponse struct {
+ Response []CfgFileDiffs `json:"response"`
+}
+
Review comment:
is this Response struct used in more than one place? If not, should
probably just define it where it's used rather than making it exported.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services