validation

package
v4.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCustomConfig

func ValidateCustomConfig(conf interface{}) error

ValidateCustomConfig for module-specific config ahead of time for a specific module configuration. This way, the Configure method of modules will be guaranteed to receive valid configuration. The module-specific configuration struct must implement the Validate method that returns a bool.

func ValidateStruct

func ValidateStruct(confStruct interface{}) error

ValidateStruct uses the `validate` struct tags to do standard validation

Types

type Validatable

type Validatable interface {
	Validate() error
}

Validatable should be implemented by config structs that want to provide validation when the config is loaded.

Jump to

Keyboard shortcuts

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