rob05c commented on a change in pull request #2282: Deliveryservice_Server API 
conversion to Go - formerly #2269
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2282#discussion_r189707065
 
 

 ##########
 File path: lib/go-tc/deliveryservice_servers.go
 ##########
 @@ -19,21 +21,47 @@ import "time"
 
 // DeliveryServiceServerResponse ...
 type DeliveryServiceServerResponse struct {
+       Orderby  string                  `json:"orderby"`
        Response []DeliveryServiceServer `json:"response"`
        Size     int                     `json:"size"`
-       OrderBy  string                  `json:"orderby"`
        Limit    int                     `json:"limit"`
 }
 
+type DSSMapResponse struct {
+       DsId    int   `json:"dsId"`
+       Replace bool  `json:"replace"`
+       Servers []int `json:"servers"`
+}
+
+type DSSReplaceResponse struct {
+       Alerts   []Alert        `json:"alerts"`
+       Response DSSMapResponse `json:"response"`
+}
+
+type DSServersResponse struct {
+       Response DeliveryServiceServers `json:"response"`
+}
+
+type DeliveryServiceServers struct {
+       ServerNames []string `json:"serverNames"`
+       XmlId       string   `json:"xmlId"`
+}
+
 // DeliveryServiceServer ...
 type DeliveryServiceServer struct {
-       Server          *int             `json:"server"`
-       DeliveryService *int             `json:"deliveryService"`
-       LastUpdated     *TimeNoMod       `json:"lastUpdated" db:"last_updated"`
+       Server          *int       `json:"server" db:"server"`
+       DeliveryService *int       `json:"deliveryService" db:"deliveryservice"`
+       LastUpdated     *TimeNoMod `json:"lastUpdated" db:"last_updated"`
 }
 
+type Filter int
+const (
+       ASSIGNED Filter = iota
 
 Review comment:
   Go enums and constants are CamelCased, not ALLCAPS. These should be 
`Assigned`, `Unassigned`, `Eligible`

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to