validation

package
v0.0.0-...-4877f23 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateFieldIsRequired

func ValidateFieldIsRequired[T AllowedFieldTypes](structName string, field string, value T) error

func ValidateFieldMustBeUndefined

func ValidateFieldMustBeUndefined[T AllowedFieldTypes](structName string, field string, value T) error

func ValidateStructIsRequired

func ValidateStructIsRequired(structName string, field string, value any) error

func ValidateStructMustBeUndefined

func ValidateStructMustBeUndefined(structName string, field string, value any) error

Types

type AllowedFieldTypes

type AllowedFieldTypes interface {
	*int64 | *float64 | *string | *bool
}

type ErrFieldIsRequired

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

func NewErrFieldIsRequired

func NewErrFieldIsRequired(structName string, field string) *ErrFieldIsRequired

func (*ErrFieldIsRequired) Error

func (e *ErrFieldIsRequired) Error() string

type ErrFieldMustBeUndefined

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

func NewErrFieldMustBeUndefined

func NewErrFieldMustBeUndefined(structName string, field string) *ErrFieldMustBeUndefined

func (*ErrFieldMustBeUndefined) Error

func (e *ErrFieldMustBeUndefined) Error() string

Jump to

Keyboard shortcuts

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