blockallowlist

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 12 Imported by: 0

Documentation

Overview

Package blockallowlist 提供基于黑白名单规则的服务鉴权插件实现

Index

Constants

View Source
const PluginName = "blockAllowList"

PluginName 插件名称

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockAllowListAuthenticator

type BlockAllowListAuthenticator struct {
	*plugin.PluginBase
	// contains filtered or unexported fields
}

BlockAllowListAuthenticator 黑白名单服务鉴权插件

func (*BlockAllowListAuthenticator) Authenticate

Authenticate 黑白名单鉴权入口。规则获取失败或无规则时按通过处理。

func (*BlockAllowListAuthenticator) Destroy

func (p *BlockAllowListAuthenticator) Destroy() error

Destroy 销毁插件

func (*BlockAllowListAuthenticator) Init

Init 初始化插件

func (*BlockAllowListAuthenticator) Name

Name 插件名

func (*BlockAllowListAuthenticator) SetEngine

func (p *BlockAllowListAuthenticator) SetEngine(engine sdk.Engine)

SetEngine 由 Proxy 在 SetRealPlugin 时注入 Engine 引用, 用于按需调用 SyncGetServiceRule 拉取规则。实现 authenticator.EngineSetter 接口。

func (*BlockAllowListAuthenticator) Type

Type 插件类型

type Config

type Config struct {
}

Config 黑白名单鉴权插件的配置(当前无可调参数,预留扩展位).

func (*Config) SetDefault

func (c *Config) SetDefault()

SetDefault 设置默认参数

func (*Config) Verify

func (c *Config) Verify() error

Verify 校验配置参数

Jump to

Keyboard shortcuts

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