errcode_if

package
v1.3.76 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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