Documentation
¶
Index ¶
- Constants
- func HandleBet(mux *mux.Router, handler Bet)
- func HandleCancel(mux *mux.Router, handler Cancel)
- func HandleGetWallet(mux *mux.Router, handler GetWallet)
- func HandlePayout(mux *mux.Router, handler Payout)
- func HandleRefund(mux *mux.Router, handler Refund)
- func HandleRollback(mux *mux.Router, handler Rollback)
- func HandleVerifyPlayer(mux *mux.Router, handler VerifyPlayer)
- type Bet
- type BetRequest
- type Cancel
- type CancelRequest
- type Error
- type GetWallet
- type GetWalletReply
- type GetWalletRequest
- type HTTPError
- type HookRequestHeader
- type Payout
- type PayoutRequest
- type PlayerInfo
- type PlayerWallet
- type Refund
- type RefundRequest
- type Rollback
- type RollbackRequest
- type TransactionData
- type TransactionReply
- type VerifyPlayer
- type VerifyPlayerReply
- type VerifyPlayerRequest
Constants ¶
View Source
const ( ErrUnknown = 1000 ErrInvalidRequest = 1034 ErrTenantFailed = 1035 ErrInternalServerError = 1200 ErrInvalidTenantID = 1204 ErrInvalidTenantApiKey = 1205 ErrInvalidPlayerSession = 1300 ErrEmptyPlayerSession = 1301 ErrServerErrorOccurs = 1303 ErrInvalidPlayer = 1305 ErrPlayerBlocked = 1306 ErrExpiredPlayerSession = 1308 ErrPlayerInactive = 1309 ErrVerifyFailed = 1310 ErrPlayerInProgress = 1315 ErrGameIsUnderMaintenance = 1400 ErrGameIsInactive = 1401 ErrInvalidGameID = 1402 ErrValueCannotBeNull = 3001 ErrPlayerDoesNotExist = 3004 ErrNoBetExists = 3021 ErrBetAlreadyPayout = 3022 ErrBetAlreadyExisted = 3032 ErrBetFailed = 3033 ErrPayoutFailed = 3034 ErrTransactionDoesNotExist = 3040 ErrInvalidCurrency = 3206 ErrInsufficient = 3202 )
View Source
const ( Authorization = "Authorization" XApiKey = "x-api-key" XTenantId = "x-tenant-id" XTenantPlayerToken = "x-tenant-player-token" XTenantPlayerId = "x-tenant-player-id" XGameId = "x-game-id" XRequestId = "x-request-id" )
Variables ¶
This section is empty.
Functions ¶
func HandleCancel ¶ added in v0.0.20
func HandleGetWallet ¶
func HandlePayout ¶
func HandleRefund ¶
func HandleRollback ¶
func HandleVerifyPlayer ¶
func HandleVerifyPlayer(mux *mux.Router, handler VerifyPlayer)
Types ¶
type Bet ¶
type Bet func(ctx context.Context, request *BetRequest) (*TransactionReply, error)
type BetRequest ¶ added in v0.0.14
type Cancel ¶ added in v0.0.20
type Cancel func(ctx context.Context, request *CancelRequest) (*TransactionReply, error)
type CancelRequest ¶ added in v0.0.20
type CancelRequest struct { Header *HookRequestHeader `json:"header,omitempty"` TxId string `json:"tx_id"` RefTxId string `json:"ref_tx_id"` SessionId string `json:"session_id"` Currency string `json:"currency"` }
type GetWallet ¶
type GetWallet func(ctx context.Context, request *GetWalletRequest) (*GetWalletReply, error)
wallet
type GetWalletReply ¶
type GetWalletReply struct { Data *PlayerWallet `json:"data"` Error *Error `json:"error"` }
type GetWalletRequest ¶
type GetWalletRequest struct { Header *HookRequestHeader `json:"header"` Currency string `json:"currency"` }
type HTTPError ¶
func NewHTTPError ¶
type HookRequestHeader ¶
type HookRequestHeader struct { XApiKey string `json:"x_api_key,omitempty"` // x-api-key XTenantId string `json:"x_tenant_id,omitempty"` // x-tenant-id XTenantPlayerToken string `json:"x_tenant_player_token,omitempty"` // x-tenant-player-token XTenantPlayerId string `json:"x_tenant_player_id,omitempty"` // x-tenant-player-id XGameId string `json:"x_game_id,omitempty"` // x-game-id XRequestId string `json:"x_request_id,omitempty"` // x-request-id }
type Payout ¶
type Payout func(ctx context.Context, request *PayoutRequest) (*TransactionReply, error)
type PayoutRequest ¶ added in v0.0.14
type PayoutRequest struct { Header *HookRequestHeader `json:"header,omitempty"` TxId string `json:"tx_id"` RefTxId string `json:"ref_tx_id"` SessionId string `json:"session_id"` Currency string `json:"currency"` Amount float64 `json:"amount"` // Possible values: [SETTLE, FEATURE, JACKPOT, BONUS_WITHDRAWAL, FREE_WITHDRAWAL] PayoutType string `json:"payout_type"` IsEndSession bool `json:"is_end_session"` }
type PlayerInfo ¶
type PlayerWallet ¶
type Refund ¶
type Refund func(ctx context.Context, request *RefundRequest) (*TransactionReply, error)
type RefundRequest ¶ added in v0.0.14
type Rollback ¶
type Rollback func(ctx context.Context, request *RollbackRequest) (*TransactionReply, error)
type RollbackRequest ¶ added in v0.0.14
type TransactionData ¶
type TransactionReply ¶
type TransactionReply struct { Data *TransactionData `json:"data"` Error *Error `json:"error"` }
type VerifyPlayer ¶
type VerifyPlayer func(ctx context.Context, request *VerifyPlayerRequest) (*VerifyPlayerReply, error)
player
type VerifyPlayerReply ¶
type VerifyPlayerReply struct { Data *PlayerInfo `json:"data"` Error *Error `json:"error"` }
type VerifyPlayerRequest ¶
type VerifyPlayerRequest struct {
Header *HookRequestHeader `json:"header"`
}
Click to show internal directories.
Click to hide internal directories.