zen/zcore/zerr/zerr.go
2024-08-22 09:18:44 +07:00

34 lines
549 B
Go

package zerr
import (
"context"
"time"
"gitlab.bareksa.com/backend/zen/zcore/zoptions"
)
type Error interface {
error
Code(code int) Error
GetCode() int
Message(msg string, args ...any) Error
GetMessage() string
PublicMessage(msg string, args ...any) Error
GetPublicMessage() string
Caller(pc uintptr) Error
GetCaller() uintptr
Time(t time.Time) Error
GetTime() time.Time
Key(msg string, args ...any) Error
GetKey() string
Log(ctx context.Context) Error
Notify(ctx context.Context, opts ...zoptions.NotifyOption) Error
}