divanDefaults

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRequireSlice

func BuildRequireSlice(value interface{}, parent string) ([]string, error)

func CheckSlice

func CheckSlice(allow []string, field reflect.Value, fn func(value interface{}) error) error

Perform deep recursive check of slices.

func Integrity

func Integrity(value interface{}) error

Deep check a structure with custom tags.

func IsAllowed

func IsAllowed(allow []string, value string) bool

The restrict tag allows a field to only accept a limited set of values. It uses the string representation of a value to compare it against a list of string represented values.

func PartialIntegrity

func PartialIntegrity(value interface{}) error

Run Integrity() test but ignores default and required tags.

func UpdateIntegrity

func UpdateIntegrity(ref divan.Model, specs *divanSpecs.Update) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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