Documentation ¶
Index ¶
- Constants
- type IpAclType
- type IpRate
- type IpRateUnit
- type IpSourceType
- type Policy
- func (policy Policy) CreateDefaultConfig(gatewayProvider string, ctx map[string]interface{}) apipolicy.PolicyDto
- func (policy Policy) ParseConfig(dto apipolicy.PolicyDto, ctx map[string]interface{}, forValidate bool) (apipolicy.PolicyConfig, error)
- func (policy Policy) UnmarshalConfig(config []byte, gatewayProvider string) (apipolicy.PolicyDto, error, string)
- type PolicyDto
Constants ¶
View Source
const (
LIMIT_INNER_STATUS = 581
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IpRate ¶
type IpRate struct { Rate int64 `json:"rate"` Unit IpRateUnit `json:"unit"` }
type IpRateUnit ¶
type IpRateUnit string
const ( SECOND IpRateUnit = "qps" MINUTE IpRateUnit = "qpm" )
type IpSourceType ¶
type IpSourceType string
const ( REMOTE_IP IpSourceType = "remoteIp" X_REAL_IP IpSourceType = "xRealIp" X_FORWARDED_FOR IpSourceType = "xForwardFor" )
type Policy ¶
type Policy struct {
apipolicy.BasePolicy
}
func (Policy) CreateDefaultConfig ¶
func (Policy) ParseConfig ¶
Click to show internal directories.
Click to hide internal directories.