validator

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStruct     = errors.New("the struct provided couldn't be checked")
	ErrBadRequest = errors.New("bad request")
)

Functions

func FormatUser added in v0.8.0

func FormatUser(user *models.User)

FormatUser apply some formation rules to a models.User and encrypt the password.

func HashPassword added in v0.8.0

func HashPassword(password string) string

func ValidateStruct added in v0.7.3

func ValidateStruct(data interface{}) ([]string, error)

func ValidateVar added in v0.7.3

func ValidateVar(data interface{}, tag string) ([]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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