印度包网
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.
 
 
 

218 lines
7.1 KiB

package sn
// Success Codes
const (
CodeSuccess = 0 // 操作成功
SnAccount = "wjA77Game_N601"
DefaultLanguage = "en"
AgentId = 320
SnId = 135
SignKey = "2e0af20e8f0444a7decde7ae4c382dec"
)
// Request Error Codes
const (
CodeRequestSuccess = 1001 // 成功
CodeRequestInvalidGameId = 100214 // 无效的游戏id
CodeRequestInvalidGame = 100202 // 游戏不存在
CodeRequestInvalidUser = 100213 // 玩家不存在
CodeRequestExist = 100216 // 玩家已经存在
)
// Operation Error Codes
const (
INVALIDREQUESTERR = 1 // 参数错误
CodeOperationFailed = 3001 // 操作失败(没有具体的失败原因说明)
CodeUserNotFound = 3002 // 用户不存在
CodeUserDataIncomplete = 3003 // 用户数据未加载完全
CodeParameterProcessingError = 3004 // 参数处理异常(一般是数据不一致导致的)
CodeDuplicateOrder = 3005 // 订单号重复
CodeTokenMismatch = 3006 // Token不一致
CodeRequestRateLimit = 3007 // 请求频率过高
CodeInsufficientBalance = 3008 // 余额不足
)
type BaseReq struct {
SnAccount string `json:"sn_account"`
Time int64 `json:"time"`
Sign string `json:"sign"`
}
type GetBalanceReq struct {
CoinCode string `json:"coin_code"`
GameId int `json:"game_id"`
RoomType string `json:"room_type"`
Timestamp int64 `json:"timestamp"`
Sign string `json:"sign"`
}
type GetBalanceResp struct {
Code int `json:"code"`
Data struct {
Chips int `json:"chips"`
} `json:"data"`
Msg string `json:"msg"`
}
//type GameBetReq struct {
// IsEnd bool // 返奖时游戏结束标识(true: 当前对局已结束, false: 当前对局未结束)
// AppID string // 运营商唯一标识
// AppSecret string // 运营商 AppSecret
// UserID string // 运营商的玩家唯一标识
// TransactionID string // 交易订单号
// Amount float64 // 增加/扣除金额(+ 增加, - 扣除)
// RoundID string // 本局游戏 ID
// GameID string // 游戏 ID
// ReqTime string // 请求时间
// Reason string // bet 下注扣款; win 派奖; refund 服务器内部出错,退回下注
//}
type GameBetReq struct {
CoinCode string `json:"coin_code"` // 金币类型
GameId int `json:"game_id"` // 游戏id
RoomType string `json:"room_type"` // 玩法
OrderId string `json:"order_id"` // 订单id
MinAmount int `json:"min_amount"` // 最小下注值
Amount int `json:"amount"` // 最大下注值
BetId string `json:"bet_id"` // 下注id
Sign string `json:"sign"` // 签名
}
type GameBetResp struct {
Code int `json:"code"` // 0成功 1失败
Msg string `json:"msg"`
Data struct {
Chips int `json:"chips"` // 余额
DeductionAmount int `json:"deduction_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"`
}
type SettleReq struct {
BackAmount int `json:"back_amount"`
CoinCode string `json:"coin_code"`
Details []struct {
AllBets int `json:"all_bets"`
Amount int `json:"amount"`
BetId string `json:"bet_id"`
CodedQuantity int `json:"coded_quantity"`
Index int `json:"index"`
IsFinish bool `json:"is_finish"`
WinAmount int `json:"win_amount"`
} `json:"details"`
GameId int `json:"game_id"`
IsFree bool `json:"is_free"`
IsOrderFinish bool `json:"is_order_finish"`
JpBonus int `json:"jp_bonus"`
JpContri int `json:"jp_contri"`
OrderId string `json:"order_id"`
RoomType string `json:"room_type"`
RoundId string `json:"round_id"`
SettlementId string `json:"settlement_id"`
Sign string `json:"sign"`
Timestamp int `json:"timestamp"`
}
type SettleResp struct {
Code int `json:"code"` // 0成功 1失败
Msg string `json:"msg"`
Data struct {
Chips int `json:"chips"` // 余额
} `json:"data"`
}
type RollbackReq struct {
CoinCode string `json:"coin_code"`
GameId int `json:"game_id"`
RoomType string `json:"room_type"`
OrderId string `json:"order_id"`
Sign string `json:"sign"`
}
type RollbackResp struct {
Code int `json:"code"` // 0成功 1失败
Msg string `json:"msg"`
Data struct {
Chips int `json:"chips"` // 余额
} `json:"data"`
}
type UpdateReq struct {
CoinCode string `json:"coin_code"` // 金币类型
GameId int `json:"game_id"`
RoomType string `json:"room_type"`
OrderId string `json:"order_id"`
SubTypeId int `json:"sub_type_id"` // 更新金币类型
Amount int `json:"amount"` // 更新数值
Extend map[string]interface{} `json:"extend"` // 扩展信息
Sign string `json:"sign"`
}
type UpdateResp struct {
Code int `json:"code"` // 0成功 1失败
Msg string `json:"msg"`
Data struct {
Chips int `json:"chips"` // 余额
} `json:"data"`
}
type GameControlCallbackReq struct {
Type string `json:"type"`
ControlId string `json:"control_id"`
Sign string `json:"sign"`
}
type GameControlCallbackResp struct {
Code int `json:"code"` // 0成功 1失败
Msg string `json:"msg"`
}
type ControlReq struct {
BaseReq
ThirdName string `json:"third_name"`
ControlId int `json:"control_id"`
Data []struct {
TargetRtp int `json:"target_rtp"`
} `json:"data"`
Sn int `json:"sn"`
AgentId int `json:"agent_id"`
UserId int `json:"user_id"`
}
type ControlResp struct {
Code int `json:"code"`
Success bool `json:"success"`
StatusCode int `json:"status_code"`
System int `json:"system"`
Message string `json:"message"`
Msg string `json:"msg"`
Prompt string `json:"prompt"`
RequestId string `json:"request_id"`
RequestMethod string `json:"request_method"`
Provider string `json:"provider"`
Doc string `json:"doc"`
Data struct {
} `json:"data"`
}