validate

package
v0.0.0-...-a4d1c61 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultStructValidator

func DefaultStructValidator(target interface{}) error

DefaultStructValidator validates that the passed structure is valid.

func Validate

func Validate(target interface{}) error

Validate validates an object if it implements the Validator interface. Objects that do not implement the Validator interface are not validated.

Types

type Validator

type Validator interface {
	// Validate validates that the object is valid.
	Validate() error
}

Validator allows defining validation behavior for an object.

Jump to

Keyboard shortcuts

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