Documentation
¶
Index ¶
- type AddBotRuleSetParams
- type BotRuleDirective
- type BotRuleSet
- type BotRuleSetAddOK
- type BotRuleSetGetAllOK
- type BotRuleSetGetOK
- type Client
- func (c Client) AddBotRuleSet(params AddBotRuleSetParams) (string, error)
- func (c Client) DeleteBotRuleSet(params DeleteBotRuleSetParams) error
- func (c Client) GetAllBotRuleSets(params GetAllBotRuleSetsParams) (*[]BotRuleSetGetAllOK, error)
- func (c Client) GetBotRuleSet(params GetBotRuleSetParams) (*BotRuleSetGetOK, error)
- func (c Client) UpdateBotRuleSet(params UpdateBotRuleSetParams) error
- type ClientService
- type DeleteBotRuleSetParams
- type GetAllBotRuleSetsParams
- type GetBotRuleSetParams
- type UpdateBotRuleSetParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddBotRuleSetParams ¶
type AddBotRuleSetParams struct {
BotRuleSet BotRuleSet
AccountNumber string
}
AddBotRuleSetParams represents the parameters for creating a new Bot Rule Set.
func NewAddBotRuleSetParams ¶
func NewAddBotRuleSetParams() AddBotRuleSetParams
NewAddBotRuleSetParams creates a default instance of AddBotRuleSetParams.
type BotRuleDirective ¶
type BotRuleDirective struct {
// Identifies a bot rule that uses custom match conditions. This type of
// rule is satisfied when a match is found for each of its conditions. A
// condition determines request identification by defining what will be
// matched (i.e., variable), how it will be matched (i.e., operator), and a
// match value.
SecRule *rules.SecRule `json:"sec_rule,omitempty"`
// Identifies a bot rule that uses our reputation database. This type of
// rule is satisfied when the client's IP address matches an IP address
// defined within our reputation database. Our reputation database
// contains a list of IP addresses known to be used by bots.
Include string `json:"include,omitempty"`
}
BotRuleDirective contains rules used by Bot Rule Sets. Each directive object defines a rule via the SecRule object or the Include property.
type BotRuleSet ¶
type BotRuleSet struct {
// Contains rules. Each directive object defines a rule via
// the sec_rule object or via the use of Include property.
Directives []BotRuleDirective `json:"directive"`
// Indicates the name of the rule.
Name string `json:"name,omitempty"`
}
BotRuleSet is a detailed representation of a Bot Rule Set.
type BotRuleSetAddOK ¶
type BotRuleSetAddOK struct {
rules.AddRuleResponse
}
BotRuleSetAddOK represents the successful creation of a Bot Rule Set.
type BotRuleSetGetAllOK ¶
type BotRuleSetGetAllOK struct {
// Indicates the system-defined ID for the Bot Rule Set.
ID string `json:"id"`
// Indicates the date and time at which the rule was last modified.
// Syntax: MM/DD/YYYYhh:mm:ss [AM|PM]
LastModifiedDate string `json:"last_modified_date"`
Name string `json:"name"`
}
BotRuleSetGetAllOK is a lightweight representation of a Bot Rule Set.
type BotRuleSetGetOK ¶
type BotRuleSetGetOK struct {
// Indicates the generated ID for the Bot Rule Set
ID string
BotRuleSet
// Indicates the date and time at which the rule was last modified.
// Syntax: MM/DD/YYYYhh:mm:ss [AM|PM]
LastModifiedDate string `json:"last_modified_date"`
}
BotRuleSetGetOK represents the successful retrieval of a Bot Rule Set.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Bot Rule Sets client.
func (Client) AddBotRuleSet ¶
func (c Client) AddBotRuleSet( params AddBotRuleSetParams, ) (string, error)
AddBotRuleSet creates a Bot Rule Set for the provided account number and returns the new rule set's system-generated ID
func (Client) DeleteBotRuleSet ¶
func (c Client) DeleteBotRuleSet( params DeleteBotRuleSetParams, ) error
DeleteBotRuleSet deletes a Bot Rule Set for the provided account number with the provided Bot Rule Set ID.
func (Client) GetAllBotRuleSets ¶
func (c Client) GetAllBotRuleSets( params GetAllBotRuleSetsParams, ) (*[]BotRuleSetGetAllOK, error)
GetAllBotRuleSets retrieves the list of Bot Rule Sets for the provided account number.
func (Client) GetBotRuleSet ¶
func (c Client) GetBotRuleSet( params GetBotRuleSetParams, ) (*BotRuleSetGetOK, error)
GetBotRuleSet retrieves a Bot Rule Set for the provided account number with the provided Bot Rule Set ID.
func (Client) UpdateBotRuleSet ¶
func (c Client) UpdateBotRuleSet( params UpdateBotRuleSetParams, ) error
UpdateBotRuleSet updates a Bot Rule Set for the provided account number using the provided Bot Rule Set ID and Bot Rule Set properties.
type ClientService ¶
type ClientService interface {
AddBotRuleSet(
params AddBotRuleSetParams,
) (string, error)
GetAllBotRuleSets(
params GetAllBotRuleSetsParams,
) (*[]BotRuleSetGetAllOK, error)
DeleteBotRuleSet(
params DeleteBotRuleSetParams,
) error
GetBotRuleSet(
params GetBotRuleSetParams,
) (*BotRuleSetGetOK, error)
UpdateBotRuleSet(
params UpdateBotRuleSetParams,
) error
}
ClientService is the interface for Client methods.
type DeleteBotRuleSetParams ¶
DeleteBotRuleSetParams represents the parameters for deleting a Bot Rule Set.
func NewDeleteBotRuleSetParams ¶
func NewDeleteBotRuleSetParams() DeleteBotRuleSetParams
NewDeleteBotRuleSetParams creates a defaut instance of DeleteBotRuleSetParams.
type GetAllBotRuleSetsParams ¶
type GetAllBotRuleSetsParams struct {
AccountNumber string
}
GetAllBotRuleSetsParams represents the parameters for retrieving all Bot Rule Sets for an account.
type GetBotRuleSetParams ¶
GetBotRuleSetParams represents the parameters for retrieving a specific Bot Rule Set.
func NewGetBotRuleSetParams ¶
func NewGetBotRuleSetParams() GetBotRuleSetParams
NewGetBotRuleSetParams creates a default instance of GetBotRuleSetParams.
type UpdateBotRuleSetParams ¶
type UpdateBotRuleSetParams struct {
AccountNumber string
BotRuleSetID string
BotRuleSet BotRuleSet
}
UpdateBotRuleSetParams represents the parameters for updating a Bot Rule Set.
func NewUpdateBotRuleSetParams ¶
func NewUpdateBotRuleSetParams() UpdateBotRuleSetParams
NewUpdateBotRuleSetParams creates a default instance of UpdateBotRuleSetParams.