validate

package
v1.24.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitValidator

func InitValidator(db *gorm.DB)

Types

type Validator

type Validator struct {
	Validator  *validator.Validate
	Translator ut.Translator
	// contains filtered or unexported fields
}

func Get

func Get() *Validator

Deprecated 尽量将依赖内置进入需要依赖的结构体内,避免在业务函数中直接引用外部依赖

func NewValidator

func NewValidator(db *gorm.DB) (*Validator, error)

func (*Validator) EnvironmentUserRelStructLevelValidation

func (v *Validator) EnvironmentUserRelStructLevelValidation(sl validator.StructLevel)

func (*Validator) ProjectStructLevelValidation

func (v *Validator) ProjectStructLevelValidation(sl validator.StructLevel)

func (*Validator) TenantStructLevelValidation

func (v *Validator) TenantStructLevelValidation(sl validator.StructLevel)

func (*Validator) TenantUserRelStructLevelValidation

func (v *Validator) TenantUserRelStructLevelValidation(sl validator.StructLevel)

func (*Validator) UserCreateStructLevelValidation

func (v *Validator) UserCreateStructLevelValidation(sl validator.StructLevel)

func (*Validator) UserStructLevelValidation

func (v *Validator) UserStructLevelValidation(sl validator.StructLevel)

Jump to

Keyboard shortcuts

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