Documentation ¶
Index ¶
- func Append(errs ...error) error
- func Cause(err error) error
- func Code(err error) string
- func ErrorFromContext(ctx context.Context) error
- func ErrorInternal(err error) error
- func New(detail string) error
- func NewContextWithError(ctx context.Context, err error) context.Context
- func Newf(format string, a ...interface{}) error
- func Normalize(err error) error
- func Prepared(code string, title string, detail string) error
- func Preparedf(code string, title string, format string, a ...interface{}) error
- func Sanitize(err error) error
- func WithMeta(err error, meta interface{}) error
- func WithSource(err error, src Source) error
- func Wrap(err error, detail string) error
- func Wrapf(err error, format string, a ...interface{}) error
- type Caller
- type Sanitizable
- type Serializable
- func (s Serializable) GetBSON() (interface{}, error)
- func (s Serializable) MarshalJSON() ([]byte, error)
- func (s *Serializable) Normalize(normalizer structure.Normalizer)
- func (s *Serializable) Parse(reference string, parser structure.ObjectParser)
- func (s *Serializable) SetBSON(raw bson.Raw) error
- func (s *Serializable) UnmarshalJSON(bytes []byte) error
- func (s *Serializable) Validate(validator structure.Validator)
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorFromContext ¶ added in v1.20.0
func ErrorInternal ¶ added in v1.20.0
func NewContextWithError ¶ added in v1.20.0
func WithSource ¶ added in v1.20.0
Types ¶
type Caller ¶ added in v1.20.0
type Caller struct { Package string `json:"package,omitempty" bson:"package,omitempty"` Function string `json:"function,omitempty" bson:"function,omitempty"` File string `json:"file,omitempty" bson:"file,omitempty"` Line int `json:"line,omitempty" bson:"line,omitempty"` }
func (*Caller) Normalize ¶ added in v1.20.0
func (c *Caller) Normalize(normalizer structure.Normalizer)
func (*Caller) PackageName ¶ added in v1.20.0
func (*Caller) Parse ¶ added in v1.20.0
func (c *Caller) Parse(parser structure.ObjectParser)
type Sanitizable ¶ added in v1.20.0
type Sanitizable interface {
Sanitize() error
}
type Serializable ¶ added in v1.20.0
type Serializable struct {
Error error
}
func (Serializable) GetBSON ¶ added in v1.20.0
func (s Serializable) GetBSON() (interface{}, error)
func (Serializable) MarshalJSON ¶ added in v1.20.0
func (s Serializable) MarshalJSON() ([]byte, error)
func (*Serializable) Normalize ¶ added in v1.20.0
func (s *Serializable) Normalize(normalizer structure.Normalizer)
func (*Serializable) Parse ¶ added in v1.20.0
func (s *Serializable) Parse(reference string, parser structure.ObjectParser)
func (*Serializable) UnmarshalJSON ¶ added in v1.20.0
func (s *Serializable) UnmarshalJSON(bytes []byte) error
func (*Serializable) Validate ¶ added in v1.20.0
func (s *Serializable) Validate(validator structure.Validator)
Click to show internal directories.
Click to hide internal directories.