pageruleapiv1

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Overview

Package pageruleapiv1 : Operations and models for the PageRuleApiV1 service

Index

Constants

View Source
const (
	PageRulesBodyActionsItem_ID_AlwaysUseHttps          = "always_use_https"
	PageRulesBodyActionsItem_ID_AutomaticHttpsRewrites  = "automatic_https_rewrites"
	PageRulesBodyActionsItem_ID_BrowserCacheTTL         = "browser_cache_ttl"
	PageRulesBodyActionsItem_ID_BrowserCheck            = "browser_check"
	PageRulesBodyActionsItem_ID_BypassCacheOnCookie     = "bypass_cache_on_cookie"
	PageRulesBodyActionsItem_ID_CacheDeceptionArmor     = "cache_deception_armor"
	PageRulesBodyActionsItem_ID_CacheLevel              = "cache_level"
	PageRulesBodyActionsItem_ID_DisableSecurity         = "disable_security"
	PageRulesBodyActionsItem_ID_EdgeCacheTTL            = "edge_cache_ttl"
	PageRulesBodyActionsItem_ID_EmailObfuscation        = "email_obfuscation"
	PageRulesBodyActionsItem_ID_ExplicitCacheControl    = "explicit_cache_control"
	PageRulesBodyActionsItem_ID_ForwardingURL           = "forwarding_url"
	PageRulesBodyActionsItem_ID_IpGeolocation           = "ip_geolocation"
	PageRulesBodyActionsItem_ID_OpportunisticEncryption = "opportunistic_encryption"
	PageRulesBodyActionsItem_ID_SecurityLevel           = "security_level"
	PageRulesBodyActionsItem_ID_ServerSideExclude       = "server_side_exclude"
	PageRulesBodyActionsItem_ID_Ssl                     = "ssl"
	PageRulesBodyActionsItem_ID_Waf                     = "waf"
)

Constants associated with the PageRulesBodyActionsItem.ID property. " Page rule action field map from UI to API

CF-UI                    map             API,

'Disable Security' to 'disable_security', 'Browser Integrity Check' to 'browser_check', 'Server Side Excludes' to 'server_side_exclude', 'SSL' to 'ssl', 'Browser Cache TTL' to 'browser_cache_ttl', 'Security Level' to 'security_level', 'Cache Level' to 'cache_level', 'Edge Cache TTL' to 'edge_cache_ttl' 'IP Geolocation Header' to 'ip_geolocation, 'Email Obfuscation' to 'email_obfuscation', 'Automatic HTTPS Rewrites' to 'automatic_https_rewrites', 'Opportunistic Encryption' to 'opportunistic_encryption', 'Forwarding URL' to 'forwarding_url', 'Always Use HTTPS' to 'always_use_https', 'Origin Cache Control' to 'explicit_cache_control', 'Bypass Cache on Cookie' to 'bypass_cache_on_cookie', 'Cache Deception Armor' to 'cache_deception_armor', 'WAF' to 'waf'

Page rule conflict list

"forwarding_url" with all other settings for the rules "always_use_https" with all other settings for the rules "disable_security" with "email_obfuscation", "server_side_exclude", "waf" ".

View Source
const (
	PageRulesBodyActionsItemActionsCacheLevel_Value_Aggressive      = "aggressive"
	PageRulesBodyActionsItemActionsCacheLevel_Value_Basic           = "basic"
	PageRulesBodyActionsItemActionsCacheLevel_Value_Bypass          = "bypass"
	PageRulesBodyActionsItemActionsCacheLevel_Value_CacheEverything = "cache_everything"
	PageRulesBodyActionsItemActionsCacheLevel_Value_Simplified      = "simplified"
)

Constants associated with the PageRulesBodyActionsItemActionsCacheLevel.Value property. value.

View Source
const (
	PageRulesBodyActionsItemActionsSecurity_ID_AlwaysUseHttps  = "always_use_https"
	PageRulesBodyActionsItemActionsSecurity_ID_DisableSecurity = "disable_security"
)

Constants associated with the PageRulesBodyActionsItemActionsSecurity.ID property. identifier.

View Source
const (
	PageRulesBodyActionsItemActionsSecurityLevel_Value_EssentiallyOff = "essentially_off"
	PageRulesBodyActionsItemActionsSecurityLevel_Value_High           = "high"
	PageRulesBodyActionsItemActionsSecurityLevel_Value_Low            = "low"
	PageRulesBodyActionsItemActionsSecurityLevel_Value_Medium         = "medium"
	PageRulesBodyActionsItemActionsSecurityLevel_Value_Off            = "off"
	PageRulesBodyActionsItemActionsSecurityLevel_Value_UnderAttack    = "under_attack"
)

Constants associated with the PageRulesBodyActionsItemActionsSecurityLevel.Value property. value.

View Source
const (
	PageRulesBodyActionsItemActionsSecurityOptions_ID_AutomaticHttpsRewrites  = "automatic_https_rewrites"
	PageRulesBodyActionsItemActionsSecurityOptions_ID_BrowserCheck            = "browser_check"
	PageRulesBodyActionsItemActionsSecurityOptions_ID_CacheDeceptionArmor     = "cache_deception_armor"
	PageRulesBodyActionsItemActionsSecurityOptions_ID_EmailObfuscation        = "email_obfuscation"
	PageRulesBodyActionsItemActionsSecurityOptions_ID_ExplicitCacheControl    = "explicit_cache_control"
	PageRulesBodyActionsItemActionsSecurityOptions_ID_IpGeolocation           = "ip_geolocation"
	PageRulesBodyActionsItemActionsSecurityOptions_ID_OpportunisticEncryption = "opportunistic_encryption"
	PageRulesBodyActionsItemActionsSecurityOptions_ID_ServerSideExclude       = "server_side_exclude"
	PageRulesBodyActionsItemActionsSecurityOptions_ID_Waf                     = "waf"
)

Constants associated with the PageRulesBodyActionsItemActionsSecurityOptions.ID property. identifier.

View Source
const (
	PageRulesBodyActionsItemActionsSecurityOptions_Value_Off = "off"
	PageRulesBodyActionsItemActionsSecurityOptions_Value_On  = "on"
)

Constants associated with the PageRulesBodyActionsItemActionsSecurityOptions.Value property. value.

View Source
const (
	PageRulesBodyActionsItemActionsSsl_Value_Flexible   = "flexible"
	PageRulesBodyActionsItemActionsSsl_Value_Full       = "full"
	PageRulesBodyActionsItemActionsSsl_Value_Off        = "off"
	PageRulesBodyActionsItemActionsSsl_Value_OriginPull = "origin_pull"
	PageRulesBodyActionsItemActionsSsl_Value_Strict     = "strict"
)

Constants associated with the PageRulesBodyActionsItemActionsSsl.Value property. value.

View Source
const DefaultServiceName = "page_rule_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.

View Source
const (
	PageRulesBodyActionsItemActionsBypassCacheOnCookie_ID_BypassCacheOnCookie = "bypass_cache_on_cookie"
)

Constants associated with the PageRulesBodyActionsItemActionsBypassCacheOnCookie.ID property. identifier.

View Source
const (
	PageRulesBodyActionsItemActionsCacheLevel_ID_CacheLevel = "cache_level"
)

Constants associated with the PageRulesBodyActionsItemActionsCacheLevel.ID property. identifier.

View Source
const (
	PageRulesBodyActionsItemActionsEdgeCacheTTL_ID_EdgeCacheTTL = "edge_cache_ttl"
)

Constants associated with the PageRulesBodyActionsItemActionsEdgeCacheTTL.ID property. identifier.

View Source
const (
	PageRulesBodyActionsItemActionsForwardingURL_ID_ForwardingURL = "forwarding_url"
)

Constants associated with the PageRulesBodyActionsItemActionsForwardingURL.ID property. identifier.

View Source
const (
	PageRulesBodyActionsItemActionsSecurityLevel_ID_SecurityLevel = "security_level"
)

Constants associated with the PageRulesBodyActionsItemActionsSecurityLevel.ID property. identifier.

View Source
const (
	PageRulesBodyActionsItemActionsSsl_ID_Ssl = "ssl"
)

Constants associated with the PageRulesBodyActionsItemActionsSsl.ID property. identifier.

View Source
const (
	PageRulesBodyActionsItemActionsTTL_ID_BrowserCacheTTL = "browser_cache_ttl"
)

Constants associated with the PageRulesBodyActionsItemActionsTTL.ID property. identifier.

Variables

This section is empty.

Functions

func UnmarshalActionsForwardingUrlValue

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

UnmarshalActionsForwardingUrlValue unmarshals an instance of ActionsForwardingUrlValue from the specified map of raw messages.

func UnmarshalPageRuleResult

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

UnmarshalPageRuleResult unmarshals an instance of PageRuleResult from the specified map of raw messages.

func UnmarshalPageRulesBodyActionsItem

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

UnmarshalPageRulesBodyActionsItem unmarshals an instance of PageRulesBodyActionsItem from the specified map of raw messages.

func UnmarshalPageRulesBodyActionsItemActionsBypassCacheOnCookie

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

UnmarshalPageRulesBodyActionsItemActionsBypassCacheOnCookie unmarshals an instance of PageRulesBodyActionsItemActionsBypassCacheOnCookie from the specified map of raw messages.

func UnmarshalPageRulesBodyActionsItemActionsCacheLevel

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

UnmarshalPageRulesBodyActionsItemActionsCacheLevel unmarshals an instance of PageRulesBodyActionsItemActionsCacheLevel from the specified map of raw messages.

func UnmarshalPageRulesBodyActionsItemActionsEdgeCacheTTL

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

UnmarshalPageRulesBodyActionsItemActionsEdgeCacheTTL unmarshals an instance of PageRulesBodyActionsItemActionsEdgeCacheTTL from the specified map of raw messages.

func UnmarshalPageRulesBodyActionsItemActionsForwardingURL

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

UnmarshalPageRulesBodyActionsItemActionsForwardingURL unmarshals an instance of PageRulesBodyActionsItemActionsForwardingURL from the specified map of raw messages.

func UnmarshalPageRulesBodyActionsItemActionsSecurity

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

UnmarshalPageRulesBodyActionsItemActionsSecurity unmarshals an instance of PageRulesBodyActionsItemActionsSecurity from the specified map of raw messages.

func UnmarshalPageRulesBodyActionsItemActionsSecurityLevel

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

UnmarshalPageRulesBodyActionsItemActionsSecurityLevel unmarshals an instance of PageRulesBodyActionsItemActionsSecurityLevel from the specified map of raw messages.

func UnmarshalPageRulesBodyActionsItemActionsSecurityOptions

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

UnmarshalPageRulesBodyActionsItemActionsSecurityOptions unmarshals an instance of PageRulesBodyActionsItemActionsSecurityOptions from the specified map of raw messages.

func UnmarshalPageRulesBodyActionsItemActionsSsl

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

UnmarshalPageRulesBodyActionsItemActionsSsl unmarshals an instance of PageRulesBodyActionsItemActionsSsl from the specified map of raw messages.

func UnmarshalPageRulesBodyActionsItemActionsTTL

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

UnmarshalPageRulesBodyActionsItemActionsTTL unmarshals an instance of PageRulesBodyActionsItemActionsTTL from the specified map of raw messages.

func UnmarshalPageRulesDeleteResponse

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

UnmarshalPageRulesDeleteResponse unmarshals an instance of PageRulesDeleteResponse from the specified map of raw messages.

func UnmarshalPageRulesDeleteResponseResult

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

UnmarshalPageRulesDeleteResponseResult unmarshals an instance of PageRulesDeleteResponseResult from the specified map of raw messages.

func UnmarshalPageRulesResponseListAll

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

UnmarshalPageRulesResponseListAll unmarshals an instance of PageRulesResponseListAll from the specified map of raw messages.

func UnmarshalPageRulesResponseWithoutResultInfo

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

UnmarshalPageRulesResponseWithoutResultInfo unmarshals an instance of PageRulesResponseWithoutResultInfo from the specified map of raw messages.

func UnmarshalTargetsItem

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

UnmarshalTargetsItem unmarshals an instance of TargetsItem from the specified map of raw messages.

func UnmarshalTargetsItemConstraint

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

UnmarshalTargetsItemConstraint unmarshals an instance of TargetsItemConstraint from the specified map of raw messages.

Types

type ActionsForwardingUrlValue

type ActionsForwardingUrlValue struct {
	// url.
	URL *string `json:"url,omitempty"`

	// status code.
	StatusCode *int64 `json:"status_code,omitempty"`
}

ActionsForwardingUrlValue : value.

type ChangePageRuleOptions

type ChangePageRuleOptions struct {
	// rule id.
	RuleID *string `json:"rule_id" validate:"required"`

	// targets.
	Targets []TargetsItem `json:"targets,omitempty"`

	// actions.
	Actions []PageRulesBodyActionsItemIntf `json:"actions,omitempty"`

	// priority.
	Priority *int64 `json:"priority,omitempty"`

	// status.
	Status *string `json:"status,omitempty"`

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

ChangePageRuleOptions : The ChangePageRule options.

func (*ChangePageRuleOptions) SetActions

SetActions : Allow user to set Actions

func (*ChangePageRuleOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*ChangePageRuleOptions) SetPriority

func (options *ChangePageRuleOptions) SetPriority(priority int64) *ChangePageRuleOptions

SetPriority : Allow user to set Priority

func (*ChangePageRuleOptions) SetRuleID

func (options *ChangePageRuleOptions) SetRuleID(ruleID string) *ChangePageRuleOptions

SetRuleID : Allow user to set RuleID

func (*ChangePageRuleOptions) SetStatus

func (options *ChangePageRuleOptions) SetStatus(status string) *ChangePageRuleOptions

SetStatus : Allow user to set Status

func (*ChangePageRuleOptions) SetTargets

func (options *ChangePageRuleOptions) SetTargets(targets []TargetsItem) *ChangePageRuleOptions

SetTargets : Allow user to set Targets

type CreatePageRuleOptions

type CreatePageRuleOptions struct {
	// targets.
	Targets []TargetsItem `json:"targets,omitempty"`

	// actions.
	Actions []PageRulesBodyActionsItemIntf `json:"actions,omitempty"`

	// priority.
	Priority *int64 `json:"priority,omitempty"`

	// status.
	Status *string `json:"status,omitempty"`

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

CreatePageRuleOptions : The CreatePageRule options.

func (*CreatePageRuleOptions) SetActions

SetActions : Allow user to set Actions

func (*CreatePageRuleOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*CreatePageRuleOptions) SetPriority

func (options *CreatePageRuleOptions) SetPriority(priority int64) *CreatePageRuleOptions

SetPriority : Allow user to set Priority

func (*CreatePageRuleOptions) SetStatus

func (options *CreatePageRuleOptions) SetStatus(status string) *CreatePageRuleOptions

SetStatus : Allow user to set Status

func (*CreatePageRuleOptions) SetTargets

func (options *CreatePageRuleOptions) SetTargets(targets []TargetsItem) *CreatePageRuleOptions

SetTargets : Allow user to set Targets

type DeletePageRuleOptions

type DeletePageRuleOptions struct {
	// rule id.
	RuleID *string `json:"rule_id" validate:"required"`

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

DeletePageRuleOptions : The DeletePageRule options.

func (*DeletePageRuleOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*DeletePageRuleOptions) SetRuleID

func (options *DeletePageRuleOptions) SetRuleID(ruleID string) *DeletePageRuleOptions

SetRuleID : Allow user to set RuleID

type GetPageRuleOptions

type GetPageRuleOptions struct {
	// rule id.
	RuleID *string `json:"rule_id" validate:"required"`

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

GetPageRuleOptions : The GetPageRule options.

func (*GetPageRuleOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*GetPageRuleOptions) SetRuleID

func (options *GetPageRuleOptions) SetRuleID(ruleID string) *GetPageRuleOptions

SetRuleID : Allow user to set RuleID

type ListPageRulesOptions

type ListPageRulesOptions struct {
	// default value: disabled. valid values: active, disabled.
	Status *string `json:"status,omitempty"`

	// default value: priority. valid values: status, priority.
	Order *string `json:"order,omitempty"`

	// default value: desc. valid values: asc, desc.
	Direction *string `json:"direction,omitempty"`

	// default value: all. valid values: any, all.
	Match *string `json:"match,omitempty"`

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

ListPageRulesOptions : The ListPageRules options.

func (*ListPageRulesOptions) SetDirection

func (options *ListPageRulesOptions) SetDirection(direction string) *ListPageRulesOptions

SetDirection : Allow user to set Direction

func (*ListPageRulesOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*ListPageRulesOptions) SetMatch

func (options *ListPageRulesOptions) SetMatch(match string) *ListPageRulesOptions

SetMatch : Allow user to set Match

func (*ListPageRulesOptions) SetOrder

func (options *ListPageRulesOptions) SetOrder(order string) *ListPageRulesOptions

SetOrder : Allow user to set Order

func (*ListPageRulesOptions) SetStatus

func (options *ListPageRulesOptions) SetStatus(status string) *ListPageRulesOptions

SetStatus : Allow user to set Status

type PageRuleApiV1

type PageRuleApiV1 struct {
	Service *core.BaseService

	// instance id.
	Crn *string

	// zone id.
	ZoneID *string
}

PageRuleApiV1 : This document describes CIS Pagerule API.

Version: 1.0.0

func NewPageRuleApiV1

func NewPageRuleApiV1(options *PageRuleApiV1Options) (service *PageRuleApiV1, err error)

NewPageRuleApiV1 : constructs an instance of PageRuleApiV1 with passed in options.

func NewPageRuleApiV1UsingExternalConfig

func NewPageRuleApiV1UsingExternalConfig(options *PageRuleApiV1Options) (pageRuleApi *PageRuleApiV1, err error)

NewPageRuleApiV1UsingExternalConfig : constructs an instance of PageRuleApiV1 with passed in options and external configuration.

func (*PageRuleApiV1) ChangePageRule

func (pageRuleApi *PageRuleApiV1) ChangePageRule(changePageRuleOptions *ChangePageRuleOptions) (result *PageRulesResponseWithoutResultInfo, response *core.DetailedResponse, err error)

ChangePageRule : Change a page rule Change a page rule.

func (*PageRuleApiV1) CreatePageRule

func (pageRuleApi *PageRuleApiV1) CreatePageRule(createPageRuleOptions *CreatePageRuleOptions) (result *PageRulesResponseWithoutResultInfo, response *core.DetailedResponse, err error)

CreatePageRule : Create a page rule Create a page rule.

func (*PageRuleApiV1) DeletePageRule

func (pageRuleApi *PageRuleApiV1) DeletePageRule(deletePageRuleOptions *DeletePageRuleOptions) (result *PageRulesDeleteResponse, response *core.DetailedResponse, err error)

DeletePageRule : Delete a page rule Delete a page rule.

func (*PageRuleApiV1) GetPageRule

func (pageRuleApi *PageRuleApiV1) GetPageRule(getPageRuleOptions *GetPageRuleOptions) (result *PageRulesResponseWithoutResultInfo, response *core.DetailedResponse, err error)

GetPageRule : Get a page rule details Get a page rule details.

func (*PageRuleApiV1) ListPageRules

func (pageRuleApi *PageRuleApiV1) ListPageRules(listPageRulesOptions *ListPageRulesOptions) (result *PageRulesResponseListAll, response *core.DetailedResponse, err error)

ListPageRules : List page rules List page rules.

func (*PageRuleApiV1) NewChangePageRuleOptions

func (*PageRuleApiV1) NewChangePageRuleOptions(ruleID string) *ChangePageRuleOptions

NewChangePageRuleOptions : Instantiate ChangePageRuleOptions

func (*PageRuleApiV1) NewCreatePageRuleOptions

func (*PageRuleApiV1) NewCreatePageRuleOptions() *CreatePageRuleOptions

NewCreatePageRuleOptions : Instantiate CreatePageRuleOptions

func (*PageRuleApiV1) NewDeletePageRuleOptions

func (*PageRuleApiV1) NewDeletePageRuleOptions(ruleID string) *DeletePageRuleOptions

NewDeletePageRuleOptions : Instantiate DeletePageRuleOptions

func (*PageRuleApiV1) NewGetPageRuleOptions

func (*PageRuleApiV1) NewGetPageRuleOptions(ruleID string) *GetPageRuleOptions

NewGetPageRuleOptions : Instantiate GetPageRuleOptions

func (*PageRuleApiV1) NewListPageRulesOptions

func (*PageRuleApiV1) NewListPageRulesOptions() *ListPageRulesOptions

NewListPageRulesOptions : Instantiate ListPageRulesOptions

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsBypassCacheOnCookie

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsBypassCacheOnCookie(id string) (model *PageRulesBodyActionsItemActionsBypassCacheOnCookie, err error)

NewPageRulesBodyActionsItemActionsBypassCacheOnCookie : Instantiate PageRulesBodyActionsItemActionsBypassCacheOnCookie (Generic Model Constructor)

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsCacheLevel

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsCacheLevel(id string) (model *PageRulesBodyActionsItemActionsCacheLevel, err error)

NewPageRulesBodyActionsItemActionsCacheLevel : Instantiate PageRulesBodyActionsItemActionsCacheLevel (Generic Model Constructor)

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsEdgeCacheTTL

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsEdgeCacheTTL(id string) (model *PageRulesBodyActionsItemActionsEdgeCacheTTL, err error)

NewPageRulesBodyActionsItemActionsEdgeCacheTTL : Instantiate PageRulesBodyActionsItemActionsEdgeCacheTTL (Generic Model Constructor)

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsForwardingURL

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsForwardingURL(id string) (model *PageRulesBodyActionsItemActionsForwardingURL, err error)

NewPageRulesBodyActionsItemActionsForwardingURL : Instantiate PageRulesBodyActionsItemActionsForwardingURL (Generic Model Constructor)

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsSecurity

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsSecurity(id string) (model *PageRulesBodyActionsItemActionsSecurity, err error)

NewPageRulesBodyActionsItemActionsSecurity : Instantiate PageRulesBodyActionsItemActionsSecurity (Generic Model Constructor)

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsSecurityLevel

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsSecurityLevel(id string) (model *PageRulesBodyActionsItemActionsSecurityLevel, err error)

NewPageRulesBodyActionsItemActionsSecurityLevel : Instantiate PageRulesBodyActionsItemActionsSecurityLevel (Generic Model Constructor)

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsSecurityOptions

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsSecurityOptions(id string) (model *PageRulesBodyActionsItemActionsSecurityOptions, err error)

NewPageRulesBodyActionsItemActionsSecurityOptions : Instantiate PageRulesBodyActionsItemActionsSecurityOptions (Generic Model Constructor)

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsSsl

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsSsl(id string) (model *PageRulesBodyActionsItemActionsSsl, err error)

NewPageRulesBodyActionsItemActionsSsl : Instantiate PageRulesBodyActionsItemActionsSsl (Generic Model Constructor)

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsTTL

func (*PageRuleApiV1) NewPageRulesBodyActionsItemActionsTTL(id string) (model *PageRulesBodyActionsItemActionsTTL, err error)

NewPageRulesBodyActionsItemActionsTTL : Instantiate PageRulesBodyActionsItemActionsTTL (Generic Model Constructor)

func (*PageRuleApiV1) NewTargetsItem

func (*PageRuleApiV1) NewTargetsItem(target string, constraint *TargetsItemConstraint) (model *TargetsItem, err error)

NewTargetsItem : Instantiate TargetsItem (Generic Model Constructor)

func (*PageRuleApiV1) NewTargetsItemConstraint

func (*PageRuleApiV1) NewTargetsItemConstraint(operator string, value string) (model *TargetsItemConstraint, err error)

NewTargetsItemConstraint : Instantiate TargetsItemConstraint (Generic Model Constructor)

func (*PageRuleApiV1) NewUpdatePageRuleOptions

func (*PageRuleApiV1) NewUpdatePageRuleOptions(ruleID string) *UpdatePageRuleOptions

NewUpdatePageRuleOptions : Instantiate UpdatePageRuleOptions

func (*PageRuleApiV1) SetServiceURL

func (pageRuleApi *PageRuleApiV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*PageRuleApiV1) UpdatePageRule

func (pageRuleApi *PageRuleApiV1) UpdatePageRule(updatePageRuleOptions *UpdatePageRuleOptions) (result *PageRulesResponseWithoutResultInfo, response *core.DetailedResponse, err error)

UpdatePageRule : Update a page rule Replace a page rule. The final rule will exactly match the data passed with this request.

type PageRuleApiV1Options

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

	// instance id.
	Crn *string `validate:"required"`

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

PageRuleApiV1Options : Service options

type PageRuleResult

type PageRuleResult struct {
	// identifier.
	ID *string `json:"id" validate:"required"`

	// targets.
	Targets []TargetsItem `json:"targets" validate:"required"`

	// actions.
	Actions []PageRulesBodyActionsItemIntf `json:"actions" validate:"required"`

	// priority.
	Priority *int64 `json:"priority" validate:"required"`

	// status.
	Status *string `json:"status" validate:"required"`

	// modified date.
	ModifiedOn *string `json:"modified_on" validate:"required"`

	// created date.
	CreatedOn *string `json:"created_on" validate:"required"`
}

PageRuleResult : page rule result.

type PageRulesBodyActionsItem

type PageRulesBodyActionsItem struct {
	// " Page rule action field map from UI to API
	//     CF-UI                    map             API,
	// 'Disable Security'           to        'disable_security',
	// 'Browser Integrity Check'    to        'browser_check',
	// 'Server Side Excludes'       to        'server_side_exclude',
	// 'SSL'                        to        'ssl',
	// 'Browser Cache TTL'          to        'browser_cache_ttl',
	// 'Security Level'             to        'security_level',
	// 'Cache Level'                to        'cache_level',
	// 'Edge Cache TTL'             to        'edge_cache_ttl'
	// 'IP Geolocation Header'      to        'ip_geolocation,
	// 'Email Obfuscation'          to        'email_obfuscation',
	// 'Automatic HTTPS Rewrites'   to        'automatic_https_rewrites',
	// 'Opportunistic Encryption'   to        'opportunistic_encryption',
	// 'Forwarding URL'             to        'forwarding_url',
	// 'Always Use HTTPS'           to        'always_use_https',
	// 'Origin Cache Control'       to        'explicit_cache_control',
	// 'Bypass Cache on Cookie'     to        'bypass_cache_on_cookie',
	// 'Cache Deception Armor'      to        'cache_deception_armor',
	// 'WAF'                        to        'waf'
	//
	//                   Page rule conflict list
	// "forwarding_url"             with     all other settings for the rules
	// "always_use_https"           with     all other settings for the rules
	// "disable_security"           with     "email_obfuscation", "server_side_exclude", "waf"
	// ".
	ID *string `json:"id" validate:"required"`

	// value.
	Value interface{} `json:"value,omitempty"`
}

PageRulesBodyActionsItem : PageRulesBodyActionsItem struct Models which "extend" this model: - PageRulesBodyActionsItemActionsSecurity - PageRulesBodyActionsItemActionsSecurityOptions - PageRulesBodyActionsItemActionsSsl - PageRulesBodyActionsItemActionsTTL - PageRulesBodyActionsItemActionsSecurityLevel - PageRulesBodyActionsItemActionsCacheLevel - PageRulesBodyActionsItemActionsEdgeCacheTTL - PageRulesBodyActionsItemActionsForwardingURL - PageRulesBodyActionsItemActionsBypassCacheOnCookie

type PageRulesBodyActionsItemActionsBypassCacheOnCookie

type PageRulesBodyActionsItemActionsBypassCacheOnCookie struct {
	// identifier.
	ID *string `json:"id" validate:"required"`

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

PageRulesBodyActionsItemActionsBypassCacheOnCookie : bypass cache on cookie actions. This model "extends" PageRulesBodyActionsItem

type PageRulesBodyActionsItemActionsCacheLevel

type PageRulesBodyActionsItemActionsCacheLevel struct {
	// identifier.
	ID *string `json:"id" validate:"required"`

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

PageRulesBodyActionsItemActionsCacheLevel : cache level actions. This model "extends" PageRulesBodyActionsItem

type PageRulesBodyActionsItemActionsEdgeCacheTTL

type PageRulesBodyActionsItemActionsEdgeCacheTTL struct {
	// identifier.
	ID *string `json:"id" validate:"required"`

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

PageRulesBodyActionsItemActionsEdgeCacheTTL : edge cache ttl actions. This model "extends" PageRulesBodyActionsItem

type PageRulesBodyActionsItemActionsForwardingURL

type PageRulesBodyActionsItemActionsForwardingURL struct {
	// identifier.
	ID *string `json:"id" validate:"required"`

	// value.
	Value *ActionsForwardingUrlValue `json:"value,omitempty"`
}

PageRulesBodyActionsItemActionsForwardingURL : forwarding url actions. This model "extends" PageRulesBodyActionsItem

type PageRulesBodyActionsItemActionsSecurity

type PageRulesBodyActionsItemActionsSecurity struct {
	// value.
	Value interface{} `json:"value,omitempty"`

	// identifier.
	ID *string `json:"id" validate:"required"`
}

PageRulesBodyActionsItemActionsSecurity : security actions. This model "extends" PageRulesBodyActionsItem

type PageRulesBodyActionsItemActionsSecurityLevel

type PageRulesBodyActionsItemActionsSecurityLevel struct {
	// identifier.
	ID *string `json:"id" validate:"required"`

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

PageRulesBodyActionsItemActionsSecurityLevel : security level actions. This model "extends" PageRulesBodyActionsItem

type PageRulesBodyActionsItemActionsSecurityOptions

type PageRulesBodyActionsItemActionsSecurityOptions struct {
	// identifier.
	ID *string `json:"id" validate:"required"`

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

PageRulesBodyActionsItemActionsSecurityOptions : security options. This model "extends" PageRulesBodyActionsItem

type PageRulesBodyActionsItemActionsSsl

type PageRulesBodyActionsItemActionsSsl struct {
	// identifier.
	ID *string `json:"id" validate:"required"`

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

PageRulesBodyActionsItemActionsSsl : ssl actions. This model "extends" PageRulesBodyActionsItem

type PageRulesBodyActionsItemActionsTTL

type PageRulesBodyActionsItemActionsTTL struct {
	// identifier.
	ID *string `json:"id" validate:"required"`

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

PageRulesBodyActionsItemActionsTTL : ttl actions. This model "extends" PageRulesBodyActionsItem

type PageRulesBodyActionsItemIntf

type PageRulesBodyActionsItemIntf interface {
	// contains filtered or unexported methods
}

type PageRulesDeleteResponse

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

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

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

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

PageRulesDeleteResponse : page rules delete response.

type PageRulesDeleteResponseResult

type PageRulesDeleteResponseResult struct {
	// identifier.
	ID *string `json:"id" validate:"required"`
}

PageRulesDeleteResponseResult : result.

type PageRulesResponseListAll

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

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

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

	// result.
	Result []PageRuleResult `json:"result" validate:"required"`
}

PageRulesResponseListAll : page rule response list all.

type PageRulesResponseWithoutResultInfo

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

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

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

	// page rule result.
	Result *PageRuleResult `json:"result" validate:"required"`
}

PageRulesResponseWithoutResultInfo : page rule response without result information.

type TargetsItem

type TargetsItem struct {
	// target.
	Target *string `json:"target" validate:"required"`

	// constraint.
	Constraint *TargetsItemConstraint `json:"constraint" validate:"required"`
}

TargetsItem : items.

type TargetsItemConstraint

type TargetsItemConstraint struct {
	// operator.
	Operator *string `json:"operator" validate:"required"`

	// value.
	Value *string `json:"value" validate:"required"`
}

TargetsItemConstraint : constraint.

type UpdatePageRuleOptions

type UpdatePageRuleOptions struct {
	// rule id.
	RuleID *string `json:"rule_id" validate:"required"`

	// targets.
	Targets []TargetsItem `json:"targets,omitempty"`

	// actions.
	Actions []PageRulesBodyActionsItemIntf `json:"actions,omitempty"`

	// priority.
	Priority *int64 `json:"priority,omitempty"`

	// status.
	Status *string `json:"status,omitempty"`

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

UpdatePageRuleOptions : The UpdatePageRule options.

func (*UpdatePageRuleOptions) SetActions

SetActions : Allow user to set Actions

func (*UpdatePageRuleOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*UpdatePageRuleOptions) SetPriority

func (options *UpdatePageRuleOptions) SetPriority(priority int64) *UpdatePageRuleOptions

SetPriority : Allow user to set Priority

func (*UpdatePageRuleOptions) SetRuleID

func (options *UpdatePageRuleOptions) SetRuleID(ruleID string) *UpdatePageRuleOptions

SetRuleID : Allow user to set RuleID

func (*UpdatePageRuleOptions) SetStatus

func (options *UpdatePageRuleOptions) SetStatus(status string) *UpdatePageRuleOptions

SetStatus : Allow user to set Status

func (*UpdatePageRuleOptions) SetTargets

func (options *UpdatePageRuleOptions) SetTargets(targets []TargetsItem) *UpdatePageRuleOptions

SetTargets : Allow user to set Targets

Jump to

Keyboard shortcuts

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