Documentation ¶
Index ¶
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 ¶
type PolicyDto ¶
type PolicyDto struct { apipolicy.BaseDto IpSource IpSourceType `json:"ipSource"` IpAclType IpAclType `json:"ipAclType"` IpAclList []string `json:"ipAclList,omitempty"` IpMaxConnections int64 `json:"ipMaxConnections,omitempty"` IpRate *IpRate `json:"ipRate,omitempty"` }
func (PolicyDto) IsValidDto ¶
Click to show internal directories.
Click to hide internal directories.