This is an automated email from the ASF dual-hosted git repository.
zrhoffman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new f362a37 Remove now-unused ATS structures from lib/go-tc (#6025)
f362a37 is described below
commit f362a37f2df51bd635ba57a1d46c61e349b3a9fd
Author: ocket8888 <[email protected]>
AuthorDate: Wed Jul 14 17:45:21 2021 -0600
Remove now-unused ATS structures from lib/go-tc (#6025)
---
lib/go-tc/ats.go | 85 --------------------------------------------------------
1 file changed, 85 deletions(-)
diff --git a/lib/go-tc/ats.go b/lib/go-tc/ats.go
deleted file mode 100644
index c8f019e..0000000
--- a/lib/go-tc/ats.go
+++ /dev/null
@@ -1,85 +0,0 @@
-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 (
- "strings"
-)
-
-// ATSConfigMetaData contains metadata and information relating to files for a
-// single cache server.
-type ATSConfigMetaData struct {
- Info ATSConfigMetaDataInfo `json:"info"`
- ConfigFiles []ATSConfigMetaDataConfigFile `json:"configFiles"`
-}
-
-type ATSConfigMetaDataInfo struct {
- CDNID int `json:"cdnId"`
- CDNName string `json:"cdnName"`
- ServerID int `json:"serverId"`
- ServerName string `json:"serverName"`
- ServerPort int `json:"serverTcpPort"`
- ProfileID int `json:"profileId"`
- ProfileName string `json:"profileName"`
- TOReverseProxyURL string `json:"toRevProxyUrl"`
- TOURL string `json:"toUrl"`
-}
-
-type ATSConfigMetaDataConfigFile struct {
- FileNameOnDisk string `json:"fnameOnDisk"`
- Location string `json:"location"`
- APIURI string `json:"apiUri,omitempty"` // APIURI is
deprecated, do not use.
- URL string `json:"url,omitempty"` // URL is deprecated,
do not use.
- Scope string `json:"scope"`
-}
-
-type ATSConfigMetaDataConfigFileScope string
-
-const ATSConfigMetaDataConfigFileScopeProfiles =
ATSConfigMetaDataConfigFileScope("profiles")
-const ATSConfigMetaDataConfigFileScopeServers =
ATSConfigMetaDataConfigFileScope("servers")
-const ATSConfigMetaDataConfigFileScopeCDNs =
ATSConfigMetaDataConfigFileScope("cdns")
-const ATSConfigMetaDataConfigFileScopeInvalid =
ATSConfigMetaDataConfigFileScope("")
-
-func (t ATSConfigMetaDataConfigFileScope) String() string {
- switch t {
- case ATSConfigMetaDataConfigFileScopeProfiles:
- fallthrough
- case ATSConfigMetaDataConfigFileScopeServers:
- fallthrough
- case ATSConfigMetaDataConfigFileScopeCDNs:
- return string(t)
- default:
- return "invalid"
- }
-}
-
-func ATSConfigMetaDataConfigFileScopeFromString(s string)
ATSConfigMetaDataConfigFileScope {
- s = strings.ToLower(s)
- switch s {
- case "profiles":
- return ATSConfigMetaDataConfigFileScopeProfiles
- case "servers":
- return ATSConfigMetaDataConfigFileScopeServers
- case "cdns":
- return ATSConfigMetaDataConfigFileScopeCDNs
- default:
- return ATSConfigMetaDataConfigFileScopeInvalid
- }
-}