You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
4.5 KiB
94 lines
4.5 KiB
package jin |
|
|
|
// Success Codes |
|
const ( |
|
CodeSuccess = 0 // 操作成功 |
|
) |
|
|
|
// Request Error Codes |
|
const ( |
|
CodeRequestEmptyParams = 1001 // 请求参数为空 |
|
CodeRequestInvalidParams = 1002 // 请求参数错误 |
|
CodeSignatureError = 1003 // 签名错误 |
|
CodeInvalidOperator = 1004 // 无效的运营商代码 |
|
) |
|
|
|
// Operation Error Codes |
|
const ( |
|
CodeOperationFailed = 3001 // 操作失败(没有具体的失败原因说明) |
|
CodeUserNotFound = 3002 // 用户不存在 |
|
CodeUserDataIncomplete = 3003 // 用户数据未加载完全 |
|
CodeParameterProcessingError = 3004 // 参数处理异常(一般是数据不一致导致的) |
|
CodeDuplicateOrder = 3005 // 订单号重复 |
|
CodeTokenMismatch = 3006 // Token不一致 |
|
CodeRequestRateLimit = 3007 // 请求频率过高 |
|
CodeInsufficientBalance = 3008 // 余额不足 |
|
) |
|
|
|
type AuthReq struct { |
|
OperatorID int `json:"operator_id" form:"operator_id"` // [Required] Operator ID provided by the platform |
|
Accounts string `json:"accounts" form:"accounts"` // [Required] Game account or ID (max 127 characters) |
|
Token string `json:"token" form:"token"` // [Required] Account password (max 32 characters, platform token in URL) |
|
Language string `json:"language" form:"language"` // Optional language, e.g., "pt" |
|
Currency string `json:"currency" form:"currency"` // Optional currency, e.g., "BRL" |
|
SessionID int64 `json:"session_id" form:"session_id"` // Optional session ID (sid in URL) |
|
IP string `json:"ip" form:"ip"` // Optional IPv4/IPv6 address |
|
Mac string `json:"mac" form:"mac"` // Optional machine code |
|
GameID int `json:"game_id" form:"game_id"` // [Required] Current game ID |
|
} |
|
|
|
type AuthResp struct { |
|
Code int `json:"code"` |
|
Msg string `json:"msg"` |
|
Data struct { |
|
Accounts string `json:"accounts"` |
|
Nickname string `json:"nickname"` |
|
Token string `json:"token"` |
|
Amount float64 `json:"amount"` |
|
} `json:"data"` |
|
Error string `json:"error"` |
|
} |
|
|
|
type GameBetReq struct { |
|
Reference string `json:"reference" form:"reference"` // 当前注单号 |
|
OperatorID string `json:"operator_id" form:"operator_id"` // 本平台提供的运营商ID |
|
Accounts string `json:"accounts" form:"accounts"` // 运营的游戏帐号或ID |
|
Token string `json:"token" form:"token"` // authentication 返回的 token |
|
GameID string `json:"game_id" form:"game_id"` // 游戏类型ID |
|
RoomID string `json:"room_id" form:"room_id"` // 游戏房间ID |
|
WinAmount float64 `json:"win_amount" form:"win_amount"` // 当前游戏返奖金额 |
|
BetAmount float64 `json:"bet_amount" form:"bet_amount"` // 当前下注金额 |
|
RecordType string `json:"record_type" form:"record_type"` // 记录类型 (0 为有压注金额的注单, 非0 为免费游戏) |
|
BetReferenceID string `json:"bet_reference_id" form:"bet_reference_id"` // 压注注单号 |
|
RoundID string `json:"round_id" form:"round_id"` // 局号 |
|
IsEndRound int `json:"is_end_round" form:"is_end_round"` // 此轮是否结束 |
|
} |
|
|
|
type GameBetResp struct { |
|
Code int `json:"code"` |
|
Msg string `json:"msg"` |
|
Data struct { |
|
Amount float64 `json:"amount"` |
|
} `json:"data"` |
|
} |
|
|
|
type JackpotReq struct { |
|
Reference string `json:"reference" form:"reference"` // 当前注单号 |
|
OperatorID string `json:"operator_id" form:"operator_id"` // 本平台提供的运营商ID |
|
Accounts string `json:"accounts" form:"accounts"` // 运营的游戏帐号或ID |
|
Token string `json:"token" form:"token"` // authentication 返回的 token |
|
GameID string `json:"game_id" form:"game_id"` // 游戏类型ID |
|
RoomID string `json:"room_id" form:"room_id"` // 游戏房间ID |
|
WinAmount float64 `json:"win_amount" form:"win_amount"` // 当前游戏彩金金额 |
|
RecordType string `json:"record_type" form:"record_type"` // 10 小彩金 11 大彩金 12 中等彩金 |
|
BetReferenceID string `json:"bet_reference_id" form:"bet_reference_id"` // 压注注单号 |
|
RoundID string `json:"round_id" form:"round_id"` // 局号 |
|
} |
|
|
|
type JackpotResp struct { |
|
Code int `json:"code"` |
|
Msg string `json:"msg"` |
|
Data struct { |
|
Amount float64 `json:"amount"` |
|
} `json:"data"` |
|
}
|
|
|