validator

package
v0.3.0-20260922190248-... Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// QueueName identifies the queue this request belongs to.
	QueueName string
}

Config carries the routing identity handed to a Factory.

type Factory

type Factory interface {
	// For returns the Validator for the given config. Returning nil indicates
	// no custom validation is needed for this config.
	For(cfg Config) (Validator, error)
}

Factory builds the Validator for a given config. Implementations are provided by integrators and inject whatever they need at construction.

type Validator

type Validator interface {
	// Validate runs custom validation on the request.
	// Returns nil if validation passes, error if the request should be rejected.
	Validate(ctx context.Context, request entity.Request) error
}

Validator runs custom validation checks against a request. Implementations are provided by integrators for company-specific checks (e.g. org-policy enforcement, repo-specific rules). The built-in validate controller invokes this after fetching change metadata and before claiming URIs in the change store.

Directories

Path Synopsis
Package fake provides a validator.Validator that always passes.
Package fake provides a validator.Validator that always passes.
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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