sbac

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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 Policy) CreateDefaultConfig(gatewayProvider string, ctx map[string]interface{}) apipolicy.PolicyDto

func (Policy) ParseConfig

func (policy Policy) ParseConfig(dto apipolicy.PolicyDto, ctx map[string]interface{}, forValidate bool) (apipolicy.PolicyConfig, error)

forValidate 用于识别解析的目的,如果解析是用来做 nginx 配置冲突相关的校验,则关于数据表、调用 kong 接口的操作都不会执行

func (Policy) UnmarshalConfig

func (policy Policy) UnmarshalConfig(config []byte, gatewayProvider string) (apipolicy.PolicyDto, error, string)

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 (pc PolicyDto) IsValidDto(gatewayProvider string) error

func (PolicyDto) ToPluginReqDto

func (pc PolicyDto) ToPluginReqDto(gatewayProvider, zoneName string) *providerDto.PluginReqDto

Jump to

Keyboard shortcuts

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