Documentation
¶
Overview ¶
Package noop provides a no-op service authenticator for monolith scenarios. This authenticator returns a local identity for all authentication requests. Note: Service-to-service authentication is not available in monolith mode.
服务认证实现包,用于单体应用场景。 此认证器对所有认证请求返回本地身份。 注意:服务间认证在单体模式下不可用。
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoopAuth = errors.New("serviceauth: noop mode, authentication not available in monolith")
ErrNoopAuth indicates service authentication is not available in monolith mode.
ErrNoopAuth 表示服务认证在单体模式下不可用。
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct{}
Provider registers no-op service authenticator contracts.
Provider 注册空服务认证契约。
func NewProvider ¶
func NewProvider() *Provider
NewProvider creates a new no-op service auth provider instance.
NewProvider 创建新的空服务认证 Provider 实例。
func (*Provider) Boot ¶
func (p *Provider) Boot(runtimecontract.Container) error
Boot is a no-op for this provider.
Boot 此 Provider 无启动逻辑。
func (*Provider) DependsOn ¶
DependsOn returns the keys this provider depends on. Noop service auth has no dependencies.
DependsOn 返回该 provider 依赖的 key。 Noop service auth 无依赖。
func (*Provider) IsDefer ¶
IsDefer returns true, service auth can be deferred until first use.
IsDefer 返回 true,服务认证可延迟初始化直到首次使用。
func (*Provider) Name ¶
Name returns the provider name "serviceauth.noop".
Name 返回 Provider 名称 "serviceauth.noop"。