types

package
v1.65.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: BSD-3-Clause Imports: 8 Imported by: 8

Documentation

Index

Constants

View Source
const (
	GameActionCreate = iota + 1
	GameActionMatch
	GameActionCancel
	GameActionClose

	//log for game
	TyLogCreateGame = 711
	TyLogMatchGame  = 712
	TyLogCancleGame = 713
	TyLogCloseGame  = 714
)

game action ty

View Source
const (
	ActionCreateGame = "createGame"
	ActionMatchGame  = "matchGame"
	ActionCancelGame = "cancelGame"
	ActionCloseGame  = "closeGame"
)

action name

View Source
const (
	FuncNameQueryGameListByIds           = "QueryGameListByIds"
	FuncNameQueryGameListCount           = "QueryGameListCount"
	FuncNameQueryGameListByStatusAndAddr = "QueryGameListByStatusAndAddr"
	FuncNameQueryGameByID                = "QueryGameById"
)

query func name

Variables

View Source
var (
	GameX      = "game"
	ExecerGame = []byte(GameX)
)

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

View Source
var (
	ErrGameCreateAmount = fmt.Errorf("%s", "You fill in more than the maximum number of games.")
	ErrGameCancleAddr   = fmt.Errorf("%s", "You don't have permission to cancel someone else's game.")
	ErrGameCloseAddr    = fmt.Errorf("%s", "The game time has not yet expired,You don't have permission to call yet.")
	ErrGameTimeOut      = fmt.Errorf("%s", "The game has expired.,You don't have permission to call.")
	ErrGameMatchStatus  = fmt.Errorf("%s", "can't join the game, the game has matched or finished!")
	ErrGameMatch        = fmt.Errorf("%s", "can't join the game, You can't match the game you created!")
	ErrGameCancleStatus = fmt.Errorf("%s", "can't cancle the game, the game has matched!")
	ErrGameCloseStatus  = fmt.Errorf("%s", "can't close the game again, the game has  finished!")
)

some errors definition

Functions

func CreateRawGamePreCancelTx

func CreateRawGamePreCancelTx(cfg *types.Chain33Config, parm *GamePreCancelTx) (*types.Transaction, error)

CreateRawGamePreCancelTx unused,just empty implementation

func CreateRawGamePreCloseTx

func CreateRawGamePreCloseTx(cfg *types.Chain33Config, parm *GamePreCloseTx) (*types.Transaction, error)

CreateRawGamePreCloseTx unused,just empty implementation

func CreateRawGamePreCreateTx

func CreateRawGamePreCreateTx(cfg *types.Chain33Config, parm *GamePreCreateTx) (*types.Transaction, error)

CreateRawGamePreCreateTx unused,just empty implementation

func CreateRawGamePreMatchTx

func CreateRawGamePreMatchTx(cfg *types.Chain33Config, parm *GamePreMatchTx) (*types.Transaction, error)

CreateRawGamePreMatchTx unused,just empty implementation

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor ...

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork ...

Types

type Game

type Game struct {
	//默认是由创建这局游戏的txHash作为gameId
	GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	// create 1 -> Match 2 -> Cancel 3 -> Close 4
	Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	//创建时间
	CreateTime int64 `protobuf:"varint,3,opt,name=createTime,proto3" json:"createTime,omitempty"`
	//匹配时间(何时参与对赌)
	MatchTime int64 `protobuf:"varint,4,opt,name=matchTime,proto3" json:"matchTime,omitempty"`
	//状态close的时间(包括cancel)
	Closetime int64 `protobuf:"varint,5,opt,name=closetime,proto3" json:"closetime,omitempty"`
	//赌注
	Value int64 `protobuf:"varint,6,opt,name=value,proto3" json:"value,omitempty"`
	//发起者账号地址
	CreateAddress string `protobuf:"bytes,7,opt,name=createAddress,proto3" json:"createAddress,omitempty"`
	//对赌者账号地址
	MatchAddress string `protobuf:"bytes,8,opt,name=matchAddress,proto3" json:"matchAddress,omitempty"`
	// hash 类型,预留字段
	HashType string `protobuf:"bytes,9,opt,name=hashType,proto3" json:"hashType,omitempty"`
	//庄家创建游戏时,庄家自己出拳结果加密后的hash值
	HashValue []byte `protobuf:"bytes,10,opt,name=hashValue,proto3" json:"hashValue,omitempty"`
	//用来公布庄家出拳结果的私钥
	Secret string `protobuf:"bytes,11,opt,name=secret,proto3" json:"secret,omitempty"`
	// 1 平局,2 庄家获胜,3 matcher获胜,4
	// 庄家开奖超时,matcher获胜,并获得本局所有赌资
	Result int32 `protobuf:"varint,12,opt,name=result,proto3" json:"result,omitempty"`
	// matcher 出拳结果
	MatcherGuess int32 `protobuf:"varint,13,opt,name=matcherGuess,proto3" json:"matcherGuess,omitempty"`
	// create txHash
	CreateTxHash string `protobuf:"bytes,14,opt,name=createTxHash,proto3" json:"createTxHash,omitempty"`
	// matche交易hash
	MatchTxHash string `protobuf:"bytes,15,opt,name=matchTxHash,proto3" json:"matchTxHash,omitempty"`
	// close txhash
	CloseTxHash string `protobuf:"bytes,16,opt,name=closeTxHash,proto3" json:"closeTxHash,omitempty"`
	// cancel txhash
	CancelTxHash         string   `protobuf:"bytes,17,opt,name=cancelTxHash,proto3" json:"cancelTxHash,omitempty"`
	Index                int64    `protobuf:"varint,18,opt,name=index,proto3" json:"index,omitempty"`
	PrevIndex            int64    `protobuf:"varint,19,opt,name=prevIndex,proto3" json:"prevIndex,omitempty"`
	CreatorGuess         int32    `protobuf:"varint,20,opt,name=creatorGuess,proto3" json:"creatorGuess,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Game) Descriptor

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

func (*Game) GetCancelTxHash

func (m *Game) GetCancelTxHash() string

func (*Game) GetCloseTxHash

func (m *Game) GetCloseTxHash() string

func (*Game) GetClosetime

func (m *Game) GetClosetime() int64

func (*Game) GetCreateAddress

func (m *Game) GetCreateAddress() string

func (*Game) GetCreateTime

func (m *Game) GetCreateTime() int64

func (*Game) GetCreateTxHash

func (m *Game) GetCreateTxHash() string

func (*Game) GetCreatorGuess

func (m *Game) GetCreatorGuess() int32

func (*Game) GetGameId

func (m *Game) GetGameId() string

func (*Game) GetHashType

func (m *Game) GetHashType() string

func (*Game) GetHashValue

func (m *Game) GetHashValue() []byte

func (*Game) GetIndex

func (m *Game) GetIndex() int64

func (*Game) GetMatchAddress

func (m *Game) GetMatchAddress() string

func (*Game) GetMatchTime

func (m *Game) GetMatchTime() int64

func (*Game) GetMatchTxHash

func (m *Game) GetMatchTxHash() string

func (*Game) GetMatcherGuess

func (m *Game) GetMatcherGuess() int32

func (*Game) GetPrevIndex

func (m *Game) GetPrevIndex() int64

func (*Game) GetResult

func (m *Game) GetResult() int32

func (*Game) GetSecret

func (m *Game) GetSecret() string

func (*Game) GetStatus

func (m *Game) GetStatus() int32

func (*Game) GetValue

func (m *Game) GetValue() int64

func (*Game) ProtoMessage

func (*Game) ProtoMessage()

func (*Game) Reset

func (m *Game) Reset()

func (*Game) String

func (m *Game) String() string

func (*Game) XXX_DiscardUnknown

func (m *Game) XXX_DiscardUnknown()

func (*Game) XXX_Marshal

func (m *Game) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Game) XXX_Merge

func (m *Game) XXX_Merge(src proto.Message)

func (*Game) XXX_Size

func (m *Game) XXX_Size() int

func (*Game) XXX_Unmarshal

func (m *Game) XXX_Unmarshal(b []byte) error

type GameAction

type GameAction struct {
	// Types that are valid to be assigned to Value:
	//	*GameAction_Create
	//	*GameAction_Cancel
	//	*GameAction_Close
	//	*GameAction_Match
	Value                isGameAction_Value `protobuf_oneof:"value"`
	Ty                   int32              `protobuf:"varint,10,opt,name=ty,proto3" json:"ty,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

message for execs.game

func (*GameAction) Descriptor

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

func (*GameAction) GetCancel

func (m *GameAction) GetCancel() *GameCancel

func (*GameAction) GetClose

func (m *GameAction) GetClose() *GameClose

func (*GameAction) GetCreate

func (m *GameAction) GetCreate() *GameCreate

func (*GameAction) GetMatch

func (m *GameAction) GetMatch() *GameMatch

func (*GameAction) GetTy

func (m *GameAction) GetTy() int32

func (*GameAction) GetValue

func (m *GameAction) GetValue() isGameAction_Value

func (*GameAction) ProtoMessage

func (*GameAction) ProtoMessage()

func (*GameAction) Reset

func (m *GameAction) Reset()

func (*GameAction) String

func (m *GameAction) String() string

func (*GameAction) XXX_DiscardUnknown

func (m *GameAction) XXX_DiscardUnknown()

func (*GameAction) XXX_Marshal

func (m *GameAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GameAction) XXX_Merge

func (m *GameAction) XXX_Merge(src proto.Message)

func (*GameAction) XXX_OneofWrappers

func (*GameAction) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*GameAction) XXX_Size

func (m *GameAction) XXX_Size() int

func (*GameAction) XXX_Unmarshal

func (m *GameAction) XXX_Unmarshal(b []byte) error

type GameAction_Cancel

type GameAction_Cancel struct {
	Cancel *GameCancel `protobuf:"bytes,2,opt,name=cancel,proto3,oneof"`
}

type GameAction_Close

type GameAction_Close struct {
	Close *GameClose `protobuf:"bytes,3,opt,name=close,proto3,oneof"`
}

type GameAction_Create

type GameAction_Create struct {
	Create *GameCreate `protobuf:"bytes,1,opt,name=create,proto3,oneof"`
}

type GameAction_Match

type GameAction_Match struct {
	Match *GameMatch `protobuf:"bytes,4,opt,name=match,proto3,oneof"`
}

type GameCancel

type GameCancel struct {
	GameId               string   `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GameCancel) Descriptor

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

func (*GameCancel) GetGameId

func (m *GameCancel) GetGameId() string

func (*GameCancel) ProtoMessage

func (*GameCancel) ProtoMessage()

func (*GameCancel) Reset

func (m *GameCancel) Reset()

func (*GameCancel) String

func (m *GameCancel) String() string

func (*GameCancel) XXX_DiscardUnknown

func (m *GameCancel) XXX_DiscardUnknown()

func (*GameCancel) XXX_Marshal

func (m *GameCancel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GameCancel) XXX_Merge

func (m *GameCancel) XXX_Merge(src proto.Message)

func (*GameCancel) XXX_Size

func (m *GameCancel) XXX_Size() int

func (*GameCancel) XXX_Unmarshal

func (m *GameCancel) XXX_Unmarshal(b []byte) error

type GameClose

type GameClose struct {
	GameId               string   `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	Secret               string   `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GameClose) Descriptor

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

func (*GameClose) GetGameId

func (m *GameClose) GetGameId() string

func (*GameClose) GetSecret

func (m *GameClose) GetSecret() string

func (*GameClose) ProtoMessage

func (*GameClose) ProtoMessage()

func (*GameClose) Reset

func (m *GameClose) Reset()

func (*GameClose) String

func (m *GameClose) String() string

func (*GameClose) XXX_DiscardUnknown

func (m *GameClose) XXX_DiscardUnknown()

func (*GameClose) XXX_Marshal

func (m *GameClose) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GameClose) XXX_Merge

func (m *GameClose) XXX_Merge(src proto.Message)

func (*GameClose) XXX_Size

func (m *GameClose) XXX_Size() int

func (*GameClose) XXX_Unmarshal

func (m *GameClose) XXX_Unmarshal(b []byte) error

type GameCreate

type GameCreate struct {
	Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	//加密用的算法
	HashType string `protobuf:"bytes,2,opt,name=hashType,proto3" json:"hashType,omitempty"`
	//加密后的值
	HashValue            []byte   `protobuf:"bytes,3,opt,name=hashValue,proto3" json:"hashValue,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GameCreate) Descriptor

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

func (*GameCreate) GetHashType

func (m *GameCreate) GetHashType() string

func (*GameCreate) GetHashValue

func (m *GameCreate) GetHashValue() []byte

func (*GameCreate) GetValue

func (m *GameCreate) GetValue() int64

func (*GameCreate) ProtoMessage

func (*GameCreate) ProtoMessage()

func (*GameCreate) Reset

func (m *GameCreate) Reset()

func (*GameCreate) String

func (m *GameCreate) String() string

func (*GameCreate) XXX_DiscardUnknown

func (m *GameCreate) XXX_DiscardUnknown()

func (*GameCreate) XXX_Marshal

func (m *GameCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GameCreate) XXX_Merge

func (m *GameCreate) XXX_Merge(src proto.Message)

func (*GameCreate) XXX_Size

func (m *GameCreate) XXX_Size() int

func (*GameCreate) XXX_Unmarshal

func (m *GameCreate) XXX_Unmarshal(b []byte) error

type GameMatch

type GameMatch struct {
	GameId               string   `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	Guess                int32    `protobuf:"varint,2,opt,name=guess,proto3" json:"guess,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GameMatch) Descriptor

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

func (*GameMatch) GetGameId

func (m *GameMatch) GetGameId() string

func (*GameMatch) GetGuess

func (m *GameMatch) GetGuess() int32

func (*GameMatch) ProtoMessage

func (*GameMatch) ProtoMessage()

func (*GameMatch) Reset

func (m *GameMatch) Reset()

func (*GameMatch) String

func (m *GameMatch) String() string

func (*GameMatch) XXX_DiscardUnknown

func (m *GameMatch) XXX_DiscardUnknown()

func (*GameMatch) XXX_Marshal

func (m *GameMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GameMatch) XXX_Merge

func (m *GameMatch) XXX_Merge(src proto.Message)

func (*GameMatch) XXX_Size

func (m *GameMatch) XXX_Size() int

func (*GameMatch) XXX_Unmarshal

func (m *GameMatch) XXX_Unmarshal(b []byte) error

type GamePreCancelTx

type GamePreCancelTx struct {
	GameID string `json:"gameID"`
	Fee    int64  `json:"fee"`
}

GamePreCancelTx pre cancel tx,unused

type GamePreCloseTx

type GamePreCloseTx struct {
	GameID string `json:"gameID"`
	Secret string `json:"secret"`
	Result int32  `json:"result"`
	Fee    int64  `json:"fee"`
}

GamePreCloseTx pre close game, unused

type GamePreCreateTx

type GamePreCreateTx struct {
	//Secret     string `json:"secret"`
	//下注必须时偶数,不能时级数
	Amount int64 `json:"amount"`
	//暂时只支持sha256加密
	HashType  string `json:"hashType"`
	HashValue []byte `json:"hashValue,omitempty"`
	Fee       int64  `json:"fee"`
}

GamePreCreateTx pre create game,unused

type GamePreMatchTx

type GamePreMatchTx struct {
	GameID string `json:"gameID"`
	Guess  int32  `json:"guess"`
	Fee    int64  `json:"fee"`
}

GamePreMatchTx pre match game,unused

type GameRecord

type GameRecord 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

索引value值

func (*GameRecord) Descriptor

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

func (*GameRecord) GetGameId

func (m *GameRecord) GetGameId() string

func (*GameRecord) GetIndex

func (m *GameRecord) GetIndex() int64

func (*GameRecord) ProtoMessage

func (*GameRecord) ProtoMessage()

func (*GameRecord) Reset

func (m *GameRecord) Reset()

func (*GameRecord) String

func (m *GameRecord) String() string

func (*GameRecord) XXX_DiscardUnknown

func (m *GameRecord) XXX_DiscardUnknown()

func (*GameRecord) XXX_Marshal

func (m *GameRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GameRecord) XXX_Merge

func (m *GameRecord) XXX_Merge(src proto.Message)

func (*GameRecord) XXX_Size

func (m *GameRecord) XXX_Size() int

func (*GameRecord) XXX_Unmarshal

func (m *GameRecord) XXX_Unmarshal(b []byte) error

type GameType

type GameType struct {
	types.ExecTypeBase
}

GameType execType

func NewType

func NewType(cfg *types.Chain33Config) *GameType

NewType new type

func (GameType) CreateTx

func (gt GameType) CreateTx(action string, message json.RawMessage) (*types.Transaction, error)

CreateTx unused,just empty implementation

func (*GameType) GetLogMap

func (gt *GameType) GetLogMap() map[int64]*types.LogInfo

GetLogMap get log

func (*GameType) GetName

func (gt *GameType) GetName() string

GetName 获取执行器名称

func (*GameType) GetPayload

func (gt *GameType) GetPayload() types.Message

GetPayload get payload

func (*GameType) GetTypeMap

func (gt *GameType) GetTypeMap() map[string]int32

GetTypeMap get typeMap

type QueryGameInfo

type QueryGameInfo struct {
	GameId               string   `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*QueryGameInfo) Descriptor

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

func (*QueryGameInfo) GetGameId

func (m *QueryGameInfo) GetGameId() string

func (*QueryGameInfo) ProtoMessage

func (*QueryGameInfo) ProtoMessage()

func (*QueryGameInfo) Reset

func (m *QueryGameInfo) Reset()

func (*QueryGameInfo) String

func (m *QueryGameInfo) String() string

func (*QueryGameInfo) XXX_DiscardUnknown

func (m *QueryGameInfo) XXX_DiscardUnknown()

func (*QueryGameInfo) XXX_Marshal

func (m *QueryGameInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGameInfo) XXX_Merge

func (m *QueryGameInfo) XXX_Merge(src proto.Message)

func (*QueryGameInfo) XXX_Size

func (m *QueryGameInfo) XXX_Size() int

func (*QueryGameInfo) XXX_Unmarshal

func (m *QueryGameInfo) XXX_Unmarshal(b []byte) error

type QueryGameInfos

type QueryGameInfos struct {
	GameIds              []string `protobuf:"bytes,1,rep,name=gameIds,proto3" json:"gameIds,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*QueryGameInfos) Descriptor

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

func (*QueryGameInfos) GetGameIds

func (m *QueryGameInfos) GetGameIds() []string

func (*QueryGameInfos) ProtoMessage

func (*QueryGameInfos) ProtoMessage()

func (*QueryGameInfos) Reset

func (m *QueryGameInfos) Reset()

func (*QueryGameInfos) String

func (m *QueryGameInfos) String() string

func (*QueryGameInfos) XXX_DiscardUnknown

func (m *QueryGameInfos) XXX_DiscardUnknown()

func (*QueryGameInfos) XXX_Marshal

func (m *QueryGameInfos) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGameInfos) XXX_Merge

func (m *QueryGameInfos) XXX_Merge(src proto.Message)

func (*QueryGameInfos) XXX_Size

func (m *QueryGameInfos) XXX_Size() int

func (*QueryGameInfos) XXX_Unmarshal

func (m *QueryGameInfos) XXX_Unmarshal(b []byte) error

type QueryGameListByStatusAndAddr

type QueryGameListByStatusAndAddr struct {
	//优先根据status查询,status不可为空
	Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	//二级搜索,如果要查询一个地址下的所有game信息,可以根据status,分多次查询,这样规避存储数据时的臃余情况
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// 索引值
	Index int64 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
	//单页返回多少条记录,默认返回20条,单次最多返回100条
	Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
	// 0降序,1升序,默认降序
	Direction            int32    `protobuf:"varint,5,opt,name=direction,proto3" json:"direction,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

queryByAddr 和 queryByStatus共用同一个结构体

func (*QueryGameListByStatusAndAddr) Descriptor

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

func (*QueryGameListByStatusAndAddr) GetAddress

func (m *QueryGameListByStatusAndAddr) GetAddress() string

func (*QueryGameListByStatusAndAddr) GetCount

func (m *QueryGameListByStatusAndAddr) GetCount() int32

func (*QueryGameListByStatusAndAddr) GetDirection

func (m *QueryGameListByStatusAndAddr) GetDirection() int32

func (*QueryGameListByStatusAndAddr) GetIndex

func (m *QueryGameListByStatusAndAddr) GetIndex() int64

func (*QueryGameListByStatusAndAddr) GetStatus

func (m *QueryGameListByStatusAndAddr) GetStatus() int32

func (*QueryGameListByStatusAndAddr) ProtoMessage

func (*QueryGameListByStatusAndAddr) ProtoMessage()

func (*QueryGameListByStatusAndAddr) Reset

func (m *QueryGameListByStatusAndAddr) Reset()

func (*QueryGameListByStatusAndAddr) String

func (*QueryGameListByStatusAndAddr) XXX_DiscardUnknown

func (m *QueryGameListByStatusAndAddr) XXX_DiscardUnknown()

func (*QueryGameListByStatusAndAddr) XXX_Marshal

func (m *QueryGameListByStatusAndAddr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGameListByStatusAndAddr) XXX_Merge

func (m *QueryGameListByStatusAndAddr) XXX_Merge(src proto.Message)

func (*QueryGameListByStatusAndAddr) XXX_Size

func (m *QueryGameListByStatusAndAddr) XXX_Size() int

func (*QueryGameListByStatusAndAddr) XXX_Unmarshal

func (m *QueryGameListByStatusAndAddr) XXX_Unmarshal(b []byte) error

type QueryGameListCount

type QueryGameListCount struct {
	//优先根据status查询,status不可为空
	Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	//二级搜索,如果要查询一个地址下的所有game信息,可以根据status,分多次查询,这样规避存储数据时的臃余情况
	Address              string   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

统计数量

func (*QueryGameListCount) Descriptor

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

func (*QueryGameListCount) GetAddress

func (m *QueryGameListCount) GetAddress() string

func (*QueryGameListCount) GetStatus

func (m *QueryGameListCount) GetStatus() int32

func (*QueryGameListCount) ProtoMessage

func (*QueryGameListCount) ProtoMessage()

func (*QueryGameListCount) Reset

func (m *QueryGameListCount) Reset()

func (*QueryGameListCount) String

func (m *QueryGameListCount) String() string

func (*QueryGameListCount) XXX_DiscardUnknown

func (m *QueryGameListCount) XXX_DiscardUnknown()

func (*QueryGameListCount) XXX_Marshal

func (m *QueryGameListCount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGameListCount) XXX_Merge

func (m *QueryGameListCount) XXX_Merge(src proto.Message)

func (*QueryGameListCount) XXX_Size

func (m *QueryGameListCount) XXX_Size() int

func (*QueryGameListCount) XXX_Unmarshal

func (m *QueryGameListCount) XXX_Unmarshal(b []byte) error

type ReceiptGame

type ReceiptGame 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"`
	//记录上一次状态
	PrevStatus           int32    `protobuf:"varint,3,opt,name=prevStatus,proto3" json:"prevStatus,omitempty"`
	Addr                 string   `protobuf:"bytes,4,opt,name=addr,proto3" json:"addr,omitempty"`
	CreateAddr           string   `protobuf:"bytes,5,opt,name=createAddr,proto3" json:"createAddr,omitempty"`
	MatchAddr            string   `protobuf:"bytes,6,opt,name=matchAddr,proto3" json:"matchAddr,omitempty"`
	Index                int64    `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"`
	PrevIndex            int64    `protobuf:"varint,8,opt,name=prevIndex,proto3" json:"prevIndex,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReceiptGame) Descriptor

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

func (*ReceiptGame) GetAddr

func (m *ReceiptGame) GetAddr() string

func (*ReceiptGame) GetCreateAddr

func (m *ReceiptGame) GetCreateAddr() string

func (*ReceiptGame) GetGameId

func (m *ReceiptGame) GetGameId() string

func (*ReceiptGame) GetIndex

func (m *ReceiptGame) GetIndex() int64

func (*ReceiptGame) GetMatchAddr

func (m *ReceiptGame) GetMatchAddr() string

func (*ReceiptGame) GetPrevIndex

func (m *ReceiptGame) GetPrevIndex() int64

func (*ReceiptGame) GetPrevStatus

func (m *ReceiptGame) GetPrevStatus() int32

func (*ReceiptGame) GetStatus

func (m *ReceiptGame) GetStatus() int32

func (*ReceiptGame) ProtoMessage

func (*ReceiptGame) ProtoMessage()

func (*ReceiptGame) Reset

func (m *ReceiptGame) Reset()

func (*ReceiptGame) String

func (m *ReceiptGame) String() string

func (*ReceiptGame) XXX_DiscardUnknown

func (m *ReceiptGame) XXX_DiscardUnknown()

func (*ReceiptGame) XXX_Marshal

func (m *ReceiptGame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReceiptGame) XXX_Merge

func (m *ReceiptGame) XXX_Merge(src proto.Message)

func (*ReceiptGame) XXX_Size

func (m *ReceiptGame) XXX_Size() int

func (*ReceiptGame) XXX_Unmarshal

func (m *ReceiptGame) XXX_Unmarshal(b []byte) error

type ReplyGame

type ReplyGame struct {
	Game                 *Game    `protobuf:"bytes,1,opt,name=game,proto3" json:"game,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReplyGame) Descriptor

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

func (*ReplyGame) GetGame

func (m *ReplyGame) GetGame() *Game

func (*ReplyGame) ProtoMessage

func (*ReplyGame) ProtoMessage()

func (*ReplyGame) Reset

func (m *ReplyGame) Reset()

func (*ReplyGame) String

func (m *ReplyGame) String() string

func (*ReplyGame) XXX_DiscardUnknown

func (m *ReplyGame) XXX_DiscardUnknown()

func (*ReplyGame) XXX_Marshal

func (m *ReplyGame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReplyGame) XXX_Merge

func (m *ReplyGame) XXX_Merge(src proto.Message)

func (*ReplyGame) XXX_Size

func (m *ReplyGame) XXX_Size() int

func (*ReplyGame) XXX_Unmarshal

func (m *ReplyGame) XXX_Unmarshal(b []byte) error

type ReplyGameList

type ReplyGameList struct {
	Games                []*Game  `protobuf:"bytes,1,rep,name=games,proto3" json:"games,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReplyGameList) Descriptor

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

func (*ReplyGameList) GetGames

func (m *ReplyGameList) GetGames() []*Game

func (*ReplyGameList) ProtoMessage

func (*ReplyGameList) ProtoMessage()

func (*ReplyGameList) Reset

func (m *ReplyGameList) Reset()

func (*ReplyGameList) String

func (m *ReplyGameList) String() string

func (*ReplyGameList) XXX_DiscardUnknown

func (m *ReplyGameList) XXX_DiscardUnknown()

func (*ReplyGameList) XXX_Marshal

func (m *ReplyGameList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReplyGameList) XXX_Merge

func (m *ReplyGameList) XXX_Merge(src proto.Message)

func (*ReplyGameList) XXX_Size

func (m *ReplyGameList) XXX_Size() int

func (*ReplyGameList) XXX_Unmarshal

func (m *ReplyGameList) XXX_Unmarshal(b []byte) error

type ReplyGameListCount

type ReplyGameListCount struct {
	Count                int64    `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReplyGameListCount) Descriptor

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

func (*ReplyGameListCount) GetCount

func (m *ReplyGameListCount) GetCount() int64

func (*ReplyGameListCount) ProtoMessage

func (*ReplyGameListCount) ProtoMessage()

func (*ReplyGameListCount) Reset

func (m *ReplyGameListCount) Reset()

func (*ReplyGameListCount) String

func (m *ReplyGameListCount) String() string

func (*ReplyGameListCount) XXX_DiscardUnknown

func (m *ReplyGameListCount) XXX_DiscardUnknown()

func (*ReplyGameListCount) XXX_Marshal

func (m *ReplyGameListCount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReplyGameListCount) XXX_Merge

func (m *ReplyGameListCount) XXX_Merge(src proto.Message)

func (*ReplyGameListCount) XXX_Size

func (m *ReplyGameListCount) XXX_Size() int

func (*ReplyGameListCount) XXX_Unmarshal

func (m *ReplyGameListCount) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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