ccattackprotection_rules

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Category string `json:"category" required:"true"`
	Detail   Detail `json:"detail,omitempty"`
}

type CcAttack

type CcAttack struct {
	Id           string       `json:"id"`
	PolicyID     string       `json:"policy_id"`
	Path         string       `json:"path"`
	LimitNum     int          `json:"limit_num"`
	LimitPeriod  int          `json:"limit_period"`
	LockTime     int          `json:"lock_time"`
	TagType      string       `json:"tag_type"`
	TagIndex     string       `json:"tag_index"`
	TagCondition TagCondition `json:"tag_condition"`
	Action       Action       `json:"action"`
	Default      bool         `json:"default"`
}

type CreateOpts

type CreateOpts struct {
	Path         string       `json:"path" required:"true"`
	LimitNum     *int         `json:"limit_num" required:"true"`
	LimitPeriod  *int         `json:"limit_period" required:"true"`
	LockTime     *int         `json:"lock_time,omitempty"`
	TagType      string       `json:"tag_type" required:"true"`
	TagIndex     string       `json:"tag_index,omitempty"`
	TagCondition TagCondition `json:"tag_condition,omitempty"`
	Action       Action       `json:"action" required:"true"`
}

CreateOpts contains all the values needed to create a new cc attack protection rule.

func (CreateOpts) ToCcAttackCreateMap

func (opts CreateOpts) ToCcAttackCreateMap() (map[string]interface{}, error)

ToCcAttackCreateMap builds a create request body from CreateOpts.

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToCcAttackCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder allows extensions to add additional parameters to the Create request.

type CreateResult

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

CreateResult represents the result of a create operation. Call its Extract method to interpret it as a cc attack protection rule.

func Create

func Create(c *golangsdk.ServiceClient, policyID string, opts CreateOptsBuilder) (r CreateResult)

Create will create a new cc attack protection rule based on the values in CreateOpts.

func (CreateResult) Extract

func (r CreateResult) Extract() (*CcAttack, error)

Extract is a function that accepts a result and extracts a cc attack protection rule.

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

DeleteResult represents the result of a delete operation. Call its ExtractErr method to determine if the request succeeded or failed.

func Delete

func Delete(c *golangsdk.ServiceClient, policyID, ruleID string) (r DeleteResult)

Delete will permanently delete a particular cc attack rule based on its unique ID.

type Detail

type Detail struct {
	Response Response `json:"response" required:"true"`
}

type GetResult

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

GetResult represents the result of a get operation. Call its Extract method to interpret it as a cc attack protection rule.

func Get

func Get(c *golangsdk.ServiceClient, policyID, ruleID string) (r GetResult)

Get retrieves a particular cc attack rule based on its unique ID.

func (GetResult) Extract

func (r GetResult) Extract() (*CcAttack, error)

Extract is a function that accepts a result and extracts a cc attack protection rule.

type Response

type Response struct {
	ContentType string `json:"content_type" required:"true"`
	Content     string `json:"content" required:"true"`
}

type TagCondition

type TagCondition struct {
	Category string   `json:"category" required:"true"`
	Contents []string `json:"contents" required:"true"`
}

Jump to

Keyboard shortcuts

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