ocket8888 commented on a change in pull request #4481: Rework to_extensions to 
servercheck/extensions & plugins in 2.x
URL: https://github.com/apache/trafficcontrol/pull/4481#discussion_r391310675
 
 

 ##########
 File path: lib/go-tc/servercheckextensions.go
 ##########
 @@ -0,0 +1,86 @@
+package tc
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import (
+       "database/sql"
+       "errors"
+       "regexp"
+
+       "github.com/apache/trafficcontrol/lib/go-tc/tovalidate"
+       "github.com/apache/trafficcontrol/lib/go-util"
+       validation "github.com/go-ozzo/ozzo-validation"
+)
+
+// ServerCheckExtensionNullable represents a server check extension used by 
Traffic Ops.
+type ServerCheckExtensionNullable struct {
+       ID                    *int       `json:"id" db:"id"`
+       Name                  *string    `json:"name" db:"name"`
+       Version               *string    `json:"version" db:"version"`
+       InfoURL               *string    `json:"info_url" db:"info_url"`
+       ScriptFile            *string    `json:"script_file" db:"script_file"`
+       IsActive              *int       `json:"isactive" db:"isactive"`
 
 Review comment:
   I know it would entail a bunch more work - including either a database 
migration or a custom scan/marshal - but since this is a new endpoint we could 
switch this to be an actual boolean.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to