Documentation ¶
Index ¶
- func ContextWithLocale(ctx context.Context, lang language.Tag) context.Context
- type Error
- func (e Error) Arguments() map[string]any
- func (e Error) Causes() []*Error
- func (e *Error) Error() string
- func (e Error) GRPCCode() codes.Code
- func (e Error) HTTPCode() int
- func (e Error) ID() string
- func (e Error) InternalErr() error
- func (e Error) Message() string
- func (e *Error) WithCauses(causes ...*Error) *Error
- func (e *Error) WithInternalError(err error) *Error
- type LocaleCtxKeyType
- type Localizer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error represents a standardized error.
func NewError ¶
func NewError( ctx context.Context, localizer Localizer, id string, httpCode int, grpcCode codes.Code, arguments map[string]any, ) *Error
NewError creates a new Error.
func RestoreError ¶
func (Error) InternalErr ¶
func (*Error) WithCauses ¶
func (*Error) WithInternalError ¶
type LocaleCtxKeyType ¶
type LocaleCtxKeyType struct{}
Click to show internal directories.
Click to hide internal directories.