errcodex

package
v1.3.63 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultErrCode

type DefaultErrCode struct {
	Code   string
	Status int
	Errno  int
}

func (*DefaultErrCode) GetCode

func (de *DefaultErrCode) GetCode() string

func (*DefaultErrCode) GetErrno

func (de *DefaultErrCode) GetErrno() int

func (*DefaultErrCode) GetHttpStatus

func (de *DefaultErrCode) GetHttpStatus() int

func (*DefaultErrCode) Unwrap

func (de *DefaultErrCode) Unwrap() error

type DefaultErrCodeDic

type DefaultErrCodeDic struct {
}

func (*DefaultErrCodeDic) GetBadRequest

func (de *DefaultErrCodeDic) GetBadRequest() ErrorCodeIf

func (*DefaultErrCodeDic) GetInternalError

func (de *DefaultErrCodeDic) GetInternalError() ErrorCodeIf

func (*DefaultErrCodeDic) GetSuccess

func (de *DefaultErrCodeDic) GetSuccess() ErrorCodeIf

func (*DefaultErrCodeDic) NewRequestId

func (de *DefaultErrCodeDic) NewRequestId() string

func (*DefaultErrCodeDic) ToCode

func (de *DefaultErrCodeDic) ToCode(errno int) string

func (*DefaultErrCodeDic) ToHttpStatus

func (de *DefaultErrCodeDic) ToHttpStatus(errno int) int

type ErrorCodeDictionaryIf

type ErrorCodeDictionaryIf interface {
	GetSuccess() ErrorCodeIf
	GetBadRequest() ErrorCodeIf
	GetInternalError() ErrorCodeIf

	ToCode(int) string
	ToHttpStatus(int) int
	NewRequestId() string
}

type ErrorCodeIf

type ErrorCodeIf interface {
	GetHttpStatus() int
	GetCode() string
	GetErrno() int
	Unwrap() error
}

Jump to

Keyboard shortcuts

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