Documentation ¶
Overview ¶
Package custompagesv1 : Operations and models for the CustomPagesV1 service
Index ¶
- Constants
- func UnmarshalCustomPageObject(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalCustomPageSpecificResp(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalListCustomPagesResp(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalListCustomPagesRespResultInfo(m map[string]json.RawMessage, result interface{}) (err error)
- type CustomPageObject
- type CustomPageSpecificResp
- type CustomPagesV1
- func (customPages *CustomPagesV1) GetInstanceCustomPage(getInstanceCustomPageOptions *GetInstanceCustomPageOptions) (result *CustomPageSpecificResp, response *core.DetailedResponse, err error)
- func (customPages *CustomPagesV1) GetZoneCustomPage(getZoneCustomPageOptions *GetZoneCustomPageOptions) (result *CustomPageSpecificResp, response *core.DetailedResponse, err error)
- func (customPages *CustomPagesV1) ListInstanceCustomPages(listInstanceCustomPagesOptions *ListInstanceCustomPagesOptions) (result *ListCustomPagesResp, response *core.DetailedResponse, err error)
- func (customPages *CustomPagesV1) ListZoneCustomPages(listZoneCustomPagesOptions *ListZoneCustomPagesOptions) (result *ListCustomPagesResp, response *core.DetailedResponse, err error)
- func (*CustomPagesV1) NewGetInstanceCustomPageOptions(pageIdentifier string) *GetInstanceCustomPageOptions
- func (*CustomPagesV1) NewGetZoneCustomPageOptions(pageIdentifier string) *GetZoneCustomPageOptions
- func (*CustomPagesV1) NewListInstanceCustomPagesOptions() *ListInstanceCustomPagesOptions
- func (*CustomPagesV1) NewListZoneCustomPagesOptions() *ListZoneCustomPagesOptions
- func (*CustomPagesV1) NewUpdateInstanceCustomPageOptions(pageIdentifier string) *UpdateInstanceCustomPageOptions
- func (*CustomPagesV1) NewUpdateZoneCustomPageOptions(pageIdentifier string) *UpdateZoneCustomPageOptions
- func (customPages *CustomPagesV1) SetServiceURL(url string) error
- func (customPages *CustomPagesV1) UpdateInstanceCustomPage(updateInstanceCustomPageOptions *UpdateInstanceCustomPageOptions) (result *CustomPageSpecificResp, response *core.DetailedResponse, err error)
- func (customPages *CustomPagesV1) UpdateZoneCustomPage(updateZoneCustomPageOptions *UpdateZoneCustomPageOptions) (result *CustomPageSpecificResp, response *core.DetailedResponse, err error)
- type CustomPagesV1Options
- type GetInstanceCustomPageOptions
- type GetZoneCustomPageOptions
- type ListCustomPagesResp
- type ListCustomPagesRespResultInfo
- type ListInstanceCustomPagesOptions
- type ListZoneCustomPagesOptions
- type UpdateInstanceCustomPageOptions
- func (options *UpdateInstanceCustomPageOptions) SetHeaders(param map[string]string) *UpdateInstanceCustomPageOptions
- func (options *UpdateInstanceCustomPageOptions) SetPageIdentifier(pageIdentifier string) *UpdateInstanceCustomPageOptions
- func (options *UpdateInstanceCustomPageOptions) SetState(state string) *UpdateInstanceCustomPageOptions
- func (options *UpdateInstanceCustomPageOptions) SetURL(url string) *UpdateInstanceCustomPageOptions
- type UpdateZoneCustomPageOptions
- func (options *UpdateZoneCustomPageOptions) SetHeaders(param map[string]string) *UpdateZoneCustomPageOptions
- func (options *UpdateZoneCustomPageOptions) SetPageIdentifier(pageIdentifier string) *UpdateZoneCustomPageOptions
- func (options *UpdateZoneCustomPageOptions) SetState(state string) *UpdateZoneCustomPageOptions
- func (options *UpdateZoneCustomPageOptions) SetURL(url string) *UpdateZoneCustomPageOptions
Constants ¶
const ( 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.
const ( 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.
const ( 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.
const ( UpdateInstanceCustomPageOptions_State_Customized = "customized" UpdateInstanceCustomPageOptions_State_Default = "default" )
Constants associated with the UpdateInstanceCustomPageOptions.State property. The Custom Page state.
const ( 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.
const ( UpdateZoneCustomPageOptions_State_Customized = "customized" UpdateZoneCustomPageOptions_State_Default = "default" )
Constants associated with the UpdateZoneCustomPageOptions.State property. The Custom Page state.
const ( 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.
const ( 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.
const ( CustomPageObject_State_Customized = "customized" CustomPageObject_State_Default = "default" )
Constants associated with the CustomPageObject.State property. The Custom Page state.
const DefaultServiceName = "custom_pages"
DefaultServiceName is the default key used to find external configuration information.
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 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) 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) 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) 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) 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) 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) 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) 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.
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"` // Allows users to set headers on API requests Headers map[string]string }
GetInstanceCustomPageOptions : The GetInstanceCustomPage options.
func (*GetInstanceCustomPageOptions) SetHeaders ¶
func (options *GetInstanceCustomPageOptions) SetHeaders(param map[string]string) *GetInstanceCustomPageOptions
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"` // 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 ¶
func (options *ListInstanceCustomPagesOptions) SetHeaders(param map[string]string) *ListInstanceCustomPagesOptions
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"` // 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 ¶
func (options *UpdateInstanceCustomPageOptions) SetHeaders(param map[string]string) *UpdateInstanceCustomPageOptions
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 ¶
func (options *UpdateInstanceCustomPageOptions) SetState(state string) *UpdateInstanceCustomPageOptions
SetState : Allow user to set State
func (*UpdateInstanceCustomPageOptions) SetURL ¶
func (options *UpdateInstanceCustomPageOptions) SetURL(url string) *UpdateInstanceCustomPageOptions
SetURL : Allow user to set URL
type UpdateZoneCustomPageOptions ¶
type UpdateZoneCustomPageOptions struct { // Custom page identifier. PageIdentifier *string `json:"page_identifier" validate:"required"` // 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 ¶
func (options *UpdateZoneCustomPageOptions) SetState(state string) *UpdateZoneCustomPageOptions
SetState : Allow user to set State
func (*UpdateZoneCustomPageOptions) SetURL ¶
func (options *UpdateZoneCustomPageOptions) SetURL(url string) *UpdateZoneCustomPageOptions
SetURL : Allow user to set URL