validate

package
v0.0.0-...-2eb4db6 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package validate provides a central way to validate individual fields and different implementations of config

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Validator

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

Validator is a custom validator

func NewValidator

func NewValidator(v *validator.Validate) (*Validator, error)

NewValidator constructs a custom validator with all custom validators registered.

func (*Validator) RegisterCustom

func (cv *Validator) RegisterCustom() error

RegisterCustom registers all custom validators for use.

func (*Validator) Validate

func (cv *Validator) Validate(i interface{}) error

Validate is the main validation step for structs

Jump to

Keyboard shortcuts

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