more appropriate naming: Cache -> CacheRule; CacheRule -> TTLRule
diff --git a/openstack/cdn/v1/services/requests.go b/openstack/cdn/v1/services/requests.go
index c0ca2ab..922bd8f 100644
--- a/openstack/cdn/v1/services/requests.go
+++ b/openstack/cdn/v1/services/requests.go
@@ -75,7 +75,7 @@
// length for flavor_id is 1. The maximum length is 256.
FlavorID string
// OPTIONAL. Specifies the TTL rules for the assets under this service. Supports wildcards for fine-grained control.
- Caching []Cache
+ Caching []CacheRule
// OPTIONAL. Specifies the restrictions that define who can access assets (content from the CDN cache).
Restrictions []Restriction
}
diff --git a/openstack/cdn/v1/services/results.go b/openstack/cdn/v1/services/results.go
index f739102..d4b36dc 100644
--- a/openstack/cdn/v1/services/results.go
+++ b/openstack/cdn/v1/services/results.go
@@ -38,22 +38,22 @@
Rules []OriginRule `mapstructure:"rules"`
}
-// CacheRule specifies a rule that determines if a TTL should be applied to an asset.
-type CacheRule struct {
+// TTLRule specifies a rule that determines if a TTL should be applied to an asset.
+type TTLRule struct {
// Specifies the name of this rule.
Name string `mapstructure:"name"`
// Specifies the request URL this rule should match for this TTL to be used. Regex is supported.
RequestURL string `mapstructure:"request_url"`
}
-// Cache specifies the TTL rules for the assets under this service.
-type Cache struct {
+// CacheRule specifies the TTL rules for the assets under this service.
+type CacheRule struct {
// Specifies the name of this caching rule. Note: 'default' is a reserved name used for the default TTL setting.
Name string `mapstructure:"name"`
// Specifies the TTL to apply.
TTL int `mapstructure:"ttl"`
// Specifies a collection of rules that determine if this TTL should be applied to an asset.
- Rules []CacheRule `mapstructure:"rules"`
+ Rules []TTLRule `mapstructure:"rules"`
}
// RestrictionRule specifies a rule that determines if this restriction should be applied to an asset.
@@ -90,7 +90,7 @@
// Specifies a list of origin domains or IP addresses where the original assets are stored.
Origins []Origin `mapstructure:"origins"`
// Specifies the TTL rules for the assets under this service. Supports wildcards for fine grained control.
- Caching []Cache `mapstructure:"caching"`
+ Caching []CacheRule `mapstructure:"caching"`
// Specifies the restrictions that define who can access assets (content from the CDN cache).
Restrictions []Restriction `mapstructure:"restrictions"`
// Specifies the CDN provider flavor ID to use. For a list of flavors, see the operation to list the available flavors.