Documentation ¶
Index ¶
- Constants
- Variables
- type SpbStatus
- func (s *SpbStatus) CauseCode() int
- func (s *SpbStatus) GetCodeAsBool() bool
- func (s *SpbStatus) GetCodeAsInt() int
- func (s *SpbStatus) GetCodeAsUint32() uint32
- func (s *SpbStatus) GetDetailMessage(exts ...interface{}) string
- func (s *SpbStatus) GetMessage(exts ...interface{}) string
- func (s *SpbStatus) MustWithDetails(details ...interface{}) *SpbStatus
- func (s *SpbStatus) Proto() *spb.Status
- func (s *SpbStatus) String() string
- func (s *SpbStatus) WithDetails(details ...interface{}) (*SpbStatus, error)
- type Status
Constants ¶
View Source
const EcodeNum int32 = 9999
EcodeNum 低于10000均为系统错误码,业务错误码请使用10000以上
Variables ¶
Functions ¶
This section is empty.
Types ¶
type SpbStatus ¶ added in v0.4.0
SpbStatus ...
func (*SpbStatus) GetCodeAsBool ¶ added in v0.4.0
GetCodeAsBool ...
func (*SpbStatus) GetCodeAsInt ¶ added in v0.4.0
GetCodeAsInt ...
func (*SpbStatus) GetCodeAsUint32 ¶ added in v0.4.0
GetCodeAsUint32 ...
func (*SpbStatus) GetDetailMessage ¶ added in v0.4.0
GetDetailMessage ...
func (*SpbStatus) GetMessage ¶ added in v0.4.0
GetMessage ...
func (*SpbStatus) MustWithDetails ¶ added in v0.4.0
MustWithDetails ...
func (*SpbStatus) WithDetails ¶ added in v0.4.0
WithDetails returns a new status with the provided details messages appended to the status. If any errors are encountered, it returns nil and the first error encountered.
Click to show internal directories.
Click to hide internal directories.