validator

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry contains a registry of application configuration validators. The validators are registered on startup and are invoked before a new config value is persisted.

func NewRegistry

func NewRegistry() *Registry

NewRegistry returns a new configuration validator registry

func (*Registry) Register

func (r *Registry) Register(v config.Validator)

Register registers a configuration validator

func (*Registry) Validate

func (r *Registry) Validate(kv *config.KeyValue) error

Validate invokes the registered validators to validate the key and value. An error is returned in the case of invalid config

Jump to

Keyboard shortcuts

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