custom

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCustomRuleSetParams

type AddCustomRuleSetParams struct {
	CustomRuleSet CustomRuleSet
	AccountNumber string
}

AddCustomRuleSetParams represents the parameters for creating a new Custom Rule Set.

func NewAddCustomRuleSetParams

func NewAddCustomRuleSetParams() AddCustomRuleSetParams

NewAddCustomRuleSetParams creates a default instance of AddCustomRuleSetParams.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the Custom Rule Sets client.

func (Client) AddCustomRuleSet

func (c Client) AddCustomRuleSet(
	params AddCustomRuleSetParams,
) (string, error)

AddCustomRuleSet creates a Custom Rule Set for the provided account number and returns the new rule's system-generated ID

func (Client) DeleteCustomRuleSet

func (c Client) DeleteCustomRuleSet(
	params DeleteCustomRuleSetParams,
) error

DeleteCustomRuleSet deletes a Custom Rule Set for the provided account number with the provided Custom Rule Set ID.

func (Client) GetAllCustomRuleSets

func (c Client) GetAllCustomRuleSets(
	params GetAllCustomRuleSetsParams,
) (*[]CustomRuleSetGetAllOK, error)

GetAllCustomRuleSets retrieves the list of Custom Rule Sets for the provided account number.

func (Client) GetCustomRuleSet

func (c Client) GetCustomRuleSet(
	params GetCustomRuleSetParams,
) (*CustomRuleSetGetOK, error)

GetCustomRuleSet retrieves a Custom Rule Set for the provided account number with the provided Custom Rule Set ID.

func (Client) UpdateCustomRuleSet

func (c Client) UpdateCustomRuleSet(
	params UpdateCustomRuleSetParams,
) error

UpdateCustomRuleSet updates a Custom Rule Set for the provided account number using the provided Custom Rule Set ID and Custom Rule Set properties.

type ClientService

type ClientService interface {
	AddCustomRuleSet(
		params AddCustomRuleSetParams,
	) (string, error)

	GetAllCustomRuleSets(
		params GetAllCustomRuleSetsParams,
	) (*[]CustomRuleSetGetAllOK, error)

	DeleteCustomRuleSet(
		params DeleteCustomRuleSetParams,
	) error

	GetCustomRuleSet(
		params GetCustomRuleSetParams,
	) (*CustomRuleSetGetOK, error)

	UpdateCustomRuleSet(
		params UpdateCustomRuleSetParams,
	) error
}

ClientService is the interface for Client methods.

func New

func New(c ecclient.APIClient, baseAPIURL string) ClientService

New creates a new instance of the Custom Rule Sets Client Service

type CustomRuleDirective

type CustomRuleDirective struct {
	SecRule rules.SecRule `json:"sec_rule"`
}

CustomRuleDirective contains rules used by Custom Rule Sets. Each directive object defines a rule via the sec_rule object.

type CustomRuleSet

type CustomRuleSet struct {
	// Contains custom rules. Each directive object defines a custom rule via
	// the sec_rule object. You may create up to 10 custom rules.
	Directives []CustomRuleDirective `json:"directive"`

	// Indicates the name of the custom rule.
	Name string `json:"name,omitempty"`
}

CustomRuleSet is a detailed representation of a Custom Rule Set.

type CustomRuleSetAddOK

type CustomRuleSetAddOK struct {
	rules.AddRuleResponse
}

CustomRuleSetAddOK represents the successful creation of a Custom Rule Set.

type CustomRuleSetGetAllOK

type CustomRuleSetGetAllOK struct {

	// Indicates the system-defined ID for the Custom Rule Set.
	ID string `json:"id"`

	// Indicates the date and time at which the custom rule was last modified.
	// 	Syntax: MM/DD/YYYYhh:mm:ss [AM|PM]
	LastModifiedDate string `json:"last_modified_date"`

	// Indicates the name of the Custom Rule Set.
	Name string `json:"name"`
}

CustomRuleSetGetAllOK is a lightweight representation of a Custom Rule Set.

type CustomRuleSetGetOK

type CustomRuleSetGetOK struct {

	// Indicates the generated ID for the Custom Rule Set
	ID string

	CustomRuleSet

	// Indicates the date and time at which the custom rule was last modified.
	// 	Syntax: MM/DD/YYYYhh:mm:ss [AM|PM]
	LastModifiedDate string `json:"last_modified_date"`
}

CustomRuleSetGetOK represents the successful retrieval of a Custom Rule Set.

type DeleteCustomRuleSetParams

type DeleteCustomRuleSetParams struct {
	AccountNumber   string
	CustomRuleSetID string
}

DeleteCustomRuleSetParams represents the parameters for deleting a Custom Rule Set.

func NewDeleteCustomRuleSetParams

func NewDeleteCustomRuleSetParams() DeleteCustomRuleSetParams

NewDeleteCustomRuleSetParams creates a defaut instance of DeleteCustomRuleSetParams.

type GetAllCustomRuleSetsParams

type GetAllCustomRuleSetsParams struct {
	AccountNumber string
}

GetAllCustomRuleSetsParams represents the parameters for retrieving all Custom Rule Sets for an account.

type GetCustomRuleSetParams

type GetCustomRuleSetParams struct {
	AccountNumber   string
	CustomRuleSetID string
}

GetCustomRuleSetParams represents the parameters for retrieving a specific Custom Rule Set.

func NewGetCustomRuleSetParams

func NewGetCustomRuleSetParams() GetCustomRuleSetParams

NewGetCustomRuleSetParams creates a default instance of GetCustomRuleSetParams.

type UpdateCustomRuleSetParams

type UpdateCustomRuleSetParams struct {
	AccountNumber   string
	CustomRuleSetID string
	CustomRuleSet   CustomRuleSet
}

UpdateCustomRuleSetParams represents the parameters for updating a Custom Rule Set.

func NewUpdateCustomRuleSetParams

func NewUpdateCustomRuleSetParams() UpdateCustomRuleSetParams

NewUpdateCustomRuleSetParams creates a default instance of UpdateCustomRuleSetParams.

Jump to

Keyboard shortcuts

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