noop

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package noop provides a no-op validator implementation for monolith scenarios. This validator always passes validation and does nothing. Use in monolith applications where validation is handled elsewhere.

空验证器实现包,用于单体应用场景。 此验证器始终通过验证,不执行任何操作。 用于单体应用,验证逻辑在其他地方处理。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{}

Provider registers a no-op validator contract.

Provider 注册空验证器契约。

func NewProvider

func NewProvider() *Provider

NewProvider creates a new no-op validator provider instance.

NewProvider 创建新的空验证器 Provider 实例。

func (*Provider) Boot

Boot is a no-op for this provider.

Boot 此 Provider 无启动逻辑。

func (*Provider) DependsOn

func (p *Provider) DependsOn() []string

DependsOn returns the keys this provider depends on. Noop validator has no dependencies.

DependsOn 返回该 provider 依赖的 key。 Noop validator 无依赖。

func (*Provider) IsDefer

func (p *Provider) IsDefer() bool

IsDefer returns true, validator can be deferred until first use.

IsDefer 返回 true,验证器可延迟初始化直到首次使用。

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name "validate.noop".

Name 返回 Provider 名称 "validate.noop"。

func (*Provider) Provides

func (p *Provider) Provides() []string

Provides returns the validator contract key.

Provides 返回验证器契约键。

func (*Provider) Register

func (p *Provider) Register(c runtimecontract.Container) error

Register binds the no-op validator to the container.

Register 将空验证器绑定到容器。

Jump to

Keyboard shortcuts

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