You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/02/10 20:10:49 UTC

[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #4388: Rewrote deliveryservices/{{ID}/safe to Go

ocket8888 commented on a change in pull request #4388: Rewrote deliveryservices/{{ID}/safe to Go
URL: https://github.com/apache/trafficcontrol/pull/4388#discussion_r377289998
 
 

 ##########
 File path: lib/go-tc/deliveryservices.go
 ##########
 @@ -607,3 +607,31 @@ type AssignedDsResponse struct {
 	DSIds    []int `json:"dsIds"`
 	Replace  bool  `json:"replace"`
 }
+
+// DeliveryServiceSafeUpdateRequest represents a request to update the "safe" fields of a
+// Delivery Service.
+type DeliveryServiceSafeUpdateRequest struct {
+	DisplayName *string `json:"displayName`
+	InfoURL *string `json:"infoUrl"`
+	LongDesc *string `json:"longDesc"`
+	LongDesc1 *string `json:"longDesc1`
+}
+
+// Validate implements the github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api.ParseValidator
+// interface.
+func (r *DeliveryServiceSafeUpdateRequest) Validate(*sql.Tx) error {
+	if r.DisplayName == nil {
 
 Review comment:
   No, Perl allowed empty strings and there's no database constraint to that effect.

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


With regards,
Apache Git Services