MCPcopy Create free account

hub / github.com/TGlimmer/TG_walletbot / functions

Functions2,200 in github.com/TGlimmer/TG_walletbot

FunctionTestCommonWeakSecrets_不区分大小写
TestCommonWeakSecrets_不区分大小写 验证弱密钥检测不区分大小写
internal/infrastructure/config/config_test.go:102
FunctionTestConfigHandler_List_Empty
TestConfigHandler_List_Empty 测试空配置列表
internal/adapter/handler/admin_config_test.go:51
FunctionTestConfigHandler_List_Error
TestConfigHandler_List_Error 测试获取配置失败
internal/adapter/handler/admin_config_test.go:69
FunctionTestConfigHandler_List_Success
--- AdminConfigHandler 测试 --- TestConfigHandler_List_Success 测试获取配置列表成功
internal/adapter/handler/admin_config_test.go:20
FunctionTestConfigHandler_Update_EmptyBody
TestConfigHandler_Update_EmptyBody 测试更新配置 - 空请求体
internal/adapter/handler/admin_config_test.go:145
FunctionTestConfigHandler_Update_Error
TestConfigHandler_Update_Error 测试更新配置 - 内部错误
internal/adapter/handler/admin_config_test.go:160
FunctionTestConfigHandler_Update_MissingKey
TestConfigHandler_Update_MissingKey 测试更新配置 - 缺少 key
internal/adapter/handler/admin_config_test.go:113
FunctionTestConfigHandler_Update_MissingValue
TestConfigHandler_Update_MissingValue 测试更新配置 - 缺少 value
internal/adapter/handler/admin_config_test.go:129
FunctionTestConfigHandler_Update_Success
TestConfigHandler_Update_Success 测试更新配置成功
internal/adapter/handler/admin_config_test.go:87
FunctionTestConstants
---------- 常量值验证 ----------
pkg/pagination/pagination_test.go:278
FunctionTestConvertBlock_nil和空区块
TestConvertBlock_nil和空区块 验证 nil/空区块的处理
internal/infrastructure/tron/grpc_client_test.go:255
FunctionTestConvertBlock_交易无RawData
TestConvertBlock_交易无RawData 验证交易无 RawData 时不解析合约
internal/infrastructure/tron/grpc_client_test.go:497
FunctionTestConvertBlock_包含TRC20触发
TestConvertBlock_包含TRC20触发 验证 TriggerSmartContract 的转换
internal/infrastructure/tron/grpc_client_test.go:343
FunctionTestConvertBlock_包含TRX转账
TestConvertBlock_包含TRX转账 验证 TransferContract 的转换
internal/infrastructure/tron/grpc_client_test.go:279
FunctionTestConvertBlock_跳过nil交易
TestConvertBlock_跳过nil交易 验证 nil TransactionExtention 被跳过
internal/infrastructure/tron/grpc_client_test.go:476
FunctionTestConvertContract_忽略其他合约类型
TestConvertContract_忽略其他合约类型 验证非 Transfer/Trigger 类型返回 nil
internal/infrastructure/tron/grpc_client_test.go:405
FunctionTestConvertContract_无效protobuf数据
TestConvertContract_无效protobuf数据 验证反序列化失败时返回 nil
internal/infrastructure/tron/grpc_client_test.go:446
FunctionTestCreated
---------- Created 测试 ----------
pkg/response/response_test.go:85
FunctionTestCryptoService_不同密钥解密失败
TestCryptoService_不同密钥解密失败 验证使用不同的加密密钥解密应报错
internal/infrastructure/tron/crypto_test.go:69
FunctionTestCryptoService_加密解密往返
TestCryptoService_加密解密往返 验证 scrypt 加密后解密能正确返回原始私钥
internal/infrastructure/tron/crypto_test.go:18
FunctionTestCryptoService_密文是ScryptBase64格式
TestCryptoService_密文是ScryptBase64格式 验证加密结果是 scrypt 前缀 + 有效的 base64 字符串
internal/infrastructure/tron/crypto_test.go:87
FunctionTestCryptoService_截断密文解密失败
TestCryptoService_截断密文解密失败 验证被篡改或截断的密文解密失败
internal/infrastructure/tron/crypto_test.go:197
FunctionTestCryptoService_损坏密文_scrypt格式
--- 补充测试: 空输入/损坏密文异常处理 --- TestCryptoService_损坏密文_scrypt格式 验证各种损坏的 scrypt 格式密文
internal/infrastructure/tron/crypto_test.go:388
FunctionTestCryptoService_损坏密文_旧格式
TestCryptoService_损坏密文_旧格式 验证各种损坏的旧格式密文
internal/infrastructure/tron/crypto_test.go:457
FunctionTestCryptoService_新旧格式互操作
TestCryptoService_新旧格式互操作 验证新加密的数据无法被旧方式解密(安全性提升)
internal/infrastructure/tron/crypto_test.go:172
FunctionTestCryptoService_新格式_空私钥
TestCryptoService_新格式_空私钥 验证空私钥字符串的加密解密
internal/infrastructure/tron/crypto_test.go:283
FunctionTestCryptoService_新格式加密解密_不同私钥长度
--- 补充测试: 新格式 scrypt 加密解密 --- TestCryptoService_新格式加密解密_不同私钥长度 验证各种长度私钥的加密解密
internal/infrastructure/tron/crypto_test.go:239
FunctionTestCryptoService_新格式密文结构
TestCryptoService_新格式密文结构 验证 scrypt 密文的内部数据结构
internal/infrastructure/tron/crypto_test.go:538
FunctionTestCryptoService_新格式错误密钥_微小差异
--- 补充测试: 错误密钥解密失败 --- TestCryptoService_新格式错误密钥_微小差异 验证加密密钥的敏感性 (微小差异即解密失败)
internal/infrastructure/tron/crypto_test.go:355
FunctionTestCryptoService_旧格式不可被新密钥解密
TestCryptoService_旧格式不可被新密钥解密 验证旧格式密文的密钥绑定性
internal/infrastructure/tron/crypto_test.go:338
FunctionTestCryptoService_旧格式兼容_多种密钥
--- 补充测试: 旧格式兼容性 --- TestCryptoService_旧格式兼容_多种密钥 验证各种加密密钥下旧格式均可解密
internal/infrastructure/tron/crypto_test.go:298
FunctionTestCryptoService_旧格式兼容解密
TestCryptoService_旧格式兼容解密 验证能正确解密旧版 SHA256 格式的密文
internal/infrastructure/tron/crypto_test.go:137
FunctionTestCryptoService_旧格式错误密钥失败
TestCryptoService_旧格式错误密钥失败 验证旧格式使用错误密钥解密失败
internal/infrastructure/tron/crypto_test.go:156
FunctionTestCryptoService_格式路由正确
TestCryptoService_格式路由正确 验证 DecryptPrivateKey 根据前缀正确路由到 scrypt 或 legacy
internal/infrastructure/tron/crypto_test.go:513
FunctionTestCryptoService_每次加密结果不同
TestCryptoService_每次加密结果不同 验证由于随机 salt+nonce,相同输入每次加密结果不同
internal/infrastructure/tron/crypto_test.go:109
FunctionTestCurrencyConstants
(t *testing.T)
internal/domain/entity/entity_test.go:337
FunctionTestDashboardHandler_New
--- DashboardHandler 测试 --- DashboardHandler.Stats 内部调用 AdminUseCase.GetDashboardStats, 该方法大量使用 uc.db 直接查询,在无真实 DB 的单元测试环境中会 panic。 因此 Dashboard 的完整测试
internal/adapter/handler/admin_dashboard_test.go:15
FunctionTestDepositMonitor_AddAddress
--- AddAddress / addressCount / SetPollInterval 测试 --- TestDepositMonitor_AddAddress 验证动态添加监控地址
internal/infrastructure/tron/monitor_test.go:512
FunctionTestDepositMonitor_AddAddress_并发安全
--- 并发安全测试 --- TestDepositMonitor_AddAddress_并发安全 验证并发添加地址
internal/infrastructure/tron/monitor_test.go:622
FunctionTestDepositMonitor_SetPollInterval
TestDepositMonitor_SetPollInterval 验证轮询间隔设置
internal/infrastructure/tron/monitor_test.go:554
FunctionTestDepositMonitor_addressCount
TestDepositMonitor_addressCount 验证 addressCount 正确计数
internal/infrastructure/tron/monitor_test.go:537
FunctionTestDepositMonitor_并发读写安全
TestDepositMonitor_并发读写安全 验证并发读取和写入地址缓存
internal/infrastructure/tron/monitor_test.go:643
FunctionTestDepositService_GetRequiredConfirmations_从配置读取
==================== GetRequiredConfirmations 测试 ====================
internal/domain/service/deposit_service_test.go:28
FunctionTestDepositService_GetRequiredConfirmations_配置不存在使用默认
(t *testing.T)
internal/domain/service/deposit_service_test.go:39
FunctionTestDepositService_GetRequiredConfirmations_配置值无效使用默认
(t *testing.T)
internal/domain/service/deposit_service_test.go:50
FunctionTestDepositService_GetUserDepositAddress_成功
==================== GetUserDepositAddress 测试 ====================
internal/domain/service/deposit_service_test.go:228
FunctionTestDepositService_GetUserDepositAddress_查询失败
(t *testing.T)
internal/domain/service/deposit_service_test.go:352
FunctionTestDepositService_GetUserDepositAddress_钱包不存在
(t *testing.T)
internal/domain/service/deposit_service_test.go:241
FunctionTestDepositService_ListPendingDeposits_成功
==================== ListPendingDeposits 测试 ====================
internal/domain/service/deposit_service_test.go:256
FunctionTestDepositService_ListPendingDeposits_空列表
(t *testing.T)
internal/domain/service/deposit_service_test.go:272
FunctionTestDepositService_ProcessDeposit_入账后创建流水失败
(t *testing.T)
internal/domain/service/deposit_service_test.go:332
FunctionTestDepositService_ProcessDeposit_入账后更新余额失败
==================== 额外边界测试 ====================
internal/domain/service/deposit_service_test.go:312
FunctionTestDepositService_ProcessDeposit_入账后更新状态为已到账失败
(t *testing.T)
internal/domain/service/deposit_service_test.go:420
FunctionTestDepositService_ProcessDeposit_创建记录失败
(t *testing.T)
internal/domain/service/deposit_service_test.go:208
FunctionTestDepositService_ProcessDeposit_新充值_确认数不足
==================== ProcessDeposit 测试 ====================
internal/domain/service/deposit_service_test.go:63
FunctionTestDepositService_ProcessDeposit_新充值_确认数达标直接入账
(t *testing.T)
internal/domain/service/deposit_service_test.go:86
FunctionTestDepositService_ProcessDeposit_未知充值地址
(t *testing.T)
internal/domain/service/deposit_service_test.go:179
FunctionTestDepositService_ProcessDeposit_查询交易哈希失败
(t *testing.T)
internal/domain/service/deposit_service_test.go:194
FunctionTestDepositService_ProcessDeposit_重复交易_入账时查询钱包失败
(t *testing.T)
internal/domain/service/deposit_service_test.go:442
FunctionTestDepositService_ProcessDeposit_重复交易_更新状态失败
(t *testing.T)
internal/domain/service/deposit_service_test.go:392
FunctionTestDepositService_ProcessDeposit_重复交易_更新确认数失败
==================== updateConfirmations 边界测试 ====================
internal/domain/service/deposit_service_test.go:367
FunctionTestDepositService_ProcessDeposit_重复交易_确认数未增加
(t *testing.T)
internal/domain/service/deposit_service_test.go:161
FunctionTestDepositService_ProcessDeposit_重复交易哈希_已入账
(t *testing.T)
internal/domain/service/deposit_service_test.go:110
FunctionTestDepositService_ProcessDeposit_重复交易哈希_更新确认数
(t *testing.T)
internal/domain/service/deposit_service_test.go:128
FunctionTestDepositService_SetUserDepositAddress_成功
==================== SetUserDepositAddress 测试 ====================
internal/domain/service/deposit_service_test.go:286
FunctionTestDepositService_SetUserDepositAddress_更新失败
(t *testing.T)
internal/domain/service/deposit_service_test.go:298
FunctionTestDepositStatusConstants
(t *testing.T)
internal/domain/entity/entity_test.go:481
FunctionTestDepositUseCase_GetDepositInfo_成功
==================== GetDepositInfo 测试 ====================
internal/app/deposit_usecase_test.go:34
FunctionTestDepositUseCase_GetDepositInfo_无充值地址
(t *testing.T)
internal/app/deposit_usecase_test.go:49
FunctionTestDepositUseCase_GetDepositInfo_查询失败
(t *testing.T)
internal/app/deposit_usecase_test.go:63
FunctionTestDepositUseCase_ListPendingDeposits_成功
==================== ListPendingDeposits 测试 ====================
internal/app/deposit_usecase_test.go:178
FunctionTestDepositUseCase_ProcessChainDeposit_入账后查询余额失败
(t *testing.T)
internal/app/deposit_usecase_test.go:153
FunctionTestDepositUseCase_ProcessChainDeposit_入账成功发送通知
(t *testing.T)
internal/app/deposit_usecase_test.go:94
FunctionTestDepositUseCase_ProcessChainDeposit_处理失败
(t *testing.T)
internal/app/deposit_usecase_test.go:123
FunctionTestDepositUseCase_ProcessChainDeposit_已入账不通知
(t *testing.T)
internal/app/deposit_usecase_test.go:135
FunctionTestDepositUseCase_ProcessChainDeposit_新充值待确认
==================== ProcessChainDeposit 测试 ====================
internal/app/deposit_usecase_test.go:77
FunctionTestDeposit_IsCredited
(t *testing.T)
internal/domain/entity/entity_test.go:460
FunctionTestDeposit_TableName
============================================================================= Deposit 实体测试 ===========================================================
internal/domain/entity/entity_test.go:453
FunctionTestEncodeTRC20Transfer_大金额
TestEncodeTRC20Transfer_大金额 验证大金额的 uint256 编码
internal/infrastructure/tron/transaction_test.go:213
FunctionTestEncodeTRC20Transfer_编码正确性
--- encodeTRC20Transfer 测试 --- TestEncodeTRC20Transfer_编码正确性 验证 ABI 编码参数格式
internal/infrastructure/tron/transaction_test.go:192
FunctionTestError
---------- Error 测试 ----------
pkg/response/response_test.go:141
FunctionTestErrorFromAppError
---------- ErrorFromAppError 测试 ----------
pkg/response/response_test.go:181
FunctionTestErrorsAs_AppError
(t *testing.T)
pkg/errors/errors_test.go:162
FunctionTestErrorsAs_NestedWrap
(t *testing.T)
pkg/errors/errors_test.go:173
FunctionTestErrorsIs_DifferentSentinels
(t *testing.T)
pkg/errors/errors_test.go:156
FunctionTestErrorsIs_SentinelDirect
(t *testing.T)
pkg/errors/errors_test.go:145
FunctionTestErrorsIs_WithWrappedSentinel
---------- errors.Is / errors.As 兼容性测试 ----------
pkg/errors/errors_test.go:138
FunctionTestExchangePair_结构完整性
==================== ExchangePair 结构验证 ====================
internal/domain/service/exchange_service_test.go:419
FunctionTestExchangeRateHandler_List_Empty
TestExchangeRateHandler_List_Empty 测试空汇率列表
internal/adapter/handler/admin_exchange_rate_test.go:63
FunctionTestExchangeRateHandler_List_Error
TestExchangeRateHandler_List_Error 测试获取汇率列表失败
internal/adapter/handler/admin_exchange_rate_test.go:83
FunctionTestExchangeRateHandler_List_Success
--- AdminExchangeRateHandler 测试 --- TestExchangeRateHandler_List_Success 测试获取汇率列表成功
internal/adapter/handler/admin_exchange_rate_test.go:21
FunctionTestExchangeRateHandler_Update_InternalError
TestExchangeRateHandler_Update_InternalError 测试更新汇率 - 内部错误
internal/adapter/handler/admin_exchange_rate_test.go:250
FunctionTestExchangeRateHandler_Update_InvalidRate
TestExchangeRateHandler_Update_InvalidRate 测试更新汇率 - 无效汇率值
internal/adapter/handler/admin_exchange_rate_test.go:147
FunctionTestExchangeRateHandler_Update_MissingFields
TestExchangeRateHandler_Update_MissingFields 测试更新汇率 - 缺少必填字段
internal/adapter/handler/admin_exchange_rate_test.go:131
FunctionTestExchangeRateHandler_Update_NonNumericRate
TestExchangeRateHandler_Update_NonNumericRate 测试更新汇率 - 非数字汇率
internal/adapter/handler/admin_exchange_rate_test.go:187
FunctionTestExchangeRateHandler_Update_Success
TestExchangeRateHandler_Update_Success 测试更新汇率成功
internal/adapter/handler/admin_exchange_rate_test.go:101
FunctionTestExchangeRateHandler_Update_WithOptionalFields
TestExchangeRateHandler_Update_WithOptionalFields 测试更新汇率 - 携带可选字段
internal/adapter/handler/admin_exchange_rate_test.go:207
FunctionTestExchangeRateHandler_Update_ZeroRate
TestExchangeRateHandler_Update_ZeroRate 测试更新汇率 - 零汇率
internal/adapter/handler/admin_exchange_rate_test.go:167
FunctionTestExchangeRate_EffectiveRate
(t *testing.T)
internal/domain/entity/entity_test.go:642
FunctionTestExchangeRate_TableName
============================================================================= ExchangeRate 实体测试 ======================================================
internal/domain/entity/entity_test.go:635
← previousnext →1,401–1,500 of 2,200, ranked by callers