diff --git a/tiered_cache.go b/tiered_cache.go index 93d362f7594..39ac88d3f48 100644 --- a/tiered_cache.go +++ b/tiered_cache.go @@ -28,8 +28,7 @@ const notFoundError = "Unable to retrieve tiered_cache_smart_topology_enable set // This function does not support custom topologies, only Generic and Smart Tiered Caching. // // API Reference: https://api.cloudflare.com/#smart-tiered-cache-get-smart-tiered-cache-setting -// -// https://api.cloudflare.com/#tiered-cache-get-tiered-cache-setting +// API Reference: https://api.cloudflare.com/#tiered-cache-get-tiered-cache-setting func (api *API) GetTieredCache(ctx context.Context, rc *ResourceContainer) (TieredCache, error) { var lastModified time.Time @@ -63,8 +62,7 @@ func (api *API) GetTieredCache(ctx context.Context, rc *ResourceContainer) (Tier // Using the value of TieredCacheOff will disable Tiered Cache entirely. // // API Reference: https://api.cloudflare.com/#smart-tiered-cache-patch-smart-tiered-cache-setting -// -// https://api.cloudflare.com/#tiered-cache-patch-tiered-cache-setting +// API Reference: https://api.cloudflare.com/#tiered-cache-patch-tiered-cache-setting func (api *API) SetTieredCache(ctx context.Context, rc *ResourceContainer, value TieredCacheType) (TieredCache, error) { if value == TieredCacheOff { return api.DeleteTieredCache(ctx, rc) @@ -111,8 +109,7 @@ func (api *API) SetTieredCache(ctx context.Context, rc *ResourceContainer, value // This is equivalent to using SetTieredCache with the value of TieredCacheOff. // // API Reference: https://api.cloudflare.com/#smart-tiered-cache-delete-smart-tiered-cache-setting -// -// https://api.cloudflare.com/#tiered-cache-patch-tiered-cache-setting +// API Reference: https://api.cloudflare.com/#tiered-cache-patch-tiered-cache-setting func (api *API) DeleteTieredCache(ctx context.Context, rc *ResourceContainer) (TieredCache, error) { var lastModified time.Time @@ -162,7 +159,7 @@ func getGenericTieredCache(api *API, ctx context.Context, rc *ResourceContainer) } if !response.Success { - return TieredCache{Type: TieredCacheOff}, errors.New("Request to retrieve generic tiered cache failed") + return TieredCache{Type: TieredCacheOff}, errors.New("request to retrieve generic tiered cache failed") } if response.Result.Value == "off" { @@ -189,7 +186,7 @@ func getSmartTieredCache(api *API, ctx context.Context, rc *ResourceContainer) ( } if !response.Success { - return TieredCache{Type: TieredCacheOff}, errors.New("Request to retrieve smart tiered cache failed") + return TieredCache{Type: TieredCacheOff}, errors.New("request to retrieve smart tiered cache failed") } if response.Result.Value == "off" { @@ -220,7 +217,7 @@ func enableGenericTieredCache(api *API, ctx context.Context, rc *ResourceContain } if !response.Success { - return TieredCache{Type: TieredCacheOff}, errors.New("Request to enable generic tiered cache failed") + return TieredCache{Type: TieredCacheOff}, errors.New("request to enable generic tiered cache failed") } return TieredCache{Type: TieredCacheGeneric, LastModified: response.Result.LastModified}, nil @@ -248,7 +245,7 @@ func enableSmartTieredCache(api *API, ctx context.Context, rc *ResourceContainer } if !response.Success { - return TieredCache{Type: TieredCacheOff}, errors.New("Request to enable smart tiered cache failed") + return TieredCache{Type: TieredCacheOff}, errors.New("request to enable smart tiered cache failed") } return TieredCache{Type: TieredCacheSmart, LastModified: response.Result.LastModified}, nil @@ -276,7 +273,7 @@ func disableGenericTieredCache(api *API, ctx context.Context, rc *ResourceContai } if !response.Success { - return TieredCache{Type: TieredCacheOff}, errors.New("Request to disable generic tiered cache failed") + return TieredCache{Type: TieredCacheOff}, errors.New("request to disable generic tiered cache failed") } return TieredCache{Type: TieredCacheOff, LastModified: response.Result.LastModified}, nil @@ -299,7 +296,7 @@ func deleteSmartTieredCache(api *API, ctx context.Context, rc *ResourceContainer } if !response.Success { - return TieredCache{Type: TieredCacheOff}, errors.New("Request to disable smart tiered cache failed") + return TieredCache{Type: TieredCacheOff}, errors.New("request to disable smart tiered cache failed") } return TieredCache{Type: TieredCacheOff, LastModified: response.Result.LastModified}, nil