serror

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equals

func Equals(ea error, eb error) bool

Types

type SError

type SError interface {
	error
	fmt.Stringer

	GetMessage() string
	WithMessageKey(key string) SError

	GetMessageKey() string
	WithMessage(msg string) SError

	GetStatusCode() StatusCode
	WithStatusCode(statusCode StatusCode) SError

	GetTrace() string
	WithTrace(trace string) SError

	GetPayload() []byte
	WithPayload(payload []byte) SError

	GetParams() []interface{}
	WithParams(params []interface{}) SError

	GetDevTrace() string
	StringDetail() string
	StringDetailSimple() string

	ReloadDevTrace(skip int) SError
	Clone() SError
}

func Is

func Is(e error) (SError, bool)

func New

func New() SError

type StatusCode

type StatusCode int
const (
	ScOk StatusCode = 0
)

func NewStatusCode

func NewStatusCode(status int) StatusCode

func (StatusCode) Failed

func (s StatusCode) Failed() bool

func (StatusCode) Success

func (s StatusCode) Success() bool

func (StatusCode) ToInt32

func (s StatusCode) ToInt32() int32

Jump to

Keyboard shortcuts

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