Documentation ¶
Index ¶
- Constants
- Variables
- type BizError
- type Error
- func (*Error) Descriptor() ([]byte, []int)
- func (m *Error) GetCode() int32
- func (m *Error) GetMsg() string
- func (m *Error) Marshal() (dAtA []byte, err error)
- func (m *Error) MarshalTo(dAtA []byte) (int, error)
- func (m *Error) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Error) ProtoMessage()
- func (m *Error) Reset()
- func (m *Error) Size() (n int)
- func (m *Error) String() string
- func (m *Error) Unmarshal(dAtA []byte) error
- func (m *Error) XXX_DiscardUnknown()
- func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Error) XXX_Merge(src proto.Message)
- func (m *Error) XXX_Size() int
- func (m *Error) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const ( ErrCodeUnknown = ErrCodeModuleRoot + iota // unknown error code ErrCodeInternal // internal error )
define common error code
View Source
const (
ErrCodeModuleRoot = ErrCodeStart * (1 + iota)
)
ErrCodeModuleRoot define error code module, e,g: 10000, 20000, 30000...
View Source
const ErrCodeStart = 10000
ErrCodeStart 业务逻辑错误代码开始值
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` }
func (*Error) Descriptor ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) XXX_DiscardUnknown ¶
func (m *Error) XXX_DiscardUnknown()
func (*Error) XXX_Marshal ¶
func (*Error) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.