cachingapiv1

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2020 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package cachingapiv1 : Operations and models for the CachingApiV1 service

Index

Constants

View Source
const (
	UpdateCacheLevelOptions_Value_Aggressive = "aggressive"
	UpdateCacheLevelOptions_Value_Basic      = "basic"
	UpdateCacheLevelOptions_Value_Simplified = "simplified"
)

Constants associated with the UpdateCacheLevelOptions.Value property. cache level.

View Source
const (
	UpdateDevelopmentModeOptions_Value_Off = "off"
	UpdateDevelopmentModeOptions_Value_On  = "on"
)

Constants associated with the UpdateDevelopmentModeOptions.Value property. on/off value.

View Source
const (
	UpdateQueryStringSortOptions_Value_Off = "off"
	UpdateQueryStringSortOptions_Value_On  = "on"
)

Constants associated with the UpdateQueryStringSortOptions.Value property. on/off property value.

View Source
const DefaultServiceName = "caching_api"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://api.cis.cloud.ibm.com"

DefaultServiceURL is the default URL to make service requests to.

Variables

This section is empty.

Functions

func UnmarshalBrowserTTLResponse

func UnmarshalBrowserTTLResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalBrowserTTLResponse unmarshals an instance of BrowserTTLResponse from the specified map of raw messages.

func UnmarshalBrowserTTLResponseResult

func UnmarshalBrowserTTLResponseResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalBrowserTTLResponseResult unmarshals an instance of BrowserTTLResponseResult from the specified map of raw messages.

func UnmarshalCacheLevelResponse

func UnmarshalCacheLevelResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCacheLevelResponse unmarshals an instance of CacheLevelResponse from the specified map of raw messages.

func UnmarshalCacheLevelResponseResult

func UnmarshalCacheLevelResponseResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCacheLevelResponseResult unmarshals an instance of CacheLevelResponseResult from the specified map of raw messages.

func UnmarshalDeveopmentModeResponse

func UnmarshalDeveopmentModeResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDeveopmentModeResponse unmarshals an instance of DeveopmentModeResponse from the specified map of raw messages.

func UnmarshalDeveopmentModeResponseResult

func UnmarshalDeveopmentModeResponseResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDeveopmentModeResponseResult unmarshals an instance of DeveopmentModeResponseResult from the specified map of raw messages.

func UnmarshalEnableQueryStringSortResponse

func UnmarshalEnableQueryStringSortResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalEnableQueryStringSortResponse unmarshals an instance of EnableQueryStringSortResponse from the specified map of raw messages.

func UnmarshalEnableQueryStringSortResponseResult

func UnmarshalEnableQueryStringSortResponseResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalEnableQueryStringSortResponseResult unmarshals an instance of EnableQueryStringSortResponseResult from the specified map of raw messages.

func UnmarshalPurgeAllResponse

func UnmarshalPurgeAllResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPurgeAllResponse unmarshals an instance of PurgeAllResponse from the specified map of raw messages.

func UnmarshalPurgeAllResponseResult

func UnmarshalPurgeAllResponseResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPurgeAllResponseResult unmarshals an instance of PurgeAllResponseResult from the specified map of raw messages.

Types

type BrowserTTLResponse

type BrowserTTLResponse struct {
	// success response.
	Success *bool `json:"success" validate:"required"`

	// errors.
	Errors [][]string `json:"errors" validate:"required"`

	// messages.
	Messages [][]string `json:"messages" validate:"required"`

	// result object.
	Result *BrowserTTLResponseResult `json:"result" validate:"required"`
}

BrowserTTLResponse : browser ttl response.

type BrowserTTLResponseResult

type BrowserTTLResponseResult struct {
	// ttl type.
	ID *string `json:"id,omitempty"`

	// ttl value.
	Value *int64 `json:"value,omitempty"`

	// editable.
	Editable *bool `json:"editable,omitempty"`

	// modified date.
	ModifiedOn *string `json:"modified_on,omitempty"`
}

BrowserTTLResponseResult : result object.

type CacheLevelResponse

type CacheLevelResponse struct {
	// success response.
	Success *bool `json:"success" validate:"required"`

	// errors.
	Errors [][]string `json:"errors" validate:"required"`

	// messages.
	Messages [][]string `json:"messages" validate:"required"`

	// result.
	Result *CacheLevelResponseResult `json:"result" validate:"required"`
}

CacheLevelResponse : cache level response.

type CacheLevelResponseResult

type CacheLevelResponseResult struct {
	// cache level.
	ID *string `json:"id,omitempty"`

	// cache level.
	Value *string `json:"value,omitempty"`

	// editable value.
	Editable *bool `json:"editable,omitempty"`

	// modified date.
	ModifiedOn *string `json:"modified_on,omitempty"`
}

CacheLevelResponseResult : result.

type CachingApiV1

type CachingApiV1 struct {
	Service *core.BaseService

	// cloud resource name.
	Crn *string

	// zone id.
	ZoneID *string
}

CachingApiV1 : This document describes CIS caching API.

Version: 1.0.0

func NewCachingApiV1

func NewCachingApiV1(options *CachingApiV1Options) (service *CachingApiV1, err error)

NewCachingApiV1 : constructs an instance of CachingApiV1 with passed in options.

func NewCachingApiV1UsingExternalConfig

func NewCachingApiV1UsingExternalConfig(options *CachingApiV1Options) (cachingApi *CachingApiV1, err error)

NewCachingApiV1UsingExternalConfig : constructs an instance of CachingApiV1 with passed in options and external configuration.

func (*CachingApiV1) GetBrowserCacheTTL

func (cachingApi *CachingApiV1) GetBrowserCacheTTL(getBrowserCacheTtlOptions *GetBrowserCacheTtlOptions) (result *BrowserTTLResponse, response *core.DetailedResponse, err error)

GetBrowserCacheTTL : Get browser cache TTL setting Browser Cache TTL (in seconds) specifies how long CDN edge servers cached resources will remain on your visitors' computers.

func (*CachingApiV1) GetCacheLevel

func (cachingApi *CachingApiV1) GetCacheLevel(getCacheLevelOptions *GetCacheLevelOptions) (result *CacheLevelResponse, response *core.DetailedResponse, err error)

GetCacheLevel : Get cache level setting of a specific zone Get cache level setting of a specific zone.

func (*CachingApiV1) GetDevelopmentMode

func (cachingApi *CachingApiV1) GetDevelopmentMode(getDevelopmentModeOptions *GetDevelopmentModeOptions) (result *DeveopmentModeResponse, response *core.DetailedResponse, err error)

GetDevelopmentMode : Get development mode setting Get development mode setting.

func (*CachingApiV1) GetQueryStringSort

func (cachingApi *CachingApiV1) GetQueryStringSort(getQueryStringSortOptions *GetQueryStringSortOptions) (result *EnableQueryStringSortResponse, response *core.DetailedResponse, err error)

GetQueryStringSort : Get Enable Query String Sort setting Get Enable Query String Sort setting.

func (*CachingApiV1) NewGetBrowserCacheTtlOptions

func (*CachingApiV1) NewGetBrowserCacheTtlOptions() *GetBrowserCacheTtlOptions

NewGetBrowserCacheTtlOptions : Instantiate GetBrowserCacheTtlOptions

func (*CachingApiV1) NewGetCacheLevelOptions

func (*CachingApiV1) NewGetCacheLevelOptions() *GetCacheLevelOptions

NewGetCacheLevelOptions : Instantiate GetCacheLevelOptions

func (*CachingApiV1) NewGetDevelopmentModeOptions

func (*CachingApiV1) NewGetDevelopmentModeOptions() *GetDevelopmentModeOptions

NewGetDevelopmentModeOptions : Instantiate GetDevelopmentModeOptions

func (*CachingApiV1) NewGetQueryStringSortOptions

func (*CachingApiV1) NewGetQueryStringSortOptions() *GetQueryStringSortOptions

NewGetQueryStringSortOptions : Instantiate GetQueryStringSortOptions

func (*CachingApiV1) NewPurgeAllOptions

func (*CachingApiV1) NewPurgeAllOptions() *PurgeAllOptions

NewPurgeAllOptions : Instantiate PurgeAllOptions

func (*CachingApiV1) NewPurgeByCacheTagsOptions

func (*CachingApiV1) NewPurgeByCacheTagsOptions() *PurgeByCacheTagsOptions

NewPurgeByCacheTagsOptions : Instantiate PurgeByCacheTagsOptions

func (*CachingApiV1) NewPurgeByHostsOptions

func (*CachingApiV1) NewPurgeByHostsOptions() *PurgeByHostsOptions

NewPurgeByHostsOptions : Instantiate PurgeByHostsOptions

func (*CachingApiV1) NewPurgeByUrlsOptions

func (*CachingApiV1) NewPurgeByUrlsOptions() *PurgeByUrlsOptions

NewPurgeByUrlsOptions : Instantiate PurgeByUrlsOptions

func (*CachingApiV1) NewUpdateBrowserCacheTtlOptions

func (*CachingApiV1) NewUpdateBrowserCacheTtlOptions() *UpdateBrowserCacheTtlOptions

NewUpdateBrowserCacheTtlOptions : Instantiate UpdateBrowserCacheTtlOptions

func (*CachingApiV1) NewUpdateCacheLevelOptions

func (*CachingApiV1) NewUpdateCacheLevelOptions() *UpdateCacheLevelOptions

NewUpdateCacheLevelOptions : Instantiate UpdateCacheLevelOptions

func (*CachingApiV1) NewUpdateDevelopmentModeOptions

func (*CachingApiV1) NewUpdateDevelopmentModeOptions() *UpdateDevelopmentModeOptions

NewUpdateDevelopmentModeOptions : Instantiate UpdateDevelopmentModeOptions

func (*CachingApiV1) NewUpdateQueryStringSortOptions

func (*CachingApiV1) NewUpdateQueryStringSortOptions() *UpdateQueryStringSortOptions

NewUpdateQueryStringSortOptions : Instantiate UpdateQueryStringSortOptions

func (*CachingApiV1) PurgeAll

func (cachingApi *CachingApiV1) PurgeAll(purgeAllOptions *PurgeAllOptions) (result *PurgeAllResponse, response *core.DetailedResponse, err error)

PurgeAll : Purge all files under a specific domain All resources in CDN edge servers' cache should be removed. This may have dramatic affects on your origin server load after performing this action.

func (*CachingApiV1) PurgeByCacheTags

func (cachingApi *CachingApiV1) PurgeByCacheTags(purgeByCacheTagsOptions *PurgeByCacheTagsOptions) (result *PurgeAllResponse, response *core.DetailedResponse, err error)

PurgeByCacheTags : Purge files by Cache-Tags Granularly remove one or more files from CDN edge servers' cache either by specifying the associated Cache-Tags.

func (*CachingApiV1) PurgeByHosts

func (cachingApi *CachingApiV1) PurgeByHosts(purgeByHostsOptions *PurgeByHostsOptions) (result *PurgeAllResponse, response *core.DetailedResponse, err error)

PurgeByHosts : Purge individual files by hostnames Granularly remove one or more files from CDN edge servers' cache either by specifying the hostnames.

func (*CachingApiV1) PurgeByUrls

func (cachingApi *CachingApiV1) PurgeByUrls(purgeByUrlsOptions *PurgeByUrlsOptions) (result *PurgeAllResponse, response *core.DetailedResponse, err error)

PurgeByUrls : Purge individual files by URLs Granularly remove one or more files from CDN edge servers' cache either by specifying URLs.

func (*CachingApiV1) SetServiceURL

func (cachingApi *CachingApiV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*CachingApiV1) UpdateBrowserCacheTTL

func (cachingApi *CachingApiV1) UpdateBrowserCacheTTL(updateBrowserCacheTtlOptions *UpdateBrowserCacheTtlOptions) (result *BrowserTTLResponse, response *core.DetailedResponse, err error)

UpdateBrowserCacheTTL : Change browser cache TTL setting Browser Cache TTL (in seconds) specifies how long CDN edge servers cached resources will remain on your visitors' computers.

func (*CachingApiV1) UpdateCacheLevel

func (cachingApi *CachingApiV1) UpdateCacheLevel(updateCacheLevelOptions *UpdateCacheLevelOptions) (result *CacheLevelResponse, response *core.DetailedResponse, err error)

UpdateCacheLevel : Set cache level setting for a specific zone The `basic` setting will cache most static resources (i.e., css, images, and JavaScript). The `simplified` setting will ignore the query string when delivering a cached resource. The `aggressive` setting will cache all static resources, including ones with a query string.

func (*CachingApiV1) UpdateDevelopmentMode

func (cachingApi *CachingApiV1) UpdateDevelopmentMode(updateDevelopmentModeOptions *UpdateDevelopmentModeOptions) (result *DeveopmentModeResponse, response *core.DetailedResponse, err error)

UpdateDevelopmentMode : Change development mode setting Change development mode setting.

func (*CachingApiV1) UpdateQueryStringSort

func (cachingApi *CachingApiV1) UpdateQueryStringSort(updateQueryStringSortOptions *UpdateQueryStringSortOptions) (result *EnableQueryStringSortResponse, response *core.DetailedResponse, err error)

UpdateQueryStringSort : Change Enable Query String Sort setting Change Enable Query String Sort setting.

type CachingApiV1Options

type CachingApiV1Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator

	// cloud resource name.
	Crn *string `validate:"required"`

	// zone id.
	ZoneID *string `validate:"required"`
}

CachingApiV1Options : Service options

type DeveopmentModeResponse

type DeveopmentModeResponse struct {
	// success response.
	Success *bool `json:"success" validate:"required"`

	// errors.
	Errors [][]string `json:"errors" validate:"required"`

	// messages.
	Messages [][]string `json:"messages" validate:"required"`

	// result object.
	Result *DeveopmentModeResponseResult `json:"result" validate:"required"`
}

DeveopmentModeResponse : development mode response.

type DeveopmentModeResponseResult

type DeveopmentModeResponseResult struct {
	// object id.
	ID *string `json:"id,omitempty"`

	// on/off value.
	Value *string `json:"value,omitempty"`

	// editable value.
	Editable *bool `json:"editable,omitempty"`

	// modified date.
	ModifiedOn *string `json:"modified_on,omitempty"`
}

DeveopmentModeResponseResult : result object.

type EnableQueryStringSortResponse

type EnableQueryStringSortResponse struct {
	// success response true/false.
	Success *bool `json:"success" validate:"required"`

	// errors.
	Errors [][]string `json:"errors" validate:"required"`

	// messages.
	Messages [][]string `json:"messages" validate:"required"`

	// result of sort query string.
	Result *EnableQueryStringSortResponseResult `json:"result" validate:"required"`
}

EnableQueryStringSortResponse : sort query string response.

type EnableQueryStringSortResponseResult

type EnableQueryStringSortResponseResult struct {
	// cache id.
	ID *string `json:"id,omitempty"`

	// on/off value.
	Value *string `json:"value,omitempty"`

	// editable propery.
	Editable *bool `json:"editable,omitempty"`

	// modified date.
	ModifiedOn *string `json:"modified_on,omitempty"`
}

EnableQueryStringSortResponseResult : result of sort query string.

type GetBrowserCacheTtlOptions

type GetBrowserCacheTtlOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetBrowserCacheTtlOptions : The GetBrowserCacheTTL options.

func (*GetBrowserCacheTtlOptions) SetHeaders

func (options *GetBrowserCacheTtlOptions) SetHeaders(param map[string]string) *GetBrowserCacheTtlOptions

SetHeaders : Allow user to set Headers

type GetCacheLevelOptions

type GetCacheLevelOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetCacheLevelOptions : The GetCacheLevel options.

func (*GetCacheLevelOptions) SetHeaders

func (options *GetCacheLevelOptions) SetHeaders(param map[string]string) *GetCacheLevelOptions

SetHeaders : Allow user to set Headers

type GetDevelopmentModeOptions

type GetDevelopmentModeOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetDevelopmentModeOptions : The GetDevelopmentMode options.

func (*GetDevelopmentModeOptions) SetHeaders

func (options *GetDevelopmentModeOptions) SetHeaders(param map[string]string) *GetDevelopmentModeOptions

SetHeaders : Allow user to set Headers

type GetQueryStringSortOptions

type GetQueryStringSortOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetQueryStringSortOptions : The GetQueryStringSort options.

func (*GetQueryStringSortOptions) SetHeaders

func (options *GetQueryStringSortOptions) SetHeaders(param map[string]string) *GetQueryStringSortOptions

SetHeaders : Allow user to set Headers

type PurgeAllOptions

type PurgeAllOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

PurgeAllOptions : The PurgeAll options.

func (*PurgeAllOptions) SetHeaders

func (options *PurgeAllOptions) SetHeaders(param map[string]string) *PurgeAllOptions

SetHeaders : Allow user to set Headers

type PurgeAllResponse

type PurgeAllResponse struct {
	// success response.
	Success *bool `json:"success" validate:"required"`

	// errors.
	Errors [][]string `json:"errors" validate:"required"`

	// messages.
	Messages [][]string `json:"messages" validate:"required"`

	// purge object.
	Result *PurgeAllResponseResult `json:"result" validate:"required"`
}

PurgeAllResponse : purge all response.

type PurgeAllResponseResult

type PurgeAllResponseResult struct {
	// purge id.
	ID *string `json:"id,omitempty"`
}

PurgeAllResponseResult : purge object.

type PurgeByCacheTagsOptions

type PurgeByCacheTagsOptions struct {
	// array of tags.
	Tags []string `json:"tags,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

PurgeByCacheTagsOptions : The PurgeByCacheTags options.

func (*PurgeByCacheTagsOptions) SetHeaders

func (options *PurgeByCacheTagsOptions) SetHeaders(param map[string]string) *PurgeByCacheTagsOptions

SetHeaders : Allow user to set Headers

func (*PurgeByCacheTagsOptions) SetTags

func (options *PurgeByCacheTagsOptions) SetTags(tags []string) *PurgeByCacheTagsOptions

SetTags : Allow user to set Tags

type PurgeByHostsOptions

type PurgeByHostsOptions struct {
	// hosts name.
	Hosts []string `json:"hosts,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

PurgeByHostsOptions : The PurgeByHosts options.

func (*PurgeByHostsOptions) SetHeaders

func (options *PurgeByHostsOptions) SetHeaders(param map[string]string) *PurgeByHostsOptions

SetHeaders : Allow user to set Headers

func (*PurgeByHostsOptions) SetHosts

func (options *PurgeByHostsOptions) SetHosts(hosts []string) *PurgeByHostsOptions

SetHosts : Allow user to set Hosts

type PurgeByUrlsOptions

type PurgeByUrlsOptions struct {
	// purge url array.
	Files []string `json:"files,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

PurgeByUrlsOptions : The PurgeByUrls options.

func (*PurgeByUrlsOptions) SetFiles

func (options *PurgeByUrlsOptions) SetFiles(files []string) *PurgeByUrlsOptions

SetFiles : Allow user to set Files

func (*PurgeByUrlsOptions) SetHeaders

func (options *PurgeByUrlsOptions) SetHeaders(param map[string]string) *PurgeByUrlsOptions

SetHeaders : Allow user to set Headers

type UpdateBrowserCacheTtlOptions

type UpdateBrowserCacheTtlOptions struct {
	// ttl value.
	Value *int64 `json:"value,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateBrowserCacheTtlOptions : The UpdateBrowserCacheTTL options.

func (*UpdateBrowserCacheTtlOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*UpdateBrowserCacheTtlOptions) SetValue

SetValue : Allow user to set Value

type UpdateCacheLevelOptions

type UpdateCacheLevelOptions struct {
	// cache level.
	Value *string `json:"value,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateCacheLevelOptions : The UpdateCacheLevel options.

func (*UpdateCacheLevelOptions) SetHeaders

func (options *UpdateCacheLevelOptions) SetHeaders(param map[string]string) *UpdateCacheLevelOptions

SetHeaders : Allow user to set Headers

func (*UpdateCacheLevelOptions) SetValue

func (options *UpdateCacheLevelOptions) SetValue(value string) *UpdateCacheLevelOptions

SetValue : Allow user to set Value

type UpdateDevelopmentModeOptions

type UpdateDevelopmentModeOptions struct {
	// on/off value.
	Value *string `json:"value,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateDevelopmentModeOptions : The UpdateDevelopmentMode options.

func (*UpdateDevelopmentModeOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*UpdateDevelopmentModeOptions) SetValue

SetValue : Allow user to set Value

type UpdateQueryStringSortOptions

type UpdateQueryStringSortOptions struct {
	// on/off property value.
	Value *string `json:"value,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateQueryStringSortOptions : The UpdateQueryStringSort options.

func (*UpdateQueryStringSortOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*UpdateQueryStringSortOptions) SetValue

SetValue : Allow user to set Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL