Documentation ¶
Index ¶
- Variables
- type Error
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (x *Error) GetCode() int32
- func (x *Error) GetDetails() []string
- func (x *Error) GetMessage() string
- func (x *Error) GetNestedErrors() map[string]string
- func (x *Error) GetStack() []byte
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (x *Error) String() string
- func (m *Error) Validate() error
- func (m *Error) ValidateAll() error
- type ErrorMultiError
- type ErrorValidationError
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` NestedErrors map[string]string `` /* 185-byte string literal not displayed */ Details []string `protobuf:"bytes,4,rep,name=details,proto3" json:"details,omitempty"` Stack []byte `protobuf:"bytes,5,opt,name=stack,proto3" json:"stack,omitempty"` // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) GetDetails ¶
func (*Error) GetMessage ¶
func (*Error) GetNestedErrors ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
func (*Error) Validate ¶
Validate checks the field values on Error 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 (*Error) ValidateAll ¶
ValidateAll checks the field values on Error 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 ErrorMultiError, or nil if none found.
type ErrorMultiError ¶
type ErrorMultiError []error
ErrorMultiError is an error wrapping multiple validation errors returned by Error.ValidateAll() if the designated constraints aren't met.
func (ErrorMultiError) AllErrors ¶
func (m ErrorMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ErrorMultiError) Error ¶
func (m ErrorMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ErrorValidationError ¶
type ErrorValidationError struct {
// contains filtered or unexported fields
}
ErrorValidationError is the validation error returned by Error.Validate if the designated constraints aren't met.
func (ErrorValidationError) Cause ¶
func (e ErrorValidationError) Cause() error
Cause function returns cause value.
func (ErrorValidationError) Error ¶
func (e ErrorValidationError) Error() string
Error satisfies the builtin error interface
func (ErrorValidationError) ErrorName ¶
func (e ErrorValidationError) ErrorName() string
ErrorName returns error name.
func (ErrorValidationError) Field ¶
func (e ErrorValidationError) Field() string
Field function returns field value.
func (ErrorValidationError) Key ¶
func (e ErrorValidationError) Key() bool
Key function returns key value.
func (ErrorValidationError) Reason ¶
func (e ErrorValidationError) Reason() string
Reason function returns reason value.