- 实现账号增删改查接口和逻辑 - 支持账号状态更新及状态历史记录功能 - 提供账号列表、历史和统计信息查询API - 实现账号轮询机制,支持按使用时间轮询获取账号 - 增加账号登录流程及批量登录功能,集成接码平台和平台API - 管理账号订单容量,支持容量检查与账号登录触发 - 提供账号池状态统计接口 - 账号历史记录查询支持多种变更类型文本展示 - 密码等敏感信息采用脱敏展示 - 完善日志记录和错误处理机制,保证业务稳定运行
43 lines
1.6 KiB
Go
43 lines
1.6 KiB
Go
package apple
|
||
|
||
type RedeemReq struct {
|
||
Account string `json:"account" description:"苹果账户邮箱地址"`
|
||
Password string `json:"password" description:"苹果账户密码"`
|
||
OrderId string `json:"order_id" description:"订单ID,用于追踪操作"`
|
||
RedemptionCode string `json:"redemption_code" description:"待兑换的卡密代码"`
|
||
}
|
||
|
||
type RedeemResp struct {
|
||
StatusDescription string `json:"status_description" description:"状态描述"`
|
||
BalanceBefore string `json:"balance_before" description:"兑换前账户余额"`
|
||
BalanceAfter string `json:"balance_after" description:"兑换后账户余额"`
|
||
Amount string `json:"amount" description:"本次兑换金额"`
|
||
OrderId string `json:"order_id" description:"订单ID"`
|
||
}
|
||
|
||
type QueryBalanceReq struct {
|
||
Account string `json:"account" description:"苹果账户邮箱地址"`
|
||
Password string `json:"password" description:"苹果账户密码"`
|
||
OrderId string `json:"order_id" description:"ID"`
|
||
}
|
||
|
||
type QueryBalanceResp struct {
|
||
Status int `json:"status" description:"查询状态:0成功,其他"`
|
||
StatusDescription string `json:"status_description" description:"状态描述"`
|
||
Balance string `json:"balance" description:"当前账户余额"`
|
||
OrderId string `json:"order_id" description:"订单ID"`
|
||
}
|
||
|
||
type HeartBeatReq = QueryBalanceReq
|
||
|
||
type HeartBeatResp struct {
|
||
Status int `json:"status" description:"查询状态:0成功,其他"`
|
||
}
|
||
|
||
type Resp[T any] struct {
|
||
Data *T `json:"data"`
|
||
Code int `json:"code"`
|
||
Message string `json:"message"`
|
||
TraceId string `json:"trace_id"`
|
||
}
|