useragentblockingrulesv1

package
v0.4.1 Latest Latest
Warning

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

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

Documentation

Overview

Package useragentblockingrulesv1 : Operations and models for the UserAgentBlockingRulesV1 service

Index

Constants

View Source
const (
	CreateZoneUserAgentRuleOptions_Mode_Block       = "block"
	CreateZoneUserAgentRuleOptions_Mode_Challenge   = "challenge"
	CreateZoneUserAgentRuleOptions_Mode_JsChallenge = "js_challenge"
)

Constants associated with the CreateZoneUserAgentRuleOptions.Mode property. The type of action to perform.

View Source
const (
	UpdateUserAgentRuleOptions_Mode_Block       = "block"
	UpdateUserAgentRuleOptions_Mode_Challenge   = "challenge"
	UpdateUserAgentRuleOptions_Mode_JsChallenge = "js_challenge"
)

Constants associated with the UpdateUserAgentRuleOptions.Mode property. The type of action to perform.

View Source
const (
	UseragentRuleObject_Mode_Block       = "block"
	UseragentRuleObject_Mode_Challenge   = "challenge"
	UseragentRuleObject_Mode_JsChallenge = "js_challenge"
)

Constants associated with the UseragentRuleObject.Mode property. The type of action to perform.

View Source
const DefaultServiceName = "user_agent_blocking_rules"

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 (
	UseragentRuleInputConfiguration_Target_Ua = "ua"
)

Constants associated with the UseragentRuleInputConfiguration.Target property. properties.

View Source
const (
	UseragentRuleObjectConfiguration_Target_Ua = "ua"
)

Constants associated with the UseragentRuleObjectConfiguration.Target property. properties.

Variables

This section is empty.

Functions

func UnmarshalDeleteUseragentRuleResp

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

UnmarshalDeleteUseragentRuleResp unmarshals an instance of DeleteUseragentRuleResp from the specified map of raw messages.

func UnmarshalDeleteUseragentRuleRespResult

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

UnmarshalDeleteUseragentRuleRespResult unmarshals an instance of DeleteUseragentRuleRespResult from the specified map of raw messages.

func UnmarshalListUseragentRulesResp

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

UnmarshalListUseragentRulesResp unmarshals an instance of ListUseragentRulesResp from the specified map of raw messages.

func UnmarshalListUseragentRulesRespResultInfo

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

UnmarshalListUseragentRulesRespResultInfo unmarshals an instance of ListUseragentRulesRespResultInfo from the specified map of raw messages.

func UnmarshalUseragentRuleInputConfiguration

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

UnmarshalUseragentRuleInputConfiguration unmarshals an instance of UseragentRuleInputConfiguration from the specified map of raw messages.

func UnmarshalUseragentRuleObject

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

UnmarshalUseragentRuleObject unmarshals an instance of UseragentRuleObject from the specified map of raw messages.

func UnmarshalUseragentRuleObjectConfiguration

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

UnmarshalUseragentRuleObjectConfiguration unmarshals an instance of UseragentRuleObjectConfiguration from the specified map of raw messages.

func UnmarshalUseragentRuleResp

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

UnmarshalUseragentRuleResp unmarshals an instance of UseragentRuleResp from the specified map of raw messages.

Types

type CreateZoneUserAgentRuleOptions

type CreateZoneUserAgentRuleOptions struct {
	// Whether this user-agent rule is currently disabled.
	Paused *bool `json:"paused,omitempty"`

	// Some useful information about this rule to help identify the purpose of it.
	Description *string `json:"description,omitempty"`

	// The type of action to perform.
	Mode *string `json:"mode,omitempty"`

	// Target/Value pair to use for this rule. The value is the exact UserAgent to match.
	Configuration *UseragentRuleInputConfiguration `json:"configuration,omitempty"`

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

CreateZoneUserAgentRuleOptions : The CreateZoneUserAgentRule options.

func (*CreateZoneUserAgentRuleOptions) SetConfiguration

SetConfiguration : Allow user to set Configuration

func (*CreateZoneUserAgentRuleOptions) SetDescription

func (options *CreateZoneUserAgentRuleOptions) SetDescription(description string) *CreateZoneUserAgentRuleOptions

SetDescription : Allow user to set Description

func (*CreateZoneUserAgentRuleOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*CreateZoneUserAgentRuleOptions) SetMode

SetMode : Allow user to set Mode

func (*CreateZoneUserAgentRuleOptions) SetPaused

SetPaused : Allow user to set Paused

type DeleteUseragentRuleResp

type DeleteUseragentRuleResp struct {
	// Operation success flag.
	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"`

	// Container for response information.
	Result *DeleteUseragentRuleRespResult `json:"result" validate:"required"`
}

DeleteUseragentRuleResp : user agent delete response.

type DeleteUseragentRuleRespResult

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

DeleteUseragentRuleRespResult : Container for response information.

type DeleteZoneUserAgentRuleOptions

type DeleteZoneUserAgentRuleOptions struct {
	// Identifier of the user-agent rule to be deleted.
	UseragentRuleIdentifier *string `json:"useragent_rule_identifier" validate:"required"`

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

DeleteZoneUserAgentRuleOptions : The DeleteZoneUserAgentRule options.

func (*DeleteZoneUserAgentRuleOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*DeleteZoneUserAgentRuleOptions) SetUseragentRuleIdentifier

func (options *DeleteZoneUserAgentRuleOptions) SetUseragentRuleIdentifier(useragentRuleIdentifier string) *DeleteZoneUserAgentRuleOptions

SetUseragentRuleIdentifier : Allow user to set UseragentRuleIdentifier

type GetUserAgentRuleOptions

type GetUserAgentRuleOptions struct {
	// Identifier of user-agent blocking rule for the given zone.
	UseragentRuleIdentifier *string `json:"useragent_rule_identifier" validate:"required"`

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

GetUserAgentRuleOptions : The GetUserAgentRule options.

func (*GetUserAgentRuleOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*GetUserAgentRuleOptions) SetUseragentRuleIdentifier

func (options *GetUserAgentRuleOptions) SetUseragentRuleIdentifier(useragentRuleIdentifier string) *GetUserAgentRuleOptions

SetUseragentRuleIdentifier : Allow user to set UseragentRuleIdentifier

type ListAllZoneUserAgentRulesOptions

type ListAllZoneUserAgentRulesOptions struct {
	// Page number of paginated results.
	Page *int64 `json:"page,omitempty"`

	// Maximum number of user-agent rules per page.
	PerPage *int64 `json:"per_page,omitempty"`

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

ListAllZoneUserAgentRulesOptions : The ListAllZoneUserAgentRules options.

func (*ListAllZoneUserAgentRulesOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*ListAllZoneUserAgentRulesOptions) SetPage

SetPage : Allow user to set Page

func (*ListAllZoneUserAgentRulesOptions) SetPerPage

SetPerPage : Allow user to set PerPage

type ListUseragentRulesResp

type ListUseragentRulesResp 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"`

	// Container for response information.
	Result []UseragentRuleObject `json:"result" validate:"required"`

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

ListUseragentRulesResp : user agent rules response.

type ListUseragentRulesRespResultInfo

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

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

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

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

ListUseragentRulesRespResultInfo : Statistics of results.

type UpdateUserAgentRuleOptions

type UpdateUserAgentRuleOptions struct {
	// Identifier of user-agent rule.
	UseragentRuleIdentifier *string `json:"useragent_rule_identifier" validate:"required"`

	// Whether this user-agent rule is currently disabled.
	Paused *bool `json:"paused,omitempty"`

	// Some useful information about this rule to help identify the purpose of it.
	Description *string `json:"description,omitempty"`

	// The type of action to perform.
	Mode *string `json:"mode,omitempty"`

	// Target/Value pair to use for this rule. The value is the exact UserAgent to match.
	Configuration *UseragentRuleInputConfiguration `json:"configuration,omitempty"`

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

UpdateUserAgentRuleOptions : The UpdateUserAgentRule options.

func (*UpdateUserAgentRuleOptions) SetConfiguration

SetConfiguration : Allow user to set Configuration

func (*UpdateUserAgentRuleOptions) SetDescription

func (options *UpdateUserAgentRuleOptions) SetDescription(description string) *UpdateUserAgentRuleOptions

SetDescription : Allow user to set Description

func (*UpdateUserAgentRuleOptions) SetHeaders

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

SetHeaders : Allow user to set Headers

func (*UpdateUserAgentRuleOptions) SetMode

SetMode : Allow user to set Mode

func (*UpdateUserAgentRuleOptions) SetPaused

func (options *UpdateUserAgentRuleOptions) SetPaused(paused bool) *UpdateUserAgentRuleOptions

SetPaused : Allow user to set Paused

func (*UpdateUserAgentRuleOptions) SetUseragentRuleIdentifier

func (options *UpdateUserAgentRuleOptions) SetUseragentRuleIdentifier(useragentRuleIdentifier string) *UpdateUserAgentRuleOptions

SetUseragentRuleIdentifier : Allow user to set UseragentRuleIdentifier

type UserAgentBlockingRulesV1

type UserAgentBlockingRulesV1 struct {
	Service *core.BaseService

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

	// Zone identifier (zone id).
	ZoneIdentifier *string
}

UserAgentBlockingRulesV1 : User-Agent Blocking Rules

Version: 1.0.1

func NewUserAgentBlockingRulesV1

func NewUserAgentBlockingRulesV1(options *UserAgentBlockingRulesV1Options) (service *UserAgentBlockingRulesV1, err error)

NewUserAgentBlockingRulesV1 : constructs an instance of UserAgentBlockingRulesV1 with passed in options.

func NewUserAgentBlockingRulesV1UsingExternalConfig

func NewUserAgentBlockingRulesV1UsingExternalConfig(options *UserAgentBlockingRulesV1Options) (userAgentBlockingRules *UserAgentBlockingRulesV1, err error)

NewUserAgentBlockingRulesV1UsingExternalConfig : constructs an instance of UserAgentBlockingRulesV1 with passed in options and external configuration.

func (*UserAgentBlockingRulesV1) CreateZoneUserAgentRule

func (userAgentBlockingRules *UserAgentBlockingRulesV1) CreateZoneUserAgentRule(createZoneUserAgentRuleOptions *CreateZoneUserAgentRuleOptions) (result *UseragentRuleResp, response *core.DetailedResponse, err error)

CreateZoneUserAgentRule : Create a new user-agent blocking rule Create a new user-agent blocking rule for a given zone under a service instance.

func (*UserAgentBlockingRulesV1) DeleteZoneUserAgentRule

func (userAgentBlockingRules *UserAgentBlockingRulesV1) DeleteZoneUserAgentRule(deleteZoneUserAgentRuleOptions *DeleteZoneUserAgentRuleOptions) (result *DeleteUseragentRuleResp, response *core.DetailedResponse, err error)

DeleteZoneUserAgentRule : Delete a user-agent blocking rule Delete a user-agent blocking rule for a particular zone, given its id.

func (*UserAgentBlockingRulesV1) GetUserAgentRule

func (userAgentBlockingRules *UserAgentBlockingRulesV1) GetUserAgentRule(getUserAgentRuleOptions *GetUserAgentRuleOptions) (result *UseragentRuleResp, response *core.DetailedResponse, err error)

GetUserAgentRule : Get a user-agent blocking rule's details by id For a given service instance, zone id and user-agent rule id, get the user-agent blocking rule details.

func (*UserAgentBlockingRulesV1) ListAllZoneUserAgentRules

func (userAgentBlockingRules *UserAgentBlockingRulesV1) ListAllZoneUserAgentRules(listAllZoneUserAgentRulesOptions *ListAllZoneUserAgentRulesOptions) (result *ListUseragentRulesResp, response *core.DetailedResponse, err error)

ListAllZoneUserAgentRules : List all user-agent blocking rules List all user agent blocking rules.

func (*UserAgentBlockingRulesV1) NewCreateZoneUserAgentRuleOptions

func (*UserAgentBlockingRulesV1) NewCreateZoneUserAgentRuleOptions() *CreateZoneUserAgentRuleOptions

NewCreateZoneUserAgentRuleOptions : Instantiate CreateZoneUserAgentRuleOptions

func (*UserAgentBlockingRulesV1) NewDeleteZoneUserAgentRuleOptions

func (*UserAgentBlockingRulesV1) NewDeleteZoneUserAgentRuleOptions(useragentRuleIdentifier string) *DeleteZoneUserAgentRuleOptions

NewDeleteZoneUserAgentRuleOptions : Instantiate DeleteZoneUserAgentRuleOptions

func (*UserAgentBlockingRulesV1) NewGetUserAgentRuleOptions

func (*UserAgentBlockingRulesV1) NewGetUserAgentRuleOptions(useragentRuleIdentifier string) *GetUserAgentRuleOptions

NewGetUserAgentRuleOptions : Instantiate GetUserAgentRuleOptions

func (*UserAgentBlockingRulesV1) NewListAllZoneUserAgentRulesOptions

func (*UserAgentBlockingRulesV1) NewListAllZoneUserAgentRulesOptions() *ListAllZoneUserAgentRulesOptions

NewListAllZoneUserAgentRulesOptions : Instantiate ListAllZoneUserAgentRulesOptions

func (*UserAgentBlockingRulesV1) NewUpdateUserAgentRuleOptions

func (*UserAgentBlockingRulesV1) NewUpdateUserAgentRuleOptions(useragentRuleIdentifier string) *UpdateUserAgentRuleOptions

NewUpdateUserAgentRuleOptions : Instantiate UpdateUserAgentRuleOptions

func (*UserAgentBlockingRulesV1) NewUseragentRuleInputConfiguration

func (*UserAgentBlockingRulesV1) NewUseragentRuleInputConfiguration(target string, value string) (model *UseragentRuleInputConfiguration, err error)

NewUseragentRuleInputConfiguration : Instantiate UseragentRuleInputConfiguration (Generic Model Constructor)

func (*UserAgentBlockingRulesV1) SetServiceURL

func (userAgentBlockingRules *UserAgentBlockingRulesV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*UserAgentBlockingRulesV1) UpdateUserAgentRule

func (userAgentBlockingRules *UserAgentBlockingRulesV1) UpdateUserAgentRule(updateUserAgentRuleOptions *UpdateUserAgentRuleOptions) (result *UseragentRuleResp, response *core.DetailedResponse, err error)

UpdateUserAgentRule : Update a user-agent blocking rule Update an existing user-agent blocking rule for a given zone under a given service instance.

type UserAgentBlockingRulesV1Options

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

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

	// Zone identifier (zone id).
	ZoneIdentifier *string `validate:"required"`
}

UserAgentBlockingRulesV1Options : Service options

type UseragentRuleInputConfiguration

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

	// The exact UserAgent string to match with this rule.
	Value *string `json:"value" validate:"required"`
}

UseragentRuleInputConfiguration : Target/Value pair to use for this rule. The value is the exact UserAgent to match.

type UseragentRuleObject

type UseragentRuleObject struct {
	// Identifier of the user-agent blocking rule.
	ID *string `json:"id" validate:"required"`

	// Whether this user-agent rule is currently disabled.
	Paused *bool `json:"paused" validate:"required"`

	// Some useful information about this rule to help identify the purpose of it.
	Description *string `json:"description" validate:"required"`

	// The type of action to perform.
	Mode *string `json:"mode" validate:"required"`

	// Target/Value pair to use for this rule. The value is the exact UserAgent to match.
	Configuration *UseragentRuleObjectConfiguration `json:"configuration" validate:"required"`
}

UseragentRuleObject : user agent rule object.

type UseragentRuleObjectConfiguration

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

	// The exact UserAgent string to match with this rule.
	Value *string `json:"value" validate:"required"`
}

UseragentRuleObjectConfiguration : Target/Value pair to use for this rule. The value is the exact UserAgent to match.

type UseragentRuleResp

type UseragentRuleResp 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"`

	// user agent rule object.
	Result *UseragentRuleObject `json:"result" validate:"required"`
}

UseragentRuleResp : user agent rule response.

Jump to

Keyboard shortcuts

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