Documentation
¶
Index ¶
- Variables
- func Equal(err1 error, err2 error) bool
- type Error
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (e *Error) Error() string
- func (x *Error) GetCode() int32
- func (x *Error) GetDebugId() string
- func (x *Error) GetDetails() []*anypb.Any
- func (x *Error) GetMessage() string
- func (x *Error) GetName() string
- func (x *Error) GetStatus() string
- 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
- func (e *Error) WithMessageValues(values any) *Error
- type ErrorMultiError
- type ErrorValidationError
Constants ¶
This section is empty.
Variables ¶
var File_errors_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Error ¶
type Error struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // http status code Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // http status text Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // error name Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` // error message Details []*anypb.Any `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"` // error details DebugId string `protobuf:"bytes,6,opt,name=debug_id,json=debugId,proto3" json:"debug_id,omitempty"` // request debug id // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) GetDebugId ¶ added in v0.7.12
func (*Error) GetDetails ¶ added in v0.7.12
func (*Error) GetMessage ¶ added in v0.7.12
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
func (*Error) Validate ¶ added in v0.7.12
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 ¶ added in v0.7.12
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.
func (*Error) WithMessageValues ¶ added in v0.7.12
type ErrorMultiError ¶ added in v0.7.12
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 ¶ added in v0.7.12
func (m ErrorMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ErrorMultiError) Error ¶ added in v0.7.12
func (m ErrorMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ErrorValidationError ¶ added in v0.7.12
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 ¶ added in v0.7.12
func (e ErrorValidationError) Cause() error
Cause function returns cause value.
func (ErrorValidationError) Error ¶ added in v0.7.12
func (e ErrorValidationError) Error() string
Error satisfies the builtin error interface
func (ErrorValidationError) ErrorName ¶ added in v0.7.12
func (e ErrorValidationError) ErrorName() string
ErrorName returns error name.
func (ErrorValidationError) Field ¶ added in v0.7.12
func (e ErrorValidationError) Field() string
Field function returns field value.
func (ErrorValidationError) Key ¶ added in v0.7.12
func (e ErrorValidationError) Key() bool
Key function returns key value.
func (ErrorValidationError) Reason ¶ added in v0.7.12
func (e ErrorValidationError) Reason() string
Reason function returns reason value.