You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2018/03/01 20:17:32 UTC
[incubator-trafficcontrol] 03/05: adds nullable versions of ASN and
CDN structs
This is an automated email from the ASF dual-hosted git repository.
dewrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git
commit 2b89d53705b5d55ef4e230d7f2e7fb06abd2791f
Author: Dan Kirkwood <da...@apache.org>
AuthorDate: Thu Mar 1 09:48:19 2018 -0700
adds nullable versions of ASN and CDN structs
---
lib/go-tc/asns.go | 18 +++++++++++++-----
lib/go-tc/cdns.go | 20 ++++++++++++++------
2 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/lib/go-tc/asns.go b/lib/go-tc/asns.go
index 5341ca0..ac73a57 100644
--- a/lib/go-tc/asns.go
+++ b/lib/go-tc/asns.go
@@ -24,9 +24,17 @@ type ASNsResponse struct {
}
type ASN struct {
- ASN int `json:"asn" db:"asn"`
- Cachegroup string `json:"cachegroup" db:"cachegroup"`
- CachegroupID int `json:"cachegroupId" db:"cachegroup_id"`
- ID int `json:"id" db:"id"`
- LastUpdated Time `json:"lastUpdated" db:"last_updated"`
+ ASN int `json:"asn" db:"asn"`
+ Cachegroup string `json:"cachegroup" db:"cachegroup"`
+ CachegroupID int `json:"cachegroupId" db:"cachegroup_id"`
+ ID int `json:"id" db:"id"`
+ LastUpdated TimeNoMod `json:"lastUpdated" db:"last_updated"`
+}
+
+type ASNNullable struct {
+ ASN *int `json:"asn" db:"asn"`
+ Cachegroup *string `json:"cachegroup" db:"cachegroup"`
+ CachegroupID *int `json:"cachegroupId" db:"cachegroup_id"`
+ ID *int `json:"id" db:"id"`
+ LastUpdated *TimeNoMod `json:"lastUpdated" db:"last_updated"`
}
diff --git a/lib/go-tc/cdns.go b/lib/go-tc/cdns.go
index 34a2974..5402e2c 100644
--- a/lib/go-tc/cdns.go
+++ b/lib/go-tc/cdns.go
@@ -24,11 +24,19 @@ type CDNsResponse struct {
}
type CDN struct {
- DNSSECEnabled bool `json:"dnssecEnabled" db:"dnssec_enabled"`
- DomainName string `json:"domainName" db:"domain_name"`
- ID int `json:"id" db:"id"`
- LastUpdated Time `json:"lastUpdated" db:"last_updated"`
- Name string `json:"name" db:"name"`
+ DNSSECEnabled bool `json:"dnssecEnabled" db:"dnssec_enabled"`
+ DomainName string `json:"domainName" db:"domain_name"`
+ ID int `json:"id" db:"id"`
+ LastUpdated TimeNoMod `json:"lastUpdated" db:"last_updated"`
+ Name string `json:"name" db:"name"`
+}
+
+type CDNNullable struct {
+ DNSSECEnabled *bool `json:"dnssecEnabled" db:"dnssec_enabled"`
+ DomainName *string `json:"domainName" db:"domain_name"`
+ ID *int `json:"id" db:"id"`
+ LastUpdated *TimeNoMod `json:"lastUpdated" db:"last_updated"`
+ Name *string `json:"name" db:"name"`
}
// CDNSSLKeysResponse ...
@@ -47,4 +55,4 @@ type CDNSSLKeys struct {
type CDNSSLKeysCertificate struct {
Crt string `json:"crt"`
Key string `json:"key"`
-}
\ No newline at end of file
+}
--
To stop receiving notification emails like this one, please contact
dewrich@apache.org.