Documentation ¶
Index ¶
- 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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy struct {
apipolicy.BasePolicy
}
func (Policy) CreateDefaultConfig ¶
func (Policy) ParseConfig ¶
func (policy Policy) ParseConfig(dto apipolicy.PolicyDto, ctx map[string]interface{}, forValidate bool) (apipolicy.PolicyConfig, error)
forValidate 用于识别解析的目的,如果解析是用来做 nginx 配置冲突相关的校验,则关于数据表、调用 kong 接口的操作都不会执行
type PolicyDto ¶
type PolicyDto struct { apipolicy.BaseDto AccessControlAPI string `json:"accessControlAPI"` Methods []string `json:"methods"` Patterns []string `json:"patterns"` WithHeaders []string `json:"withHeaders"` WithCookie bool `json:"withCookie"` WithBody bool `json:"withBody"` }
func (PolicyDto) IsValidDto ¶
func (PolicyDto) ToPluginReqDto ¶
func (pc PolicyDto) ToPluginReqDto(gatewayProvider, zoneName string) *providerDto.PluginReqDto
Click to show internal directories.
Click to hide internal directories.