Documentation ¶
Index ¶
- Variables
- type Validator
- func (*Validator) Descriptor() ([]byte, []int)deprecated
- func (x *Validator) GetEnabled() bool
- func (x *Validator) GetFailFast() bool
- func (x *Validator) GetVersion() int32
- func (*Validator) ProtoMessage()
- func (x *Validator) ProtoReflect() protoreflect.Message
- func (x *Validator) Reset()
- func (x *Validator) String() string
- func (m *Validator) Validate() error
- func (m *Validator) ValidateAll() error
- type ValidatorMultiError
- type ValidatorValidationError
Constants ¶
This section is empty.
Variables ¶
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) GetEnabled ¶
func (*Validator) GetFailFast ¶
func (*Validator) GetVersion ¶
func (*Validator) ProtoMessage ¶
func (*Validator) ProtoMessage()
func (*Validator) ProtoReflect ¶
func (x *Validator) ProtoReflect() protoreflect.Message
func (*Validator) Validate ¶
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 ¶
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 ¶
func (e ValidatorValidationError) Key() bool
Key function returns key value.
func (ValidatorValidationError) Reason ¶
func (e ValidatorValidationError) Reason() string
Reason function returns reason value.