types

package
v1.67.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2022 License: BSD-3-Clause Imports: 5 Imported by: 12

Documentation

Index

Constants

View Source
const (
	PBGameActionStart = iota + 1
	PBGameActionContinue
	PBGameActionQuit
	PBGameActionQuery
	PBGameActionPlay
)

game action ty

View Source
const (
	// PlayStyleDefault 默认游戏类型
	PlayStyleDefault = iota + 1
	// PlayStyleDealer 庄家玩法
	PlayStyleDealer
)
View Source
const (
	// TyLogPBGameStart log for start PBgame
	TyLogPBGameStart = 721
	// TyLogPBGameContinue log for continue PBgame
	TyLogPBGameContinue = 722
	// TyLogPBGameQuit log for quit PBgame
	TyLogPBGameQuit = 723
	// TyLogPBGameQuery log for query PBgame
	TyLogPBGameQuery = 724
	// TyLogPBGamePlay log for play PBgame
	TyLogPBGamePlay = 725
)
View Source
const (
	// FuncNameQueryGameListByIDs 根据id列表查询game列表
	FuncNameQueryGameListByIDs = "QueryGameListByIDs"
	// FuncNameQueryGameByID 根据id查询game
	FuncNameQueryGameByID = "QueryGameByID"
	// FuncNameQueryGameByAddr 根据地址查询game
	FuncNameQueryGameByAddr = "QueryGameByAddr"
	// FuncNameQueryGameByStatus 根据status查询game
	FuncNameQueryGameByStatus = "QueryGameByStatus"
	// FuncNameQueryGameByRound 查询某一回合游戏结果
	FuncNameQueryGameByRound = "QueryGameByRound"
	// CreateStartTx 创建开始交易
	CreateStartTx = "Start"
	// CreateContinueTx 创建继续交易
	CreateContinueTx = "Continue"
	// CreateQuitTx 创建退出交易
	CreateQuitTx = "Quit"
	// CreatePlayTx 创建已匹配玩家交易
	CreatePlayTx = "Play"
)
View Source
const (
	// ListDESC 降序
	ListDESC = int32(0)
	// DefaultCount 默认一次取多少条记录
	DefaultCount = int32(20)
	// MaxPlayerNum 最大玩家数
	MaxPlayerNum = 5
	// MinPlayerNum 最小玩家数
	MinPlayerNum = 2
	// MinPlayValue 最小赌注
	MinPlayValue = 10
	// DefaultStyle 默认游戏类型
	DefaultStyle = PlayStyleDefault
	// PlatformAddress 平台地址
	PlatformAddress = "1PHtChNt3UcfssR7v7trKSk3WJtAWjKjjX"
	// PlatformFee 平台佣金
	PlatformFee = 0.005
	// DeveloperAddress 开发着地址
	DeveloperAddress = "1D6RFZNp2rh6QdbcZ1d7RWuBUz61We6SD7"
	// DeveloperFee 开发者佣金
	DeveloperFee = 0.005
	// PlatformSignAddress 平台签名地址
	PlatformSignAddress = "1Geb4ppNiAwMKKyrJgcis3JA57FkqsXvdR"
)

Variables

View Source
var (
	JRPCName        = "pokerbull"
	PokerBullX      = "pokerbull"
	ExecerPokerBull = []byte(PokerBullX)
)

包的名字可以通过配置文件来配置 建议用github的组织名称,或者用户名字开头, 再加上自己的插件的名字 如果发生重名,可以通过配置文件修改这些名字

View Source
var File_pokerbull_proto protoreflect.FileDescriptor

Functions

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor ...

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork ...

Types

type PBContinueTxReq

type PBContinueTxReq struct {
	GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	Fee    int64  `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"`
	// contains filtered or unexported fields
}

func (*PBContinueTxReq) Descriptor deprecated

func (*PBContinueTxReq) Descriptor() ([]byte, []int)

Deprecated: Use PBContinueTxReq.ProtoReflect.Descriptor instead.

func (*PBContinueTxReq) GetFee

func (x *PBContinueTxReq) GetFee() int64

func (*PBContinueTxReq) GetGameId

func (x *PBContinueTxReq) GetGameId() string

func (*PBContinueTxReq) ProtoMessage

func (*PBContinueTxReq) ProtoMessage()

func (*PBContinueTxReq) ProtoReflect added in v1.65.3

func (x *PBContinueTxReq) ProtoReflect() protoreflect.Message

func (*PBContinueTxReq) Reset

func (x *PBContinueTxReq) Reset()

func (*PBContinueTxReq) String

func (x *PBContinueTxReq) String() string

type PBGameAction

type PBGameAction struct {

	// Types that are assignable to Value:
	//	*PBGameAction_Start
	//	*PBGameAction_Continue
	//	*PBGameAction_Quit
	//	*PBGameAction_Query
	//	*PBGameAction_Play
	Value isPBGameAction_Value `protobuf_oneof:"value"`
	Ty    int32                `protobuf:"varint,10,opt,name=ty,proto3" json:"ty,omitempty"`
	// contains filtered or unexported fields
}

游戏状态

func (*PBGameAction) Descriptor deprecated

func (*PBGameAction) Descriptor() ([]byte, []int)

Deprecated: Use PBGameAction.ProtoReflect.Descriptor instead.

func (*PBGameAction) GetContinue

func (x *PBGameAction) GetContinue() *PBGameContinue

func (*PBGameAction) GetPlay

func (x *PBGameAction) GetPlay() *PBGamePlay

func (*PBGameAction) GetQuery

func (x *PBGameAction) GetQuery() *PBGameQuery

func (*PBGameAction) GetQuit

func (x *PBGameAction) GetQuit() *PBGameQuit

func (*PBGameAction) GetStart

func (x *PBGameAction) GetStart() *PBGameStart

func (*PBGameAction) GetTy

func (x *PBGameAction) GetTy() int32

func (*PBGameAction) GetValue

func (m *PBGameAction) GetValue() isPBGameAction_Value

func (*PBGameAction) ProtoMessage

func (*PBGameAction) ProtoMessage()

func (*PBGameAction) ProtoReflect added in v1.65.3

func (x *PBGameAction) ProtoReflect() protoreflect.Message

func (*PBGameAction) Reset

func (x *PBGameAction) Reset()

func (*PBGameAction) String

func (x *PBGameAction) String() string

type PBGameAction_Continue

type PBGameAction_Continue struct {
	Continue *PBGameContinue `protobuf:"bytes,2,opt,name=continue,proto3,oneof"`
}

type PBGameAction_Play

type PBGameAction_Play struct {
	Play *PBGamePlay `protobuf:"bytes,5,opt,name=play,proto3,oneof"`
}

type PBGameAction_Query

type PBGameAction_Query struct {
	Query *PBGameQuery `protobuf:"bytes,4,opt,name=query,proto3,oneof"`
}

type PBGameAction_Quit

type PBGameAction_Quit struct {
	Quit *PBGameQuit `protobuf:"bytes,3,opt,name=quit,proto3,oneof"`
}

type PBGameAction_Start

type PBGameAction_Start struct {
	Start *PBGameStart `protobuf:"bytes,1,opt,name=start,proto3,oneof"`
}

type PBGameContinue

type PBGameContinue struct {
	GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	// contains filtered or unexported fields
}

游戏继续

func (*PBGameContinue) Descriptor deprecated

func (*PBGameContinue) Descriptor() ([]byte, []int)

Deprecated: Use PBGameContinue.ProtoReflect.Descriptor instead.

func (*PBGameContinue) GetGameId

func (x *PBGameContinue) GetGameId() string

func (*PBGameContinue) ProtoMessage

func (*PBGameContinue) ProtoMessage()

func (*PBGameContinue) ProtoReflect added in v1.65.3

func (x *PBGameContinue) ProtoReflect() protoreflect.Message

func (*PBGameContinue) Reset

func (x *PBGameContinue) Reset()

func (*PBGameContinue) String

func (x *PBGameContinue) String() string

type PBGameIndexRecord

type PBGameIndexRecord struct {
	GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	Index  int64  `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

func (*PBGameIndexRecord) Descriptor deprecated

func (*PBGameIndexRecord) Descriptor() ([]byte, []int)

Deprecated: Use PBGameIndexRecord.ProtoReflect.Descriptor instead.

func (*PBGameIndexRecord) GetGameId

func (x *PBGameIndexRecord) GetGameId() string

func (*PBGameIndexRecord) GetIndex

func (x *PBGameIndexRecord) GetIndex() int64

func (*PBGameIndexRecord) ProtoMessage

func (*PBGameIndexRecord) ProtoMessage()

func (*PBGameIndexRecord) ProtoReflect added in v1.65.3

func (x *PBGameIndexRecord) ProtoReflect() protoreflect.Message

func (*PBGameIndexRecord) Reset

func (x *PBGameIndexRecord) Reset()

func (*PBGameIndexRecord) String

func (x *PBGameIndexRecord) String() string

type PBGameIndexRecords

type PBGameIndexRecords struct {
	Records []*PBGameIndexRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

func (*PBGameIndexRecords) Descriptor deprecated

func (*PBGameIndexRecords) Descriptor() ([]byte, []int)

Deprecated: Use PBGameIndexRecords.ProtoReflect.Descriptor instead.

func (*PBGameIndexRecords) GetRecords

func (x *PBGameIndexRecords) GetRecords() []*PBGameIndexRecord

func (*PBGameIndexRecords) ProtoMessage

func (*PBGameIndexRecords) ProtoMessage()

func (*PBGameIndexRecords) ProtoReflect added in v1.65.3

func (x *PBGameIndexRecords) ProtoReflect() protoreflect.Message

func (*PBGameIndexRecords) Reset

func (x *PBGameIndexRecords) Reset()

func (*PBGameIndexRecords) String

func (x *PBGameIndexRecords) String() string

type PBGamePlay

type PBGamePlay struct {
	GameId  string   `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`   //游戏id
	Round   int32    `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`    //当前游戏回合数
	Value   int64    `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`    //当前游戏赌注
	Address []string `protobuf:"bytes,4,rep,name=address,proto3" json:"address,omitempty"` //玩家地址
	// contains filtered or unexported fields
}

已匹配玩家直接游戏

func (*PBGamePlay) Descriptor deprecated

func (*PBGamePlay) Descriptor() ([]byte, []int)

Deprecated: Use PBGamePlay.ProtoReflect.Descriptor instead.

func (*PBGamePlay) GetAddress

func (x *PBGamePlay) GetAddress() []string

func (*PBGamePlay) GetGameId

func (x *PBGamePlay) GetGameId() string

func (*PBGamePlay) GetRound

func (x *PBGamePlay) GetRound() int32

func (*PBGamePlay) GetValue

func (x *PBGamePlay) GetValue() int64

func (*PBGamePlay) ProtoMessage

func (*PBGamePlay) ProtoMessage()

func (*PBGamePlay) ProtoReflect added in v1.65.3

func (x *PBGamePlay) ProtoReflect() protoreflect.Message

func (*PBGamePlay) Reset

func (x *PBGamePlay) Reset()

func (*PBGamePlay) String

func (x *PBGamePlay) String() string

type PBGameQuery

type PBGameQuery struct {
	GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	// contains filtered or unexported fields
}

查询游戏结果

func (*PBGameQuery) Descriptor deprecated

func (*PBGameQuery) Descriptor() ([]byte, []int)

Deprecated: Use PBGameQuery.ProtoReflect.Descriptor instead.

func (*PBGameQuery) GetGameId

func (x *PBGameQuery) GetGameId() string

func (*PBGameQuery) ProtoMessage

func (*PBGameQuery) ProtoMessage()

func (*PBGameQuery) ProtoReflect added in v1.65.3

func (x *PBGameQuery) ProtoReflect() protoreflect.Message

func (*PBGameQuery) Reset

func (x *PBGameQuery) Reset()

func (*PBGameQuery) String

func (x *PBGameQuery) String() string

type PBGameQuit

type PBGameQuit struct {
	GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	// contains filtered or unexported fields
}

游戏结束

func (*PBGameQuit) Descriptor deprecated

func (*PBGameQuit) Descriptor() ([]byte, []int)

Deprecated: Use PBGameQuit.ProtoReflect.Descriptor instead.

func (*PBGameQuit) GetGameId

func (x *PBGameQuit) GetGameId() string

func (*PBGameQuit) ProtoMessage

func (*PBGameQuit) ProtoMessage()

func (*PBGameQuit) ProtoReflect added in v1.65.3

func (x *PBGameQuit) ProtoReflect() protoreflect.Message

func (*PBGameQuit) Reset

func (x *PBGameQuit) Reset()

func (*PBGameQuit) String

func (x *PBGameQuit) String() string

type PBGameRecord

type PBGameRecord struct {
	GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	Status int32  `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	Index  int64  `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

索引value值

func (*PBGameRecord) Descriptor deprecated

func (*PBGameRecord) Descriptor() ([]byte, []int)

Deprecated: Use PBGameRecord.ProtoReflect.Descriptor instead.

func (*PBGameRecord) GetGameId

func (x *PBGameRecord) GetGameId() string

func (*PBGameRecord) GetIndex

func (x *PBGameRecord) GetIndex() int64

func (*PBGameRecord) GetStatus

func (x *PBGameRecord) GetStatus() int32

func (*PBGameRecord) ProtoMessage

func (*PBGameRecord) ProtoMessage()

func (*PBGameRecord) ProtoReflect added in v1.65.3

func (x *PBGameRecord) ProtoReflect() protoreflect.Message

func (*PBGameRecord) Reset

func (x *PBGameRecord) Reset()

func (*PBGameRecord) String

func (x *PBGameRecord) String() string

type PBGameRecords

type PBGameRecords struct {
	Records []*PBGameRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

func (*PBGameRecords) Descriptor deprecated

func (*PBGameRecords) Descriptor() ([]byte, []int)

Deprecated: Use PBGameRecords.ProtoReflect.Descriptor instead.

func (*PBGameRecords) GetRecords

func (x *PBGameRecords) GetRecords() []*PBGameRecord

func (*PBGameRecords) ProtoMessage

func (*PBGameRecords) ProtoMessage()

func (*PBGameRecords) ProtoReflect added in v1.65.3

func (x *PBGameRecords) ProtoReflect() protoreflect.Message

func (*PBGameRecords) Reset

func (x *PBGameRecords) Reset()

func (*PBGameRecords) String

func (x *PBGameRecords) String() string

type PBGameStart

type PBGameStart struct {
	Value     int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	PlayerNum int32 `protobuf:"varint,2,opt,name=playerNum,proto3" json:"playerNum,omitempty"`
	// contains filtered or unexported fields
}

游戏启动

func (*PBGameStart) Descriptor deprecated

func (*PBGameStart) Descriptor() ([]byte, []int)

Deprecated: Use PBGameStart.ProtoReflect.Descriptor instead.

func (*PBGameStart) GetPlayerNum

func (x *PBGameStart) GetPlayerNum() int32

func (*PBGameStart) GetValue

func (x *PBGameStart) GetValue() int64

func (*PBGameStart) ProtoMessage

func (*PBGameStart) ProtoMessage()

func (*PBGameStart) ProtoReflect added in v1.65.3

func (x *PBGameStart) ProtoReflect() protoreflect.Message

func (*PBGameStart) Reset

func (x *PBGameStart) Reset()

func (*PBGameStart) String

func (x *PBGameStart) String() string

type PBHand

type PBHand struct {
	Cards    []int32 `protobuf:"varint,1,rep,packed,name=cards,proto3" json:"cards,omitempty"` //一把牌,五张
	Result   int32   `protobuf:"varint,2,opt,name=result,proto3" json:"result,omitempty"`      //斗牛结果 (没牛:0, 牛1-9:1-9, 牛牛:10)
	Address  string  `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`     //玩家地址
	IsWin    bool    `protobuf:"varint,4,opt,name=isWin,proto3" json:"isWin,omitempty"`        //是否赢庄家
	Leverage int32   `protobuf:"varint,5,opt,name=leverage,proto3" json:"leverage,omitempty"`  //赌注倍数
	// contains filtered or unexported fields
}

一把牌

func (*PBHand) Descriptor deprecated

func (*PBHand) Descriptor() ([]byte, []int)

Deprecated: Use PBHand.ProtoReflect.Descriptor instead.

func (*PBHand) GetAddress

func (x *PBHand) GetAddress() string

func (*PBHand) GetCards

func (x *PBHand) GetCards() []int32

func (*PBHand) GetIsWin

func (x *PBHand) GetIsWin() bool

func (*PBHand) GetLeverage

func (x *PBHand) GetLeverage() int32

func (*PBHand) GetResult

func (x *PBHand) GetResult() int32

func (*PBHand) ProtoMessage

func (*PBHand) ProtoMessage()

func (*PBHand) ProtoReflect added in v1.65.3

func (x *PBHand) ProtoReflect() protoreflect.Message

func (*PBHand) Reset

func (x *PBHand) Reset()

func (*PBHand) String

func (x *PBHand) String() string

type PBPlayer

type PBPlayer struct {
	Hands   []*PBHand `protobuf:"bytes,1,rep,name=hands,proto3" json:"hands,omitempty"`     //历史发牌和斗牛结果
	Address string    `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` //玩家地址
	TxHash  int64     `protobuf:"varint,3,opt,name=txHash,proto3" json:"txHash,omitempty"`  //发牌随机数因子txhash的整数格式
	Ready   bool      `protobuf:"varint,4,opt,name=ready,proto3" json:"ready,omitempty"`    // continue状态下,是否ready
	// contains filtered or unexported fields
}

玩家

func (*PBPlayer) Descriptor deprecated

func (*PBPlayer) Descriptor() ([]byte, []int)

Deprecated: Use PBPlayer.ProtoReflect.Descriptor instead.

func (*PBPlayer) GetAddress

func (x *PBPlayer) GetAddress() string

func (*PBPlayer) GetHands

func (x *PBPlayer) GetHands() []*PBHand

func (*PBPlayer) GetReady

func (x *PBPlayer) GetReady() bool

func (*PBPlayer) GetTxHash

func (x *PBPlayer) GetTxHash() int64

func (*PBPlayer) ProtoMessage

func (*PBPlayer) ProtoMessage()

func (*PBPlayer) ProtoReflect added in v1.65.3

func (x *PBPlayer) ProtoReflect() protoreflect.Message

func (*PBPlayer) Reset

func (x *PBPlayer) Reset()

func (*PBPlayer) String

func (x *PBPlayer) String() string

type PBPoker

type PBPoker struct {
	Cards   []int32 `protobuf:"varint,1,rep,packed,name=cards,proto3" json:"cards,omitempty"` // 52张牌
	Pointer int32   `protobuf:"varint,2,opt,name=pointer,proto3" json:"pointer,omitempty"`    //已发牌偏移
	// contains filtered or unexported fields
}

扑克牌

func (*PBPoker) Descriptor deprecated

func (*PBPoker) Descriptor() ([]byte, []int)

Deprecated: Use PBPoker.ProtoReflect.Descriptor instead.

func (*PBPoker) GetCards

func (x *PBPoker) GetCards() []int32

func (*PBPoker) GetPointer

func (x *PBPoker) GetPointer() int32

func (*PBPoker) ProtoMessage

func (*PBPoker) ProtoMessage()

func (*PBPoker) ProtoReflect added in v1.65.3

func (x *PBPoker) ProtoReflect() protoreflect.Message

func (*PBPoker) Reset

func (x *PBPoker) Reset()

func (*PBPoker) String

func (x *PBPoker) String() string

type PBQueryReq

type PBQueryReq struct {
	GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	Fee    int64  `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"`
	// contains filtered or unexported fields
}

func (*PBQueryReq) Descriptor deprecated

func (*PBQueryReq) Descriptor() ([]byte, []int)

Deprecated: Use PBQueryReq.ProtoReflect.Descriptor instead.

func (*PBQueryReq) GetFee

func (x *PBQueryReq) GetFee() int64

func (*PBQueryReq) GetGameId

func (x *PBQueryReq) GetGameId() string

func (*PBQueryReq) ProtoMessage

func (*PBQueryReq) ProtoMessage()

func (*PBQueryReq) ProtoReflect added in v1.65.3

func (x *PBQueryReq) ProtoReflect() protoreflect.Message

func (*PBQueryReq) Reset

func (x *PBQueryReq) Reset()

func (*PBQueryReq) String

func (x *PBQueryReq) String() string

type PBQuitTxReq

type PBQuitTxReq struct {
	GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	Fee    int64  `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"`
	// contains filtered or unexported fields
}

func (*PBQuitTxReq) Descriptor deprecated

func (*PBQuitTxReq) Descriptor() ([]byte, []int)

Deprecated: Use PBQuitTxReq.ProtoReflect.Descriptor instead.

func (*PBQuitTxReq) GetFee

func (x *PBQuitTxReq) GetFee() int64

func (*PBQuitTxReq) GetGameId

func (x *PBQuitTxReq) GetGameId() string

func (*PBQuitTxReq) ProtoMessage

func (*PBQuitTxReq) ProtoMessage()

func (*PBQuitTxReq) ProtoReflect added in v1.65.3

func (x *PBQuitTxReq) ProtoReflect() protoreflect.Message

func (*PBQuitTxReq) Reset

func (x *PBQuitTxReq) Reset()

func (*PBQuitTxReq) String

func (x *PBQuitTxReq) String() string

type PBResult

type PBResult struct {
	Hands          []*PBHand `protobuf:"bytes,1,rep,name=hands,proto3" json:"hands,omitempty"`                    //本局所有玩家的牌和结果,按牛大小升序排序
	Winner         string    `protobuf:"bytes,2,opt,name=winner,proto3" json:"winner,omitempty"`                  //赢家地址
	Leverage       int32     `protobuf:"varint,3,opt,name=leverage,proto3" json:"leverage,omitempty"`             //赢得赌注倍数
	Dealer         string    `protobuf:"bytes,4,opt,name=dealer,proto3" json:"dealer,omitempty"`                  //庄家
	DealerLeverage int32     `protobuf:"varint,5,opt,name=dealerLeverage,proto3" json:"dealerLeverage,omitempty"` //庄家赌注倍数
	// contains filtered or unexported fields
}

本局游戏结果

func (*PBResult) Descriptor deprecated

func (*PBResult) Descriptor() ([]byte, []int)

Deprecated: Use PBResult.ProtoReflect.Descriptor instead.

func (*PBResult) GetDealer

func (x *PBResult) GetDealer() string

func (*PBResult) GetDealerLeverage

func (x *PBResult) GetDealerLeverage() int32

func (*PBResult) GetHands

func (x *PBResult) GetHands() []*PBHand

func (*PBResult) GetLeverage

func (x *PBResult) GetLeverage() int32

func (*PBResult) GetWinner

func (x *PBResult) GetWinner() string

func (*PBResult) ProtoMessage

func (*PBResult) ProtoMessage()

func (*PBResult) ProtoReflect added in v1.65.3

func (x *PBResult) ProtoReflect() protoreflect.Message

func (*PBResult) Reset

func (x *PBResult) Reset()

func (*PBResult) String

func (x *PBResult) String() string

type PBStartTxReq

type PBStartTxReq struct {
	Value     int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	PlayerNum int32 `protobuf:"varint,2,opt,name=playerNum,proto3" json:"playerNum,omitempty"`
	Fee       int64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"`
	// contains filtered or unexported fields
}

func (*PBStartTxReq) Descriptor deprecated

func (*PBStartTxReq) Descriptor() ([]byte, []int)

Deprecated: Use PBStartTxReq.ProtoReflect.Descriptor instead.

func (*PBStartTxReq) GetFee

func (x *PBStartTxReq) GetFee() int64

func (*PBStartTxReq) GetPlayerNum

func (x *PBStartTxReq) GetPlayerNum() int32

func (*PBStartTxReq) GetValue

func (x *PBStartTxReq) GetValue() int64

func (*PBStartTxReq) ProtoMessage

func (*PBStartTxReq) ProtoMessage()

func (*PBStartTxReq) ProtoReflect added in v1.65.3

func (x *PBStartTxReq) ProtoReflect() protoreflect.Message

func (*PBStartTxReq) Reset

func (x *PBStartTxReq) Reset()

func (*PBStartTxReq) String

func (x *PBStartTxReq) String() string

type PokerBull

type PokerBull struct {
	GameId      string      `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`           //默认是由创建这局游戏的txHash作为gameId
	Status      int32       `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`          // Start 1 -> Continue 2 -> Quit 3
	StartTime   int64       `protobuf:"varint,3,opt,name=startTime,proto3" json:"startTime,omitempty"`    //开始时间
	StartTxHash string      `protobuf:"bytes,4,opt,name=startTxHash,proto3" json:"startTxHash,omitempty"` //游戏启动交易hash
	Value       int64       `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"`            //赌注
	Poker       *PBPoker    `protobuf:"bytes,6,opt,name=poker,proto3" json:"poker,omitempty"`             //扑克牌
	Players     []*PBPlayer `protobuf:"bytes,7,rep,name=players,proto3" json:"players,omitempty"`         //玩家历史牌和结果集
	PlayerNum   int32       `protobuf:"varint,8,opt,name=playerNum,proto3" json:"playerNum,omitempty"`    //玩家数
	Results     []*PBResult `protobuf:"bytes,9,rep,name=results,proto3" json:"results,omitempty"`         //游戏结果集
	Index       int64       `protobuf:"varint,10,opt,name=index,proto3" json:"index,omitempty"`           //索引
	PrevIndex   int64       `protobuf:"varint,11,opt,name=prevIndex,proto3" json:"prevIndex,omitempty"`   //上级索引
	QuitTime    int64       `protobuf:"varint,12,opt,name=quitTime,proto3" json:"quitTime,omitempty"`     //游戏结束时间
	QuitTxHash  string      `protobuf:"bytes,13,opt,name=quitTxHash,proto3" json:"quitTxHash,omitempty"`  //游戏结束交易hash
	DealerAddr  string      `protobuf:"bytes,14,opt,name=dealerAddr,proto3" json:"dealerAddr,omitempty"`  //下局庄家地址
	IsWaiting   bool        `protobuf:"varint,15,opt,name=isWaiting,proto3" json:"isWaiting,omitempty"`   //游戏是否处于等待状态
	PreStatus   int32       `protobuf:"varint,16,opt,name=preStatus,proto3" json:"preStatus,omitempty"`   //上一index的状态
	Round       int32       `protobuf:"varint,17,opt,name=round,proto3" json:"round,omitempty"`           //当前游戏回合数
	// contains filtered or unexported fields
}

斗牛游戏内容

func (*PokerBull) Descriptor deprecated

func (*PokerBull) Descriptor() ([]byte, []int)

Deprecated: Use PokerBull.ProtoReflect.Descriptor instead.

func (*PokerBull) GetDealerAddr

func (x *PokerBull) GetDealerAddr() string

func (*PokerBull) GetGameId

func (x *PokerBull) GetGameId() string

func (*PokerBull) GetIndex

func (x *PokerBull) GetIndex() int64

func (*PokerBull) GetIsWaiting

func (x *PokerBull) GetIsWaiting() bool

func (*PokerBull) GetPlayerNum

func (x *PokerBull) GetPlayerNum() int32

func (*PokerBull) GetPlayers

func (x *PokerBull) GetPlayers() []*PBPlayer

func (*PokerBull) GetPoker

func (x *PokerBull) GetPoker() *PBPoker

func (*PokerBull) GetPreStatus

func (x *PokerBull) GetPreStatus() int32

func (*PokerBull) GetPrevIndex

func (x *PokerBull) GetPrevIndex() int64

func (*PokerBull) GetQuitTime

func (x *PokerBull) GetQuitTime() int64

func (*PokerBull) GetQuitTxHash

func (x *PokerBull) GetQuitTxHash() string

func (*PokerBull) GetResults

func (x *PokerBull) GetResults() []*PBResult

func (*PokerBull) GetRound

func (x *PokerBull) GetRound() int32

func (*PokerBull) GetStartTime

func (x *PokerBull) GetStartTime() int64

func (*PokerBull) GetStartTxHash

func (x *PokerBull) GetStartTxHash() string

func (*PokerBull) GetStatus

func (x *PokerBull) GetStatus() int32

func (*PokerBull) GetValue

func (x *PokerBull) GetValue() int64

func (*PokerBull) ProtoMessage

func (*PokerBull) ProtoMessage()

func (*PokerBull) ProtoReflect added in v1.65.3

func (x *PokerBull) ProtoReflect() protoreflect.Message

func (*PokerBull) Reset

func (x *PokerBull) Reset()

func (*PokerBull) String

func (x *PokerBull) String() string

type PokerBullType

type PokerBullType struct {
	types.ExecTypeBase
}

PokerBullType 斗牛执行器类型

func NewType

func NewType(cfg *types.Chain33Config) *PokerBullType

NewType 创建pokerbull执行器类型

func (*PokerBullType) GetLogMap

func (t *PokerBullType) GetLogMap() map[int64]*types.LogInfo

GetLogMap 获取日志map

func (*PokerBullType) GetName

func (t *PokerBullType) GetName() string

GetName 获取执行器名称

func (*PokerBullType) GetPayload

func (t *PokerBullType) GetPayload() types.Message

GetPayload 获取payload

func (*PokerBullType) GetTypeMap

func (t *PokerBullType) GetTypeMap() map[string]int32

GetTypeMap 获取类型map

type QueryPBGameByRound

type QueryPBGameByRound struct {
	GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	Round  int32  `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
	// contains filtered or unexported fields
}

QueryPBGameByRound 根据gameId和回合数查询某回合的游戏结果

func (*QueryPBGameByRound) Descriptor deprecated

func (*QueryPBGameByRound) Descriptor() ([]byte, []int)

Deprecated: Use QueryPBGameByRound.ProtoReflect.Descriptor instead.

func (*QueryPBGameByRound) GetGameId

func (x *QueryPBGameByRound) GetGameId() string

func (*QueryPBGameByRound) GetRound

func (x *QueryPBGameByRound) GetRound() int32

func (*QueryPBGameByRound) ProtoMessage

func (*QueryPBGameByRound) ProtoMessage()

func (*QueryPBGameByRound) ProtoReflect added in v1.65.3

func (x *QueryPBGameByRound) ProtoReflect() protoreflect.Message

func (*QueryPBGameByRound) Reset

func (x *QueryPBGameByRound) Reset()

func (*QueryPBGameByRound) String

func (x *QueryPBGameByRound) String() string

type QueryPBGameInfo

type QueryPBGameInfo struct {
	GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	Addr   string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	Status int32  `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
	Index  int64  `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryPBGameInfo) Descriptor deprecated

func (*QueryPBGameInfo) Descriptor() ([]byte, []int)

Deprecated: Use QueryPBGameInfo.ProtoReflect.Descriptor instead.

func (*QueryPBGameInfo) GetAddr

func (x *QueryPBGameInfo) GetAddr() string

func (*QueryPBGameInfo) GetGameId

func (x *QueryPBGameInfo) GetGameId() string

func (*QueryPBGameInfo) GetIndex

func (x *QueryPBGameInfo) GetIndex() int64

func (*QueryPBGameInfo) GetStatus

func (x *QueryPBGameInfo) GetStatus() int32

func (*QueryPBGameInfo) ProtoMessage

func (*QueryPBGameInfo) ProtoMessage()

func (*QueryPBGameInfo) ProtoReflect added in v1.65.3

func (x *QueryPBGameInfo) ProtoReflect() protoreflect.Message

func (*QueryPBGameInfo) Reset

func (x *QueryPBGameInfo) Reset()

func (*QueryPBGameInfo) String

func (x *QueryPBGameInfo) String() string

type QueryPBGameInfos

type QueryPBGameInfos struct {
	GameIds []string `protobuf:"bytes,1,rep,name=gameIds,proto3" json:"gameIds,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryPBGameInfos) Descriptor deprecated

func (*QueryPBGameInfos) Descriptor() ([]byte, []int)

Deprecated: Use QueryPBGameInfos.ProtoReflect.Descriptor instead.

func (*QueryPBGameInfos) GetGameIds

func (x *QueryPBGameInfos) GetGameIds() []string

func (*QueryPBGameInfos) ProtoMessage

func (*QueryPBGameInfos) ProtoMessage()

func (*QueryPBGameInfos) ProtoReflect added in v1.65.3

func (x *QueryPBGameInfos) ProtoReflect() protoreflect.Message

func (*QueryPBGameInfos) Reset

func (x *QueryPBGameInfos) Reset()

func (*QueryPBGameInfos) String

func (x *QueryPBGameInfos) String() string

type QueryPBGameListByStatusAndPlayerNum

type QueryPBGameListByStatusAndPlayerNum struct {
	Status    int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	PlayerNum int32 `protobuf:"varint,2,opt,name=playerNum,proto3" json:"playerNum,omitempty"`
	Index     int64 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

根据状态和游戏人数查找

func (*QueryPBGameListByStatusAndPlayerNum) Descriptor deprecated

func (*QueryPBGameListByStatusAndPlayerNum) Descriptor() ([]byte, []int)

Deprecated: Use QueryPBGameListByStatusAndPlayerNum.ProtoReflect.Descriptor instead.

func (*QueryPBGameListByStatusAndPlayerNum) GetIndex

func (*QueryPBGameListByStatusAndPlayerNum) GetPlayerNum

func (x *QueryPBGameListByStatusAndPlayerNum) GetPlayerNum() int32

func (*QueryPBGameListByStatusAndPlayerNum) GetStatus

func (*QueryPBGameListByStatusAndPlayerNum) ProtoMessage

func (*QueryPBGameListByStatusAndPlayerNum) ProtoMessage()

func (*QueryPBGameListByStatusAndPlayerNum) ProtoReflect added in v1.65.3

func (*QueryPBGameListByStatusAndPlayerNum) Reset

func (*QueryPBGameListByStatusAndPlayerNum) String

type ReceiptPBGame

type ReceiptPBGame struct {
	GameId    string   `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	Status    int32    `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	Addr      string   `protobuf:"bytes,3,opt,name=addr,proto3" json:"addr,omitempty"`
	Index     int64    `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
	PrevIndex int64    `protobuf:"varint,5,opt,name=prevIndex,proto3" json:"prevIndex,omitempty"`
	PlayerNum int32    `protobuf:"varint,6,opt,name=playerNum,proto3" json:"playerNum,omitempty"`
	Value     int64    `protobuf:"varint,7,opt,name=value,proto3" json:"value,omitempty"`
	IsWaiting bool     `protobuf:"varint,8,opt,name=isWaiting,proto3" json:"isWaiting,omitempty"`
	Players   []string `protobuf:"bytes,9,rep,name=players,proto3" json:"players,omitempty"`
	PreStatus int32    `protobuf:"varint,10,opt,name=preStatus,proto3" json:"preStatus,omitempty"`
	Round     int32    `protobuf:"varint,11,opt,name=round,proto3" json:"round,omitempty"`
	// contains filtered or unexported fields
}

func (*ReceiptPBGame) Descriptor deprecated

func (*ReceiptPBGame) Descriptor() ([]byte, []int)

Deprecated: Use ReceiptPBGame.ProtoReflect.Descriptor instead.

func (*ReceiptPBGame) GetAddr

func (x *ReceiptPBGame) GetAddr() string

func (*ReceiptPBGame) GetGameId

func (x *ReceiptPBGame) GetGameId() string

func (*ReceiptPBGame) GetIndex

func (x *ReceiptPBGame) GetIndex() int64

func (*ReceiptPBGame) GetIsWaiting

func (x *ReceiptPBGame) GetIsWaiting() bool

func (*ReceiptPBGame) GetPlayerNum

func (x *ReceiptPBGame) GetPlayerNum() int32

func (*ReceiptPBGame) GetPlayers

func (x *ReceiptPBGame) GetPlayers() []string

func (*ReceiptPBGame) GetPreStatus

func (x *ReceiptPBGame) GetPreStatus() int32

func (*ReceiptPBGame) GetPrevIndex

func (x *ReceiptPBGame) GetPrevIndex() int64

func (*ReceiptPBGame) GetRound

func (x *ReceiptPBGame) GetRound() int32

func (*ReceiptPBGame) GetStatus

func (x *ReceiptPBGame) GetStatus() int32

func (*ReceiptPBGame) GetValue

func (x *ReceiptPBGame) GetValue() int64

func (*ReceiptPBGame) ProtoMessage

func (*ReceiptPBGame) ProtoMessage()

func (*ReceiptPBGame) ProtoReflect added in v1.65.3

func (x *ReceiptPBGame) ProtoReflect() protoreflect.Message

func (*ReceiptPBGame) Reset

func (x *ReceiptPBGame) Reset()

func (*ReceiptPBGame) String

func (x *ReceiptPBGame) String() string

type ReplyPBGame

type ReplyPBGame struct {
	Game *PokerBull `protobuf:"bytes,1,opt,name=game,proto3" json:"game,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyPBGame) Descriptor deprecated

func (*ReplyPBGame) Descriptor() ([]byte, []int)

Deprecated: Use ReplyPBGame.ProtoReflect.Descriptor instead.

func (*ReplyPBGame) GetGame

func (x *ReplyPBGame) GetGame() *PokerBull

func (*ReplyPBGame) ProtoMessage

func (*ReplyPBGame) ProtoMessage()

func (*ReplyPBGame) ProtoReflect added in v1.65.3

func (x *ReplyPBGame) ProtoReflect() protoreflect.Message

func (*ReplyPBGame) Reset

func (x *ReplyPBGame) Reset()

func (*ReplyPBGame) String

func (x *ReplyPBGame) String() string

type ReplyPBGameByRound

type ReplyPBGameByRound struct {
	GameId    string      `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	Status    int32       `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	Result    *PBResult   `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
	IsWaiting bool        `protobuf:"varint,4,opt,name=isWaiting,proto3" json:"isWaiting,omitempty"`
	Value     int64       `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"`
	Players   []*PBPlayer `protobuf:"bytes,6,rep,name=players,proto3" json:"players,omitempty"`
	Return    int64       `protobuf:"varint,7,opt,name=return,proto3" json:"return,omitempty"`
	// contains filtered or unexported fields
}

ReplyPBGameByRound 某一回合游戏结果

func (*ReplyPBGameByRound) Descriptor deprecated

func (*ReplyPBGameByRound) Descriptor() ([]byte, []int)

Deprecated: Use ReplyPBGameByRound.ProtoReflect.Descriptor instead.

func (*ReplyPBGameByRound) GetGameId

func (x *ReplyPBGameByRound) GetGameId() string

func (*ReplyPBGameByRound) GetIsWaiting

func (x *ReplyPBGameByRound) GetIsWaiting() bool

func (*ReplyPBGameByRound) GetPlayers

func (x *ReplyPBGameByRound) GetPlayers() []*PBPlayer

func (*ReplyPBGameByRound) GetResult

func (x *ReplyPBGameByRound) GetResult() *PBResult

func (*ReplyPBGameByRound) GetReturn

func (x *ReplyPBGameByRound) GetReturn() int64

func (*ReplyPBGameByRound) GetStatus

func (x *ReplyPBGameByRound) GetStatus() int32

func (*ReplyPBGameByRound) GetValue

func (x *ReplyPBGameByRound) GetValue() int64

func (*ReplyPBGameByRound) ProtoMessage

func (*ReplyPBGameByRound) ProtoMessage()

func (*ReplyPBGameByRound) ProtoReflect added in v1.65.3

func (x *ReplyPBGameByRound) ProtoReflect() protoreflect.Message

func (*ReplyPBGameByRound) Reset

func (x *ReplyPBGameByRound) Reset()

func (*ReplyPBGameByRound) String

func (x *ReplyPBGameByRound) String() string

type ReplyPBGameList

type ReplyPBGameList struct {
	Games []*PokerBull `protobuf:"bytes,1,rep,name=games,proto3" json:"games,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyPBGameList) Descriptor deprecated

func (*ReplyPBGameList) Descriptor() ([]byte, []int)

Deprecated: Use ReplyPBGameList.ProtoReflect.Descriptor instead.

func (*ReplyPBGameList) GetGames

func (x *ReplyPBGameList) GetGames() []*PokerBull

func (*ReplyPBGameList) ProtoMessage

func (*ReplyPBGameList) ProtoMessage()

func (*ReplyPBGameList) ProtoReflect added in v1.65.3

func (x *ReplyPBGameList) ProtoReflect() protoreflect.Message

func (*ReplyPBGameList) Reset

func (x *ReplyPBGameList) Reset()

func (*ReplyPBGameList) String

func (x *ReplyPBGameList) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL