Versions in this module Expand all Collapse all v1 v1.2.0 Jul 15, 2024 Changes in this version + const DefaultMsg v1.1.0 Apr 19, 2024 Changes in this version + const AmountInsufficientCode + const DefaultCode + const DefaultLanguage + const DtmErrCode + const DuplicateDataErrCode + const EtcdErrCode + const EtcdPrefixKey + const ExecSqlFailedCode + const InternalCode + const KafkaErrCode + const LoginFailedCode + const MongoErrCode + const ParamValidateFailedCode + const PasswordNotMatchCode + const PulsarErrCode + const RecordNotFoundErrCode + const RedisErrCode + const TokenExpireCode + const TokenValidateFailedCode + const UserNotFoundCode + var AmountInsufficient = AmountInsufficientCode.Error("") + var DtmErr = DtmErrCode.Error("") + var DuplicateDataErr = DuplicateDataErrCode.Error("") + var ErrPrec = ErrPrecCode.Error("") + var EtcdErr = EtcdErrCode.Error("") + var ExecSqlFailed = ExecSqlFailedCode.Error("") + var Internal = InternalCode.Error("") + var KafkaErr = KafkaErrCode.Error("") + var LoOrderCancelFailed = LoOrderCancelFailedCode.Error("") + var LoginFailed = LoginFailedCode.Error("") + var MongoErr = MongoErrCode.Error("") + var NotAsks = NotAsksCode.Error("") + var NotBids = NotBidsCode.Error("") + var OrderHasResolved = OrderHasResolvedCode.Error("") + var OrderNotFound = OrderNotFoundCode.Error("") + var ParamValidateFailed = ParamValidateFailedCode.Error("") + var PasswordNotMatch = PasswordNotMatchCode.Error("") + var PulsarErr = PulsarErrCode.Error("") + var RecordNotFoundErr = RecordNotFoundErrCode.Error("") + var RedisErr = RedisErrCode.Error("") + var TokenExpire = TokenExpireCode.Error("") + var TokenValidateFailed = TokenValidateFailedCode.Error("") + var UserNotFound = UserNotFoundCode.Error("") + func CastToDtmError(err error) error + func InitTranslator(path string) + func InitTranslatorFromEtcd(etcdConfig etcd.EtcdConfig) + func WarpMessage(err error, msg string) error + type Code codes.Code + const AccountCodeInit + const AdminCodeInit + const CommonCodeInit + const ErrPrecCode + const LoOrderCancelFailedCode + const MatchCodeInit + const NotAsksCode + const NotBidsCode + const OrderCodeInit + const OrderHasResolvedCode + const OrderNotFoundCode + const QuoteCodeInit + func (c Code) DtmErrorMsg() string + func (c Code) Error(msg string) error + func (c Code) String() string + func (c Code) Translate(lang string) string + type Translator struct + Codes *sync.Map v1.0.0 Dec 1, 2023