bettererror

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2023 License: MIT Imports: 3 Imported by: 0

README

bettererrors

Documentation

Index

Constants

View Source
const Handler string = "handler"
View Source
const Logic string = "business logic"
View Source
const Storage string = "storage"

Variables

This section is empty.

Functions

This section is empty.

Types

type BetterError

type BetterError struct {
	Measure *time.Time `json:"measure"`
	Layer   string     `json:"layer,omitempty"`
	Err     string     `json:"err"`
}

func (*BetterError) JSON

func (e *BetterError) JSON() []byte

func (*BetterError) JSONIdent added in v0.0.2

func (e *BetterError) JSONIdent(prefix, ident string) []byte

func (*BetterError) JSONPretty added in v0.0.2

func (e *BetterError) JSONPretty() []byte

func (*BetterError) SetAppLayer

func (e *BetterError) SetAppLayer(layer string) IBetterError

func (*BetterError) SetTime

func (e *BetterError) SetTime() IBetterError

func (*BetterError) Time

func (e *BetterError) Time() time.Time

type IBetterError

type IBetterError interface {
	JSON() []byte
	JSONIdent(prefix, ident string) []byte
	JSONPretty() []byte

	SetTime() IBetterError
	SetAppLayer(layer string) IBetterError
}

func New

func New(err error) IBetterError

New allows to modify error that would implement IBetterError

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL