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 2019/01/17 18:52:52 UTC

[GitHub] rob05c commented on a change in pull request #3235: Add Traffic Ops Golang regex_revalidate.config

rob05c commented on a change in pull request #3235: Add Traffic Ops Golang regex_revalidate.config
URL: https://github.com/apache/trafficcontrol/pull/3235#discussion_r248796692
 
 

 ##########
 File path: lib/go-tc/jobs.go
 ##########
 @@ -0,0 +1,89 @@
+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 (
+	"encoding/json"
+	"errors"
+	"time"
+)
+
+type Job struct {
+	Parameters      string `json:"parameters"`
+	Keyword         string `json:"keyword"`
+	AssetURL        string `json:"assetUrl"`
+	CreatedBy       string `json:"createdBy"`
+	StartTime       string `json:"startTime"`
+	ID              int64  `json:"id"`
+	DeliveryService string `json:"deliveryService"`
+}
+
+// JobRequest contains the data to create a job.
+// Note this is a convenience struct for posting users; the actual JSON object is a JobRequestAPI
+type JobRequest struct {
+	TTL               time.Duration
+	StartTime         time.Time
+	DeliveryServiceID int64
+	Regex             string
+	Urgent            bool
 
 Review comment:
   I intentionally left it a value, because it defaults to false. I guess I can see the argument for letting Perl choose the default in case it were changed to default urgent=true, however unlikely

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


With regards,
Apache Git Services