ocket8888 commented on a change in pull request #5922:
URL: https://github.com/apache/trafficcontrol/pull/5922#discussion_r650116333



##########
File path: lib/go-tc/deliveryservices.go
##########
@@ -192,18 +194,416 @@ type DeliveryServiceFieldsV31 struct {
 // DeliveryServiceV40 is a Delivery Service as it appears in version 4.0 of the
 // Traffic Ops API.
 type DeliveryServiceV40 struct {
-       DeliveryServiceFieldsV31
-       DeliveryServiceFieldsV30
-       DeliveryServiceFieldsV15
-       DeliveryServiceFieldsV14
-       DeliveryServiceFieldsV13
-       DeliveryServiceNullableFieldsV11
+       // Active dictates whether the Delivery Service is routed by Traffic 
Router.
+       Active bool `json:"active" db:"active"`

Review comment:
       Do you have a link to the list conversation?

##########
File path: lib/go-tc/deliveryservices.go
##########
@@ -192,18 +194,416 @@ type DeliveryServiceFieldsV31 struct {
 // DeliveryServiceV40 is a Delivery Service as it appears in version 4.0 of the
 // Traffic Ops API.
 type DeliveryServiceV40 struct {
-       DeliveryServiceFieldsV31
-       DeliveryServiceFieldsV30
-       DeliveryServiceFieldsV15
-       DeliveryServiceFieldsV14
-       DeliveryServiceFieldsV13
-       DeliveryServiceNullableFieldsV11
+       // Active dictates whether the Delivery Service is routed by Traffic 
Router.
+       Active bool `json:"active" db:"active"`

Review comment:
       ~~Do you have a link to the list conversation?~~ answered offline

##########
File path: lib/go-tc/deliveryservices.go
##########
@@ -192,18 +194,416 @@ type DeliveryServiceFieldsV31 struct {
 // DeliveryServiceV40 is a Delivery Service as it appears in version 4.0 of the
 // Traffic Ops API.
 type DeliveryServiceV40 struct {
-       DeliveryServiceFieldsV31
-       DeliveryServiceFieldsV30
-       DeliveryServiceFieldsV15
-       DeliveryServiceFieldsV14
-       DeliveryServiceFieldsV13
-       DeliveryServiceNullableFieldsV11
+       // Active dictates whether the Delivery Service is routed by Traffic 
Router.
+       Active bool `json:"active" db:"active"`

Review comment:
       That's sort of what I was thinking. Either `map[string]interface{}` or 
you could make "shadow structs" used internally in TO that mirror the API 
structs, except every property is `json.RawMessage`. Idk which would be 
easier/smaller.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to