Documentation ¶
Index ¶
- func Code(err error) codes.Code
- func IsHandledCode(code codes.Code) bool
- type Error
- func (e Error) Code() codes.Code
- func (e Error) Details() []string
- func (e Error) Error() string
- func (e Error) GRPCStatus() *status.Status
- func (e Error) IsHandled() bool
- func (e Error) Localize() string
- func (e Error) MarshalJSON() ([]byte, error)
- func (e Error) MarshalXML(encoder *xml.Encoder, start xml.StartElement) error
- func (e Error) MarshalYAML() (any, error)
- func (e Error) Message() string
- func (e Error) Model() *Model
- func (e Error) SetLocalize(localize string) *Error
- func (e Error) Slug() string
- func (e Error) StatusCode() int
- func (e Error) Validations() []*Validation
- func (e Error) WithDetailF(format string, args ...any) *Error
- func (e Error) WithDetails(details ...string) *Error
- func (e Error) WithValidation(tag string, field string) *Error
- func (e Error) WithValidations(validations []*Validation) *Error
- type Model
- type Validation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsHandledCode ¶
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func (Error) GRPCStatus ¶
func (Error) MarshalJSON ¶
func (Error) MarshalXML ¶
func (Error) MarshalYAML ¶
func (Error) SetLocalize ¶
func (Error) StatusCode ¶
func (Error) Validations ¶ added in v1.3.0
func (e Error) Validations() []*Validation
func (Error) WithDetails ¶
func (Error) WithValidation ¶ added in v1.3.0
func (Error) WithValidations ¶ added in v1.3.0
func (e Error) WithValidations(validations []*Validation) *Error
type Model ¶
type Model struct { Code uint32 `json:"code,omitempty" xml:"code,omitempty" yaml:"code,omitempty"` Message string `json:"message,omitempty" xml:"message,omitempty" yaml:"message,omitempty"` Details []string `json:"details,omitempty" xml:"details,omitempty" yaml:"details,omitempty"` Validations []*Validation `json:"validations,omitempty" xml:"validations,omitempty" yaml:"validations,omitempty"` }
type Validation ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.