custompagesv1

package
v0.46.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Overview

Package custompagesv1 : Operations and models for the CustomPagesV1 service

Index

Constants

View Source
const (
	GetInstanceCustomPageOptions_PageIdentifier_AlwaysOnline     = "always_online"
	GetInstanceCustomPageOptions_PageIdentifier_BasicChallenge   = "basic_challenge"
	GetInstanceCustomPageOptions_PageIdentifier_CountryChallenge = "country_challenge"
	GetInstanceCustomPageOptions_PageIdentifier_IpBlock          = "ip_block"
	GetInstanceCustomPageOptions_PageIdentifier_RatelimitBlock   = "ratelimit_block"
	GetInstanceCustomPageOptions_PageIdentifier_UnderAttack      = "under_attack"
	GetInstanceCustomPageOptions_PageIdentifier_WafBlock         = "waf_block"
	GetInstanceCustomPageOptions_PageIdentifier_WafChallenge     = "waf_challenge"
)

Constants associated with the GetInstanceCustomPageOptions.PageIdentifier property. Custom page identifier.

View Source
const (
	GetZoneCustomPageOptions_PageIdentifier_AlwaysOnline     = "always_online"
	GetZoneCustomPageOptions_PageIdentifier_BasicChallenge   = "basic_challenge"
	GetZoneCustomPageOptions_PageIdentifier_CountryChallenge = "country_challenge"
	GetZoneCustomPageOptions_PageIdentifier_IpBlock          = "ip_block"
	GetZoneCustomPageOptions_PageIdentifier_RatelimitBlock   = "ratelimit_block"
	GetZoneCustomPageOptions_PageIdentifier_UnderAttack      = "under_attack"
	GetZoneCustomPageOptions_PageIdentifier_WafBlock         = "waf_block"
	GetZoneCustomPageOptions_PageIdentifier_WafChallenge     = "waf_challenge"
)

Constants associated with the GetZoneCustomPageOptions.PageIdentifier property. Custom page identifier.

View Source
const (
	UpdateInstanceCustomPageOptions_PageIdentifier_AlwaysOnline     = "always_online"
	UpdateInstanceCustomPageOptions_PageIdentifier_BasicChallenge   = "basic_challenge"
	UpdateInstanceCustomPageOptions_PageIdentifier_CountryChallenge = "country_challenge"
	UpdateInstanceCustomPageOptions_PageIdentifier_IpBlock          = "ip_block"
	UpdateInstanceCustomPageOptions_PageIdentifier_RatelimitBlock   = "ratelimit_block"
	UpdateInstanceCustomPageOptions_PageIdentifier_UnderAttack      = "under_attack"
	UpdateInstanceCustomPageOptions_PageIdentifier_WafBlock         = "waf_block"
	UpdateInstanceCustomPageOptions_PageIdentifier_WafChallenge     = "waf_challenge"
)

Constants associated with the UpdateInstanceCustomPageOptions.PageIdentifier property. Custom page identifier.

View Source
const (
	UpdateInstanceCustomPageOptions_State_Customized = "customized"
	UpdateInstanceCustomPageOptions_State_Default    = "default"
)

Constants associated with the UpdateInstanceCustomPageOptions.State property. The Custom Page state.

View Source
const (
	UpdateZoneCustomPageOptions_PageIdentifier_AlwaysOnline     = "always_online"
	UpdateZoneCustomPageOptions_PageIdentifier_BasicChallenge   = "basic_challenge"
	UpdateZoneCustomPageOptions_PageIdentifier_CountryChallenge = "country_challenge"
	UpdateZoneCustomPageOptions_PageIdentifier_IpBlock          = "ip_block"
	UpdateZoneCustomPageOptions_PageIdentifier_RatelimitBlock   = "ratelimit_block"
	UpdateZoneCustomPageOptions_PageIdentifier_UnderAttack      = "under_attack"
	UpdateZoneCustomPageOptions_PageIdentifier_WafBlock         = "waf_block"
	UpdateZoneCustomPageOptions_PageIdentifier_WafChallenge     = "waf_challenge"
)

Constants associated with the UpdateZoneCustomPageOptions.PageIdentifier property. Custom page identifier.

View Source
const (
	UpdateZoneCustomPageOptions_State_Customized = "customized"
	UpdateZoneCustomPageOptions_State_Default    = "default"
)

Constants associated with the UpdateZoneCustomPageOptions.State property. The Custom Page state.

View Source
const (
	CustomPageObject_ID_AlwaysOnline     = "always_online"
	CustomPageObject_ID_BasicChallenge   = "basic_challenge"
	CustomPageObject_ID_CountryChallenge = "country_challenge"
	CustomPageObject_ID_IpBlock          = "ip_block"
	CustomPageObject_ID_RatelimitBlock   = "ratelimit_block"
	CustomPageObject_ID_UnderAttack      = "under_attack"
	CustomPageObject_ID_WafBlock         = "waf_block"
	CustomPageObject_ID_WafChallenge     = "waf_challenge"
)

Constants associated with the CustomPageObject.ID property. Custom page identifier.

View Source
const (
	CustomPageObject_RequiredTokens_AlwaysOnlineNoCopyBox   = "::ALWAYS_ONLINE_NO_COPY_BOX::"
	CustomPageObject_RequiredTokens_CaptchaBox              = "::CAPTCHA_BOX::"
	CustomPageObject_RequiredTokens_CloudflareError1000sBox = "::CLOUDFLARE_ERROR_1000S_BOX::"
	CustomPageObject_RequiredTokens_CloudflareError500sBox  = "::CLOUDFLARE_ERROR_500S_BOX::"
	CustomPageObject_RequiredTokens_ImUnderAttackBox        = "::IM_UNDER_ATTACK_BOX::"
)

Constants associated with the CustomPageObject.RequiredTokens property.

View Source
const (
	CustomPageObject_State_Customized = "customized"
	CustomPageObject_State_Default    = "default"
)

Constants associated with the CustomPageObject.State property. The Custom Page state.

View Source
const DefaultServiceName = "custom_pages"

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 GetServiceURLForRegion added in v0.12.1

func GetServiceURLForRegion(region string) (string, error)

GetServiceURLForRegion returns the service URL to be used for the specified region

func UnmarshalCustomPageObject

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

UnmarshalCustomPageObject unmarshals an instance of CustomPageObject from the specified map of raw messages.

func UnmarshalCustomPageSpecificResp

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

UnmarshalCustomPageSpecificResp unmarshals an instance of CustomPageSpecificResp from the specified map of raw messages.

func UnmarshalListCustomPagesResp

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

UnmarshalListCustomPagesResp unmarshals an instance of ListCustomPagesResp from the specified map of raw messages.

func UnmarshalListCustomPagesRespResultInfo

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

UnmarshalListCustomPagesRespResultInfo unmarshals an instance of ListCustomPagesRespResultInfo from the specified map of raw messages.

Types

type CustomPageObject

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

	// Description of custom page.
	Description *string `json:"description" validate:"required"`

	// array of page tokens.
	RequiredTokens []string `json:"required_tokens" validate:"required"`

	// Preview target.
	PreviewTarget *string `json:"preview_target" validate:"required"`

	// Created date.
	CreatedOn *strfmt.DateTime `json:"created_on" validate:"required"`

	// Modified date.
	ModifiedOn *strfmt.DateTime `json:"modified_on" validate:"required"`

	// A URL that is associated with the Custom Page.
	URL *string `json:"url" validate:"required"`

	// The Custom Page state.
	State *string `json:"state" validate:"required"`
}

CustomPageObject : custom page object.

type CustomPageSpecificResp

type CustomPageSpecificResp struct {
	// Was operation successful.
	Success *bool `json:"success" validate:"required"`

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

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

	// custom page object.
	Result *CustomPageObject `json:"result" validate:"required"`
}

CustomPageSpecificResp : custom page specific response.

type CustomPagesV1

type CustomPagesV1 struct {
	Service *core.BaseService

	// Full crn of the service instance.
	Crn *string

	// Zone identifier.
	ZoneIdentifier *string
}

CustomPagesV1 : Custom Pages

Version: 1.0.0

func NewCustomPagesV1

func NewCustomPagesV1(options *CustomPagesV1Options) (service *CustomPagesV1, err error)

NewCustomPagesV1 : constructs an instance of CustomPagesV1 with passed in options.

func NewCustomPagesV1UsingExternalConfig

func NewCustomPagesV1UsingExternalConfig(options *CustomPagesV1Options) (customPages *CustomPagesV1, err error)

NewCustomPagesV1UsingExternalConfig : constructs an instance of CustomPagesV1 with passed in options and external configuration.

func (*CustomPagesV1) Clone added in v0.12.1

func (customPages *CustomPagesV1) Clone() *CustomPagesV1

Clone makes a copy of "customPages" suitable for processing requests.

func (*CustomPagesV1) DisableRetries added in v0.12.1

func (customPages *CustomPagesV1) DisableRetries()

DisableRetries disables automatic retries for requests invoked for this service instance.

func (*CustomPagesV1) EnableRetries added in v0.12.1

func (customPages *CustomPagesV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)

EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.

func (*CustomPagesV1) GetEnableGzipCompression added in v0.12.1

func (customPages *CustomPagesV1) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*CustomPagesV1) GetInstanceCustomPage

func (customPages *CustomPagesV1) GetInstanceCustomPage(getInstanceCustomPageOptions *GetInstanceCustomPageOptions) (result *CustomPageSpecificResp, response *core.DetailedResponse, err error)

GetInstanceCustomPage : Get a custom page for a given instance Get a specific custom page for a given instance.

func (*CustomPagesV1) GetInstanceCustomPageWithContext added in v0.12.1

func (customPages *CustomPagesV1) GetInstanceCustomPageWithContext(ctx context.Context, getInstanceCustomPageOptions *GetInstanceCustomPageOptions) (result *CustomPageSpecificResp, response *core.DetailedResponse, err error)

GetInstanceCustomPageWithContext is an alternate form of the GetInstanceCustomPage method which supports a Context parameter

func (*CustomPagesV1) GetServiceURL added in v0.12.1

func (customPages *CustomPagesV1) GetServiceURL() string

GetServiceURL returns the service URL

func (*CustomPagesV1) GetZoneCustomPage

func (customPages *CustomPagesV1) GetZoneCustomPage(getZoneCustomPageOptions *GetZoneCustomPageOptions) (result *CustomPageSpecificResp, response *core.DetailedResponse, err error)

GetZoneCustomPage : Get a custom page for a given zone Get a specific custom page for a given zone.

func (*CustomPagesV1) GetZoneCustomPageWithContext added in v0.12.1

func (customPages *CustomPagesV1) GetZoneCustomPageWithContext(ctx context.Context, getZoneCustomPageOptions *GetZoneCustomPageOptions) (result *CustomPageSpecificResp, response *core.DetailedResponse, err error)

GetZoneCustomPageWithContext is an alternate form of the GetZoneCustomPage method which supports a Context parameter

func (*CustomPagesV1) ListInstanceCustomPages

func (customPages *CustomPagesV1) ListInstanceCustomPages(listInstanceCustomPagesOptions *ListInstanceCustomPagesOptions) (result *ListCustomPagesResp, response *core.DetailedResponse, err error)

ListInstanceCustomPages : List all custom pages for a given instance List all custom pages for a given instance.

func (*CustomPagesV1) ListInstanceCustomPagesWithContext added in v0.12.1

func (customPages *CustomPagesV1) ListInstanceCustomPagesWithContext(ctx context.Context, listInstanceCustomPagesOptions *ListInstanceCustomPagesOptions) (result *ListCustomPagesResp, response *core.DetailedResponse, err error)

ListInstanceCustomPagesWithContext is an alternate form of the ListInstanceCustomPages method which supports a Context parameter

func (*CustomPagesV1) ListZoneCustomPages

func (customPages *CustomPagesV1) ListZoneCustomPages(listZoneCustomPagesOptions *ListZoneCustomPagesOptions) (result *ListCustomPagesResp, response *core.DetailedResponse, err error)

ListZoneCustomPages : List all custom pages for a given zone List all custom pages for a given zone.

func (*CustomPagesV1) ListZoneCustomPagesWithContext added in v0.12.1

func (customPages *CustomPagesV1) ListZoneCustomPagesWithContext(ctx context.Context, listZoneCustomPagesOptions *ListZoneCustomPagesOptions) (result *ListCustomPagesResp, response *core.DetailedResponse, err error)

ListZoneCustomPagesWithContext is an alternate form of the ListZoneCustomPages method which supports a Context parameter

func (*CustomPagesV1) NewGetInstanceCustomPageOptions

func (*CustomPagesV1) NewGetInstanceCustomPageOptions(pageIdentifier string) *GetInstanceCustomPageOptions

NewGetInstanceCustomPageOptions : Instantiate GetInstanceCustomPageOptions

func (*CustomPagesV1) NewGetZoneCustomPageOptions

func (*CustomPagesV1) NewGetZoneCustomPageOptions(pageIdentifier string) *GetZoneCustomPageOptions

NewGetZoneCustomPageOptions : Instantiate GetZoneCustomPageOptions

func (*CustomPagesV1) NewListInstanceCustomPagesOptions

func (*CustomPagesV1) NewListInstanceCustomPagesOptions() *ListInstanceCustomPagesOptions

NewListInstanceCustomPagesOptions : Instantiate ListInstanceCustomPagesOptions

func (*CustomPagesV1) NewListZoneCustomPagesOptions

func (*CustomPagesV1) NewListZoneCustomPagesOptions() *ListZoneCustomPagesOptions

NewListZoneCustomPagesOptions : Instantiate ListZoneCustomPagesOptions

func (*CustomPagesV1) NewUpdateInstanceCustomPageOptions

func (*CustomPagesV1) NewUpdateInstanceCustomPageOptions(pageIdentifier string) *UpdateInstanceCustomPageOptions

NewUpdateInstanceCustomPageOptions : Instantiate UpdateInstanceCustomPageOptions

func (*CustomPagesV1) NewUpdateZoneCustomPageOptions

func (*CustomPagesV1) NewUpdateZoneCustomPageOptions(pageIdentifier string) *UpdateZoneCustomPageOptions

NewUpdateZoneCustomPageOptions : Instantiate UpdateZoneCustomPageOptions

func (*CustomPagesV1) SetDefaultHeaders added in v0.12.1

func (customPages *CustomPagesV1) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*CustomPagesV1) SetEnableGzipCompression added in v0.12.1

func (customPages *CustomPagesV1) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*CustomPagesV1) SetServiceURL

func (customPages *CustomPagesV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*CustomPagesV1) UpdateInstanceCustomPage

func (customPages *CustomPagesV1) UpdateInstanceCustomPage(updateInstanceCustomPageOptions *UpdateInstanceCustomPageOptions) (result *CustomPageSpecificResp, response *core.DetailedResponse, err error)

UpdateInstanceCustomPage : Update a custom page for a given instance Update a specific custom page for a given instance.

func (*CustomPagesV1) UpdateInstanceCustomPageWithContext added in v0.12.1

func (customPages *CustomPagesV1) UpdateInstanceCustomPageWithContext(ctx context.Context, updateInstanceCustomPageOptions *UpdateInstanceCustomPageOptions) (result *CustomPageSpecificResp, response *core.DetailedResponse, err error)

UpdateInstanceCustomPageWithContext is an alternate form of the UpdateInstanceCustomPage method which supports a Context parameter

func (*CustomPagesV1) UpdateZoneCustomPage

func (customPages *CustomPagesV1) UpdateZoneCustomPage(updateZoneCustomPageOptions *UpdateZoneCustomPageOptions) (result *CustomPageSpecificResp, response *core.DetailedResponse, err error)

UpdateZoneCustomPage : Update a custom page for a given zone Update a specific custom page for a given zone.

func (*CustomPagesV1) UpdateZoneCustomPageWithContext added in v0.12.1

func (customPages *CustomPagesV1) UpdateZoneCustomPageWithContext(ctx context.Context, updateZoneCustomPageOptions *UpdateZoneCustomPageOptions) (result *CustomPageSpecificResp, response *core.DetailedResponse, err error)

UpdateZoneCustomPageWithContext is an alternate form of the UpdateZoneCustomPage method which supports a Context parameter

type CustomPagesV1Options

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

	// Full crn of the service instance.
	Crn *string `validate:"required"`

	// Zone identifier.
	ZoneIdentifier *string `validate:"required"`
}

CustomPagesV1Options : Service options

type GetInstanceCustomPageOptions

type GetInstanceCustomPageOptions struct {
	// Custom page identifier.
	PageIdentifier *string `json:"page_identifier" validate:"required,ne="`

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

GetInstanceCustomPageOptions : The GetInstanceCustomPage options.

func (*GetInstanceCustomPageOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*GetInstanceCustomPageOptions) SetPageIdentifier

func (options *GetInstanceCustomPageOptions) SetPageIdentifier(pageIdentifier string) *GetInstanceCustomPageOptions

SetPageIdentifier : Allow user to set PageIdentifier

type GetZoneCustomPageOptions

type GetZoneCustomPageOptions struct {
	// Custom page identifier.
	PageIdentifier *string `json:"page_identifier" validate:"required,ne="`

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

GetZoneCustomPageOptions : The GetZoneCustomPage options.

func (*GetZoneCustomPageOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*GetZoneCustomPageOptions) SetPageIdentifier

func (options *GetZoneCustomPageOptions) SetPageIdentifier(pageIdentifier string) *GetZoneCustomPageOptions

SetPageIdentifier : Allow user to set PageIdentifier

type ListCustomPagesResp

type ListCustomPagesResp struct {
	// Was operation successful.
	Success *bool `json:"success" validate:"required"`

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

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

	// custom pages array.
	Result []CustomPageObject `json:"result" validate:"required"`

	// Statistics of results.
	ResultInfo *ListCustomPagesRespResultInfo `json:"result_info" validate:"required"`
}

ListCustomPagesResp : list of custom pages response.

type ListCustomPagesRespResultInfo

type ListCustomPagesRespResultInfo struct {
	// Page number.
	Page *int64 `json:"page" validate:"required"`

	// Number of results per page.
	PerPage *int64 `json:"per_page" validate:"required"`

	// Number of total pages.
	TotalPages *int64 `json:"total_pages" validate:"required"`

	// Number of results.
	Count *int64 `json:"count" validate:"required"`

	// Total number of results.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

ListCustomPagesRespResultInfo : Statistics of results.

type ListInstanceCustomPagesOptions

type ListInstanceCustomPagesOptions struct {

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

ListInstanceCustomPagesOptions : The ListInstanceCustomPages options.

func (*ListInstanceCustomPagesOptions) SetHeaders

SetHeaders : Allow user to set Headers

type ListZoneCustomPagesOptions

type ListZoneCustomPagesOptions struct {

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

ListZoneCustomPagesOptions : The ListZoneCustomPages options.

func (*ListZoneCustomPagesOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

type UpdateInstanceCustomPageOptions

type UpdateInstanceCustomPageOptions struct {
	// Custom page identifier.
	PageIdentifier *string `json:"page_identifier" validate:"required,ne="`

	// A URL that is associated with the Custom Page.
	URL *string `json:"url,omitempty"`

	// The Custom Page state.
	State *string `json:"state,omitempty"`

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

UpdateInstanceCustomPageOptions : The UpdateInstanceCustomPage options.

func (*UpdateInstanceCustomPageOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*UpdateInstanceCustomPageOptions) SetPageIdentifier

func (options *UpdateInstanceCustomPageOptions) SetPageIdentifier(pageIdentifier string) *UpdateInstanceCustomPageOptions

SetPageIdentifier : Allow user to set PageIdentifier

func (*UpdateInstanceCustomPageOptions) SetState

SetState : Allow user to set State

func (*UpdateInstanceCustomPageOptions) SetURL

SetURL : Allow user to set URL

type UpdateZoneCustomPageOptions

type UpdateZoneCustomPageOptions struct {
	// Custom page identifier.
	PageIdentifier *string `json:"page_identifier" validate:"required,ne="`

	// A URL that is associated with the Custom Page.
	URL *string `json:"url,omitempty"`

	// The Custom Page state.
	State *string `json:"state,omitempty"`

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

UpdateZoneCustomPageOptions : The UpdateZoneCustomPage options.

func (*UpdateZoneCustomPageOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*UpdateZoneCustomPageOptions) SetPageIdentifier

func (options *UpdateZoneCustomPageOptions) SetPageIdentifier(pageIdentifier string) *UpdateZoneCustomPageOptions

SetPageIdentifier : Allow user to set PageIdentifier

func (*UpdateZoneCustomPageOptions) SetState

SetState : Allow user to set State

func (*UpdateZoneCustomPageOptions) SetURL

SetURL : Allow user to set URL

Jump to

Keyboard shortcuts

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