errdef

package
v1.16.28 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EXCEPTION_KEEPER    = "zero.exception.keeper"
	EXCEPTION_AUTO_PROC = "zero.exception.auto.proc"
	EXCEPTION_OPERATION = "zero.exception.operation"

	ES00500 = "ES00500"
)

Variables

This section is empty.

Functions

func Exports

func Exports(autoProcessor processors.ZeroXsacAutoProcessor, operation processors.ZeroQueryOperation) []reflect.Type

func Is added in v1.16.4

func Is(err error) bool

func RunExceptionKeeper

func RunExceptionKeeper(dataSource string, errdefs ...*ZeroExceptionDef)

Types

type ZeroExceptionDef

type ZeroExceptionDef struct {
	autohttpconf.ZeroXsacXhttpStructs

	Code        string                 `json:"code,omitempty" xhttpopt:"OX" xsacprop:"NO,VARCHAR(64),NULL" xsackey:"unique" xapi:"异常编号,String"`
	Description string                 `json:"description,omitempty" xhttpopt:"OX" xsacprop:"NO,VARCHAR(1024),NULL" xapi:"异常描述,String"`
	Parameters  map[string]interface{} `json:"parameters,omitempty"`
}

func Parse added in v1.16.5

func Parse(errdef interface{}) *ZeroExceptionDef

func (*ZeroExceptionDef) Error

func (errdef *ZeroExceptionDef) Error() string

func (*ZeroExceptionDef) Export added in v1.16.7

func (errdef *ZeroExceptionDef) Export() *ZeroExceptionDef

func (*ZeroExceptionDef) LoadRowData

func (errdef *ZeroExceptionDef) LoadRowData(rowmap map[string]interface{})

func (*ZeroExceptionDef) String

func (errdef *ZeroExceptionDef) String() string

func (*ZeroExceptionDef) XhttpAutoProc

func (*ZeroExceptionDef) XhttpOpt

func (*ZeroExceptionDef) XhttpOpt() byte

func (*ZeroExceptionDef) XhttpPath

func (*ZeroExceptionDef) XhttpPath() string

func (*ZeroExceptionDef) XhttpQueryOperation

func (*ZeroExceptionDef) XhttpQueryOperation() processors.ZeroQueryOperation

func (*ZeroExceptionDef) XsacApiName

func (*ZeroExceptionDef) XsacApiName() string

func (*ZeroExceptionDef) XsacTableName

func (*ZeroExceptionDef) XsacTableName() string

type ZeroExceptionKeeper

type ZeroExceptionKeeper interface {
	DescriptionByCode(string) string
}

Jump to

Keyboard shortcuts

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