validatorv1

package
v0.1.39 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_middleware_validator_v1_validator_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Validator

type Validator struct {
	Enabled  bool  `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	Version  int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	FailFast bool  `protobuf:"varint,3,opt,name=fail_fast,proto3" json:"fail_fast,omitempty"`
	// contains filtered or unexported fields
}

func (*Validator) Descriptor deprecated

func (*Validator) Descriptor() ([]byte, []int)

Deprecated: Use Validator.ProtoReflect.Descriptor instead.

func (*Validator) GetEnabled

func (x *Validator) GetEnabled() bool

func (*Validator) GetFailFast

func (x *Validator) GetFailFast() bool

func (*Validator) GetVersion

func (x *Validator) GetVersion() int32

func (*Validator) ProtoMessage

func (*Validator) ProtoMessage()

func (*Validator) ProtoReflect

func (x *Validator) ProtoReflect() protoreflect.Message

func (*Validator) Reset

func (x *Validator) Reset()

func (*Validator) String

func (x *Validator) String() string

func (*Validator) Validate

func (m *Validator) Validate() error

Validate checks the field values on Validator with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Validator) ValidateAll

func (m *Validator) ValidateAll() error

ValidateAll checks the field values on Validator with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ValidatorMultiError, or nil if none found.

type ValidatorMultiError

type ValidatorMultiError []error

ValidatorMultiError is an error wrapping multiple validation errors returned by Validator.ValidateAll() if the designated constraints aren't met.

func (ValidatorMultiError) AllErrors

func (m ValidatorMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ValidatorMultiError) Error

func (m ValidatorMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ValidatorValidationError

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

ValidatorValidationError is the validation error returned by Validator.Validate if the designated constraints aren't met.

func (ValidatorValidationError) Cause

func (e ValidatorValidationError) Cause() error

Cause function returns cause value.

func (ValidatorValidationError) Error

func (e ValidatorValidationError) Error() string

Error satisfies the builtin error interface

func (ValidatorValidationError) ErrorName

func (e ValidatorValidationError) ErrorName() string

ErrorName returns error name.

func (ValidatorValidationError) Field

func (e ValidatorValidationError) Field() string

Field function returns field value.

func (ValidatorValidationError) Key

Key function returns key value.

func (ValidatorValidationError) Reason

func (e ValidatorValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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