types

package
v0.0.0-...-0abe6a2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

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

	GuessGameActionStart = iota + 1
	GuessGameActionBet
	GuessGameActionStopBet
	GuessGameActionAbort
	GuessGameActionPublish
	GuessGameActionQuery

	GuessGameStatusStart = iota + 1
	GuessGameStatusBet
	GuessGameStatusStopBet
	GuessGameStatusAbort
	GuessGameStatusPublish
	GuessGameStatusTimeOut
)

game action ty

View Source
const (
	TyLogGuessGameStart   = 901
	TyLogGuessGameBet     = 902
	TyLogGuessGameStopBet = 903
	TyLogGuessGameAbort   = 904
	TyLogGuessGamePublish = 905
	TyLogGuessGameTimeout = 906
)

game log ty

View Source
const (
	//FuncNameQueryGamesByIDs func name
	FuncNameQueryGamesByIDs = "QueryGamesByIDs"

	//FuncNameQueryGameByID func name
	FuncNameQueryGameByID = "QueryGameByID"

	//FuncNameQueryGameByAddr func name
	FuncNameQueryGameByAddr = "QueryGamesByAddr"

	//FuncNameQueryGameByStatus func name
	FuncNameQueryGameByStatus = "QueryGamesByStatus"

	//FuncNameQueryGameByAdminAddr func name
	FuncNameQueryGameByAdminAddr = "QueryGamesByAdminAddr"

	//FuncNameQueryGameByAddrStatus func name
	FuncNameQueryGameByAddrStatus = "QueryGamesByAddrStatus"

	//FuncNameQueryGameByAdminStatus func name
	FuncNameQueryGameByAdminStatus = "QueryGamesByAdminStatus"

	//FuncNameQueryGameByCategoryStatus func name
	FuncNameQueryGameByCategoryStatus = "QueryGamesByCategoryStatus"

	//CreateStartTx 创建开始交易
	CreateStartTx = "Start"

	//CreateBetTx 创建下注交易
	CreateBetTx = "Bet"

	//CreateStopBetTx 创建停止下注交易
	CreateStopBetTx = "StopBet"

	//CreatePublishTx 创建公布结果交易
	CreatePublishTx = "Publish"

	//CreateAbortTx 创建撤销游戏交易
	CreateAbortTx = "Abort"
)
View Source
const (
	//DevShareAddr default value
	DevShareAddr = "1D6RFZNp2rh6QdbcZ1d7RWuBUz61We6SD7"

	//PlatformShareAddr default value
	PlatformShareAddr = "1PHtChNt3UcfssR7v7trKSk3WJtAWjKjjX"
)

Variables

View Source
var (
	GuessX      = "guess"
	ExecerGuess = []byte(GuessX)
)

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

View Source
var (
	ErrNoPrivilege              = errors.New("ErrNoPrivilege")
	ErrGuessStatus              = errors.New("ErrGuessStatus")
	ErrOverBetsLimit            = errors.New("ErrOverBetsLimit")
	ErrParamStatusInvalid       = errors.New("ErrParamStatusInvalid")
	ErrParamAddressMustnotEmpty = errors.New("ErrParamAddressMustnotEmpty")
	ErrGameNotExist             = errors.New("ErrGameNotExist")
	ErrSaveTable                = errors.New("ErrSaveTable")
)

Errors for lottery

Functions

func NewGuessGameTable

func NewGuessGameTable(kvdb db.KV) *table.Table

NewGuessGameTable 新建表

func NewGuessUserTable

func NewGuessUserTable(kvdb db.KV) *table.Table

NewGuessUserTable 新建表

func RegisterGuessServer

func RegisterGuessServer(s *grpc.Server, srv GuessServer)

Types

type GuessAbortTxReq

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

GuessAbortTxReq 构造abort交易的请求

func (*GuessAbortTxReq) Descriptor

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

func (*GuessAbortTxReq) GetFee

func (m *GuessAbortTxReq) GetFee() int64

func (*GuessAbortTxReq) GetGameID

func (m *GuessAbortTxReq) GetGameID() string

func (*GuessAbortTxReq) ProtoMessage

func (*GuessAbortTxReq) ProtoMessage()

func (*GuessAbortTxReq) Reset

func (m *GuessAbortTxReq) Reset()

func (*GuessAbortTxReq) String

func (m *GuessAbortTxReq) String() string

func (*GuessAbortTxReq) XXX_DiscardUnknown

func (m *GuessAbortTxReq) XXX_DiscardUnknown()

func (*GuessAbortTxReq) XXX_Marshal

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

func (*GuessAbortTxReq) XXX_Merge

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

func (*GuessAbortTxReq) XXX_Size

func (m *GuessAbortTxReq) XXX_Size() int

func (*GuessAbortTxReq) XXX_Unmarshal

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

type GuessBet

type GuessBet struct {
	Option               string   `protobuf:"bytes,1,opt,name=option,proto3" json:"option,omitempty"`
	BetsNumber           int64    `protobuf:"varint,2,opt,name=betsNumber,proto3" json:"betsNumber,omitempty"`
	IsWinner             bool     `protobuf:"varint,3,opt,name=isWinner,proto3" json:"isWinner,omitempty"`
	Profit               int64    `protobuf:"varint,4,opt,name=profit,proto3" json:"profit,omitempty"`
	Index                int64    `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
	PreIndex             int64    `protobuf:"varint,6,opt,name=preIndex,proto3" json:"preIndex,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GuessBet 竞猜下注信息

func (*GuessBet) Descriptor

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

func (*GuessBet) GetBetsNumber

func (m *GuessBet) GetBetsNumber() int64

func (*GuessBet) GetIndex

func (m *GuessBet) GetIndex() int64

func (*GuessBet) GetIsWinner

func (m *GuessBet) GetIsWinner() bool

func (*GuessBet) GetOption

func (m *GuessBet) GetOption() string

func (*GuessBet) GetPreIndex

func (m *GuessBet) GetPreIndex() int64

func (*GuessBet) GetProfit

func (m *GuessBet) GetProfit() int64

func (*GuessBet) ProtoMessage

func (*GuessBet) ProtoMessage()

func (*GuessBet) Reset

func (m *GuessBet) Reset()

func (*GuessBet) String

func (m *GuessBet) String() string

func (*GuessBet) XXX_DiscardUnknown

func (m *GuessBet) XXX_DiscardUnknown()

func (*GuessBet) XXX_Marshal

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

func (*GuessBet) XXX_Merge

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

func (*GuessBet) XXX_Size

func (m *GuessBet) XXX_Size() int

func (*GuessBet) XXX_Unmarshal

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

type GuessBetStat

type GuessBetStat struct {
	TotalBetTimes        int64               `protobuf:"varint,1,opt,name=totalBetTimes,proto3" json:"totalBetTimes,omitempty"`
	TotalBetsNumber      int64               `protobuf:"varint,2,opt,name=totalBetsNumber,proto3" json:"totalBetsNumber,omitempty"`
	Items                []*GuessBetStatItem `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

GuessBetStat 竞猜下注统计信息

func (*GuessBetStat) Descriptor

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

func (*GuessBetStat) GetItems

func (m *GuessBetStat) GetItems() []*GuessBetStatItem

func (*GuessBetStat) GetTotalBetTimes

func (m *GuessBetStat) GetTotalBetTimes() int64

func (*GuessBetStat) GetTotalBetsNumber

func (m *GuessBetStat) GetTotalBetsNumber() int64

func (*GuessBetStat) ProtoMessage

func (*GuessBetStat) ProtoMessage()

func (*GuessBetStat) Reset

func (m *GuessBetStat) Reset()

func (*GuessBetStat) String

func (m *GuessBetStat) String() string

func (*GuessBetStat) XXX_DiscardUnknown

func (m *GuessBetStat) XXX_DiscardUnknown()

func (*GuessBetStat) XXX_Marshal

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

func (*GuessBetStat) XXX_Merge

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

func (*GuessBetStat) XXX_Size

func (m *GuessBetStat) XXX_Size() int

func (*GuessBetStat) XXX_Unmarshal

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

type GuessBetStatItem

type GuessBetStatItem struct {
	Option               string   `protobuf:"bytes,1,opt,name=option,proto3" json:"option,omitempty"`
	BetsNumber           int64    `protobuf:"varint,2,opt,name=betsNumber,proto3" json:"betsNumber,omitempty"`
	BetsTimes            int64    `protobuf:"varint,3,opt,name=betsTimes,proto3" json:"betsTimes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GuessBetStat 竞猜下注子选项统计信息

func (*GuessBetStatItem) Descriptor

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

func (*GuessBetStatItem) GetBetsNumber

func (m *GuessBetStatItem) GetBetsNumber() int64

func (*GuessBetStatItem) GetBetsTimes

func (m *GuessBetStatItem) GetBetsTimes() int64

func (*GuessBetStatItem) GetOption

func (m *GuessBetStatItem) GetOption() string

func (*GuessBetStatItem) ProtoMessage

func (*GuessBetStatItem) ProtoMessage()

func (*GuessBetStatItem) Reset

func (m *GuessBetStatItem) Reset()

func (*GuessBetStatItem) String

func (m *GuessBetStatItem) String() string

func (*GuessBetStatItem) XXX_DiscardUnknown

func (m *GuessBetStatItem) XXX_DiscardUnknown()

func (*GuessBetStatItem) XXX_Marshal

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

func (*GuessBetStatItem) XXX_Merge

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

func (*GuessBetStatItem) XXX_Size

func (m *GuessBetStatItem) XXX_Size() int

func (*GuessBetStatItem) XXX_Unmarshal

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

type GuessBetTxReq

type GuessBetTxReq struct {
	GameID               string   `protobuf:"bytes,1,opt,name=gameID,proto3" json:"gameID,omitempty"`
	Option               string   `protobuf:"bytes,2,opt,name=option,proto3" json:"option,omitempty"`
	Bets                 int64    `protobuf:"varint,3,opt,name=bets,proto3" json:"bets,omitempty"`
	Fee                  int64    `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GuessBetTxReq 构造bet交易的请求

func (*GuessBetTxReq) Descriptor

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

func (*GuessBetTxReq) GetBets

func (m *GuessBetTxReq) GetBets() int64

func (*GuessBetTxReq) GetFee

func (m *GuessBetTxReq) GetFee() int64

func (*GuessBetTxReq) GetGameID

func (m *GuessBetTxReq) GetGameID() string

func (*GuessBetTxReq) GetOption

func (m *GuessBetTxReq) GetOption() string

func (*GuessBetTxReq) ProtoMessage

func (*GuessBetTxReq) ProtoMessage()

func (*GuessBetTxReq) Reset

func (m *GuessBetTxReq) Reset()

func (*GuessBetTxReq) String

func (m *GuessBetTxReq) String() string

func (*GuessBetTxReq) XXX_DiscardUnknown

func (m *GuessBetTxReq) XXX_DiscardUnknown()

func (*GuessBetTxReq) XXX_Marshal

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

func (*GuessBetTxReq) XXX_Merge

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

func (*GuessBetTxReq) XXX_Size

func (m *GuessBetTxReq) XXX_Size() int

func (*GuessBetTxReq) XXX_Unmarshal

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

type GuessClient

type GuessClient interface {
	//游戏开始
	GuessStart(ctx context.Context, in *GuessGameStart, opts ...grpc.CallOption) (*types.UnsignTx, error)
	//游戏下注
	GuessBet(ctx context.Context, in *GuessGameBet, opts ...grpc.CallOption) (*types.UnsignTx, error)
	//游戏终止下注
	GuessStopBet(ctx context.Context, in *GuessGameStopBet, opts ...grpc.CallOption) (*types.UnsignTx, error)
	//游戏异常终止
	GuessAbort(ctx context.Context, in *GuessGameAbort, opts ...grpc.CallOption) (*types.UnsignTx, error)
	//游戏结束
	GuessPublish(ctx context.Context, in *GuessGamePublish, opts ...grpc.CallOption) (*types.UnsignTx, error)
}

GuessClient is the client API for Guess service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGuessClient

func NewGuessClient(cc *grpc.ClientConn) GuessClient

type GuessGame

type GuessGame 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"`
	PreStatus            int32          `protobuf:"varint,3,opt,name=preStatus,proto3" json:"preStatus,omitempty"`
	StartTime            int64          `protobuf:"varint,4,opt,name=startTime,proto3" json:"startTime,omitempty"`
	StartHeight          int64          `protobuf:"varint,5,opt,name=startHeight,proto3" json:"startHeight,omitempty"`
	StartTxHash          string         `protobuf:"bytes,6,opt,name=startTxHash,proto3" json:"startTxHash,omitempty"`
	StartIndex           int64          `protobuf:"varint,7,opt,name=startIndex,proto3" json:"startIndex,omitempty"`
	Topic                string         `protobuf:"bytes,8,opt,name=topic,proto3" json:"topic,omitempty"`
	Category             string         `protobuf:"bytes,9,opt,name=category,proto3" json:"category,omitempty"`
	Options              string         `protobuf:"bytes,10,opt,name=options,proto3" json:"options,omitempty"`
	MaxBetHeight         int64          `protobuf:"varint,11,opt,name=maxBetHeight,proto3" json:"maxBetHeight,omitempty"`
	MaxBetsOneTime       int64          `protobuf:"varint,12,opt,name=maxBetsOneTime,proto3" json:"maxBetsOneTime,omitempty"`
	MaxBetsNumber        int64          `protobuf:"varint,13,opt,name=maxBetsNumber,proto3" json:"maxBetsNumber,omitempty"`
	DevFeeFactor         int64          `protobuf:"varint,14,opt,name=devFeeFactor,proto3" json:"devFeeFactor,omitempty"`
	DevFeeAddr           string         `protobuf:"bytes,15,opt,name=devFeeAddr,proto3" json:"devFeeAddr,omitempty"`
	PlatFeeFactor        int64          `protobuf:"varint,16,opt,name=platFeeFactor,proto3" json:"platFeeFactor,omitempty"`
	PlatFeeAddr          string         `protobuf:"bytes,17,opt,name=platFeeAddr,proto3" json:"platFeeAddr,omitempty"`
	ExpireHeight         int64          `protobuf:"varint,18,opt,name=expireHeight,proto3" json:"expireHeight,omitempty"`
	AdminAddr            string         `protobuf:"bytes,19,opt,name=adminAddr,proto3" json:"adminAddr,omitempty"`
	BetsNumber           int64          `protobuf:"varint,20,opt,name=betsNumber,proto3" json:"betsNumber,omitempty"`
	Plays                []*GuessPlayer `protobuf:"bytes,21,rep,name=plays,proto3" json:"plays,omitempty"`
	Result               string         `protobuf:"bytes,22,opt,name=result,proto3" json:"result,omitempty"`
	BetStat              *GuessBetStat  `protobuf:"bytes,23,opt,name=betStat,proto3" json:"betStat,omitempty"`
	Index                int64          `protobuf:"varint,24,opt,name=index,proto3" json:"index,omitempty"`
	PreIndex             int64          `protobuf:"varint,25,opt,name=preIndex,proto3" json:"preIndex,omitempty"`
	DrivenByAdmin        bool           `protobuf:"varint,26,opt,name=drivenByAdmin,proto3" json:"drivenByAdmin,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

GuessGame 竞猜游戏详情

func (*GuessGame) Descriptor

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

func (*GuessGame) GetAdminAddr

func (m *GuessGame) GetAdminAddr() string

func (*GuessGame) GetBetStat

func (m *GuessGame) GetBetStat() *GuessBetStat

func (*GuessGame) GetBetsNumber

func (m *GuessGame) GetBetsNumber() int64

func (*GuessGame) GetCategory

func (m *GuessGame) GetCategory() string

func (*GuessGame) GetDevFeeAddr

func (m *GuessGame) GetDevFeeAddr() string

func (*GuessGame) GetDevFeeFactor

func (m *GuessGame) GetDevFeeFactor() int64

func (*GuessGame) GetDrivenByAdmin

func (m *GuessGame) GetDrivenByAdmin() bool

func (*GuessGame) GetExpireHeight

func (m *GuessGame) GetExpireHeight() int64

func (*GuessGame) GetGameID

func (m *GuessGame) GetGameID() string

func (*GuessGame) GetIndex

func (m *GuessGame) GetIndex() int64

func (*GuessGame) GetMaxBetHeight

func (m *GuessGame) GetMaxBetHeight() int64

func (*GuessGame) GetMaxBetsNumber

func (m *GuessGame) GetMaxBetsNumber() int64

func (*GuessGame) GetMaxBetsOneTime

func (m *GuessGame) GetMaxBetsOneTime() int64

func (*GuessGame) GetOptions

func (m *GuessGame) GetOptions() string

func (*GuessGame) GetPlatFeeAddr

func (m *GuessGame) GetPlatFeeAddr() string

func (*GuessGame) GetPlatFeeFactor

func (m *GuessGame) GetPlatFeeFactor() int64

func (*GuessGame) GetPlays

func (m *GuessGame) GetPlays() []*GuessPlayer

func (*GuessGame) GetPreIndex

func (m *GuessGame) GetPreIndex() int64

func (*GuessGame) GetPreStatus

func (m *GuessGame) GetPreStatus() int32

func (*GuessGame) GetResult

func (m *GuessGame) GetResult() string

func (*GuessGame) GetStartHeight

func (m *GuessGame) GetStartHeight() int64

func (*GuessGame) GetStartIndex

func (m *GuessGame) GetStartIndex() int64

func (*GuessGame) GetStartTime

func (m *GuessGame) GetStartTime() int64

func (*GuessGame) GetStartTxHash

func (m *GuessGame) GetStartTxHash() string

func (*GuessGame) GetStatus

func (m *GuessGame) GetStatus() int32

func (*GuessGame) GetTopic

func (m *GuessGame) GetTopic() string

func (*GuessGame) ProtoMessage

func (*GuessGame) ProtoMessage()

func (*GuessGame) Reset

func (m *GuessGame) Reset()

func (*GuessGame) String

func (m *GuessGame) String() string

func (*GuessGame) XXX_DiscardUnknown

func (m *GuessGame) XXX_DiscardUnknown()

func (*GuessGame) XXX_Marshal

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

func (*GuessGame) XXX_Merge

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

func (*GuessGame) XXX_Size

func (m *GuessGame) XXX_Size() int

func (*GuessGame) XXX_Unmarshal

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

type GuessGameAbort

type GuessGameAbort 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:"-"`
}

GuessGameAbort 游戏异常终止,退还下注

func (*GuessGameAbort) Descriptor

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

func (*GuessGameAbort) GetGameID

func (m *GuessGameAbort) GetGameID() string

func (*GuessGameAbort) ProtoMessage

func (*GuessGameAbort) ProtoMessage()

func (*GuessGameAbort) Reset

func (m *GuessGameAbort) Reset()

func (*GuessGameAbort) String

func (m *GuessGameAbort) String() string

func (*GuessGameAbort) XXX_DiscardUnknown

func (m *GuessGameAbort) XXX_DiscardUnknown()

func (*GuessGameAbort) XXX_Marshal

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

func (*GuessGameAbort) XXX_Merge

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

func (*GuessGameAbort) XXX_Size

func (m *GuessGameAbort) XXX_Size() int

func (*GuessGameAbort) XXX_Unmarshal

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

type GuessGameAction

type GuessGameAction struct {
	// Types that are valid to be assigned to Value:
	//	*GuessGameAction_Start
	//	*GuessGameAction_Bet
	//	*GuessGameAction_StopBet
	//	*GuessGameAction_Abort
	//	*GuessGameAction_Publish
	//	*GuessGameAction_Query
	Value                isGuessGameAction_Value `protobuf_oneof:"value"`
	Ty                   int32                   `protobuf:"varint,7,opt,name=ty,proto3" json:"ty,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

GuessGameAction 竞猜游戏动作

func (*GuessGameAction) Descriptor

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

func (*GuessGameAction) GetAbort

func (m *GuessGameAction) GetAbort() *GuessGameAbort

func (*GuessGameAction) GetBet

func (m *GuessGameAction) GetBet() *GuessGameBet

func (*GuessGameAction) GetPublish

func (m *GuessGameAction) GetPublish() *GuessGamePublish

func (*GuessGameAction) GetQuery

func (m *GuessGameAction) GetQuery() *GuessGameQuery

func (*GuessGameAction) GetStart

func (m *GuessGameAction) GetStart() *GuessGameStart

func (*GuessGameAction) GetStopBet

func (m *GuessGameAction) GetStopBet() *GuessGameStopBet

func (*GuessGameAction) GetTy

func (m *GuessGameAction) GetTy() int32

func (*GuessGameAction) GetValue

func (m *GuessGameAction) GetValue() isGuessGameAction_Value

func (*GuessGameAction) ProtoMessage

func (*GuessGameAction) ProtoMessage()

func (*GuessGameAction) Reset

func (m *GuessGameAction) Reset()

func (*GuessGameAction) String

func (m *GuessGameAction) String() string

func (*GuessGameAction) XXX_DiscardUnknown

func (m *GuessGameAction) XXX_DiscardUnknown()

func (*GuessGameAction) XXX_Marshal

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

func (*GuessGameAction) XXX_Merge

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

func (*GuessGameAction) XXX_OneofFuncs

func (*GuessGameAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*GuessGameAction) XXX_Size

func (m *GuessGameAction) XXX_Size() int

func (*GuessGameAction) XXX_Unmarshal

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

type GuessGameAction_Abort

type GuessGameAction_Abort struct {
	Abort *GuessGameAbort `protobuf:"bytes,4,opt,name=abort,proto3,oneof"`
}

type GuessGameAction_Bet

type GuessGameAction_Bet struct {
	Bet *GuessGameBet `protobuf:"bytes,2,opt,name=bet,proto3,oneof"`
}

type GuessGameAction_Publish

type GuessGameAction_Publish struct {
	Publish *GuessGamePublish `protobuf:"bytes,5,opt,name=publish,proto3,oneof"`
}

type GuessGameAction_Query

type GuessGameAction_Query struct {
	Query *GuessGameQuery `protobuf:"bytes,6,opt,name=query,proto3,oneof"`
}

type GuessGameAction_Start

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

type GuessGameAction_StopBet

type GuessGameAction_StopBet struct {
	StopBet *GuessGameStopBet `protobuf:"bytes,3,opt,name=stopBet,proto3,oneof"`
}

type GuessGameBet

type GuessGameBet struct {
	GameID               string   `protobuf:"bytes,1,opt,name=gameID,proto3" json:"gameID,omitempty"`
	Option               string   `protobuf:"bytes,2,opt,name=option,proto3" json:"option,omitempty"`
	BetsNum              int64    `protobuf:"varint,3,opt,name=betsNum,proto3" json:"betsNum,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GuessGameBet 参与游戏下注

func (*GuessGameBet) Descriptor

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

func (*GuessGameBet) GetBetsNum

func (m *GuessGameBet) GetBetsNum() int64

func (*GuessGameBet) GetGameID

func (m *GuessGameBet) GetGameID() string

func (*GuessGameBet) GetOption

func (m *GuessGameBet) GetOption() string

func (*GuessGameBet) ProtoMessage

func (*GuessGameBet) ProtoMessage()

func (*GuessGameBet) Reset

func (m *GuessGameBet) Reset()

func (*GuessGameBet) String

func (m *GuessGameBet) String() string

func (*GuessGameBet) XXX_DiscardUnknown

func (m *GuessGameBet) XXX_DiscardUnknown()

func (*GuessGameBet) XXX_Marshal

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

func (*GuessGameBet) XXX_Merge

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

func (*GuessGameBet) XXX_Size

func (m *GuessGameBet) XXX_Size() int

func (*GuessGameBet) XXX_Unmarshal

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

type GuessGamePublish

type GuessGamePublish struct {
	GameID               string   `protobuf:"bytes,1,opt,name=gameID,proto3" json:"gameID,omitempty"`
	Result               string   `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GuessGamePublish 游戏结果揭晓

func (*GuessGamePublish) Descriptor

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

func (*GuessGamePublish) GetGameID

func (m *GuessGamePublish) GetGameID() string

func (*GuessGamePublish) GetResult

func (m *GuessGamePublish) GetResult() string

func (*GuessGamePublish) ProtoMessage

func (*GuessGamePublish) ProtoMessage()

func (*GuessGamePublish) Reset

func (m *GuessGamePublish) Reset()

func (*GuessGamePublish) String

func (m *GuessGamePublish) String() string

func (*GuessGamePublish) XXX_DiscardUnknown

func (m *GuessGamePublish) XXX_DiscardUnknown()

func (*GuessGamePublish) XXX_Marshal

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

func (*GuessGamePublish) XXX_Merge

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

func (*GuessGamePublish) XXX_Size

func (m *GuessGamePublish) XXX_Size() int

func (*GuessGamePublish) XXX_Unmarshal

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

type GuessGameQuery

type GuessGameQuery struct {
	GameID               string   `protobuf:"bytes,1,opt,name=gameID,proto3" json:"gameID,omitempty"`
	Ty                   uint32   `protobuf:"varint,2,opt,name=ty,proto3" json:"ty,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GuessGameQuery 查询游戏结果

func (*GuessGameQuery) Descriptor

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

func (*GuessGameQuery) GetGameID

func (m *GuessGameQuery) GetGameID() string

func (*GuessGameQuery) GetTy

func (m *GuessGameQuery) GetTy() uint32

func (*GuessGameQuery) ProtoMessage

func (*GuessGameQuery) ProtoMessage()

func (*GuessGameQuery) Reset

func (m *GuessGameQuery) Reset()

func (*GuessGameQuery) String

func (m *GuessGameQuery) String() string

func (*GuessGameQuery) XXX_DiscardUnknown

func (m *GuessGameQuery) XXX_DiscardUnknown()

func (*GuessGameQuery) XXX_Marshal

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

func (*GuessGameQuery) XXX_Merge

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

func (*GuessGameQuery) XXX_Size

func (m *GuessGameQuery) XXX_Size() int

func (*GuessGameQuery) XXX_Unmarshal

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

type GuessGameRecord

type GuessGameRecord struct {
	GameID               string   `protobuf:"bytes,1,opt,name=gameID,proto3" json:"gameID,omitempty"`
	StartIndex           int64    `protobuf:"varint,2,opt,name=startIndex,proto3" json:"startIndex,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GuessGameRecord game信息查询记录

func (*GuessGameRecord) Descriptor

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

func (*GuessGameRecord) GetGameID

func (m *GuessGameRecord) GetGameID() string

func (*GuessGameRecord) GetStartIndex

func (m *GuessGameRecord) GetStartIndex() int64

func (*GuessGameRecord) ProtoMessage

func (*GuessGameRecord) ProtoMessage()

func (*GuessGameRecord) Reset

func (m *GuessGameRecord) Reset()

func (*GuessGameRecord) String

func (m *GuessGameRecord) String() string

func (*GuessGameRecord) XXX_DiscardUnknown

func (m *GuessGameRecord) XXX_DiscardUnknown()

func (*GuessGameRecord) XXX_Marshal

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

func (*GuessGameRecord) XXX_Merge

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

func (*GuessGameRecord) XXX_Size

func (m *GuessGameRecord) XXX_Size() int

func (*GuessGameRecord) XXX_Unmarshal

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

type GuessGameRecords

type GuessGameRecords struct {
	Records              []*GuessGameRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	PrimaryKey           string             `protobuf:"bytes,2,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

GuessGameRecords game信息查询记录集

func (*GuessGameRecords) Descriptor

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

func (*GuessGameRecords) GetPrimaryKey

func (m *GuessGameRecords) GetPrimaryKey() string

func (*GuessGameRecords) GetRecords

func (m *GuessGameRecords) GetRecords() []*GuessGameRecord

func (*GuessGameRecords) ProtoMessage

func (*GuessGameRecords) ProtoMessage()

func (*GuessGameRecords) Reset

func (m *GuessGameRecords) Reset()

func (*GuessGameRecords) String

func (m *GuessGameRecords) String() string

func (*GuessGameRecords) XXX_DiscardUnknown

func (m *GuessGameRecords) XXX_DiscardUnknown()

func (*GuessGameRecords) XXX_Marshal

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

func (*GuessGameRecords) XXX_Merge

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

func (*GuessGameRecords) XXX_Size

func (m *GuessGameRecords) XXX_Size() int

func (*GuessGameRecords) XXX_Unmarshal

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

type GuessGameRow

type GuessGameRow struct {
	*GuessGame
}

GuessGameRow table meta 结构

func NewGuessGameRow

func NewGuessGameRow() *GuessGameRow

NewGuessGameRow 新建一个meta 结构

func (*GuessGameRow) CreateRow

func (tx *GuessGameRow) CreateRow() *table.Row

CreateRow 新建数据行(注意index 数据一定也要保存到数据中,不能就保存eventid)

func (*GuessGameRow) Get

func (tx *GuessGameRow) Get(key string) ([]byte, error)

Get 按照indexName 查询 indexValue

func (*GuessGameRow) SetPayload

func (tx *GuessGameRow) SetPayload(data types.Message) error

SetPayload 设置数据

type GuessGameStart

type GuessGameStart struct {
	Topic                string   `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Options              string   `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	Category             string   `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"`
	MaxBetHeight         int64    `protobuf:"varint,4,opt,name=maxBetHeight,proto3" json:"maxBetHeight,omitempty"`
	MaxBetsOneTime       int64    `protobuf:"varint,5,opt,name=maxBetsOneTime,proto3" json:"maxBetsOneTime,omitempty"`
	MaxBetsNumber        int64    `protobuf:"varint,6,opt,name=maxBetsNumber,proto3" json:"maxBetsNumber,omitempty"`
	DevFeeFactor         int64    `protobuf:"varint,7,opt,name=devFeeFactor,proto3" json:"devFeeFactor,omitempty"`
	DevFeeAddr           string   `protobuf:"bytes,8,opt,name=devFeeAddr,proto3" json:"devFeeAddr,omitempty"`
	PlatFeeFactor        int64    `protobuf:"varint,9,opt,name=platFeeFactor,proto3" json:"platFeeFactor,omitempty"`
	PlatFeeAddr          string   `protobuf:"bytes,10,opt,name=platFeeAddr,proto3" json:"platFeeAddr,omitempty"`
	ExpireHeight         int64    `protobuf:"varint,11,opt,name=expireHeight,proto3" json:"expireHeight,omitempty"`
	DrivenByAdmin        bool     `protobuf:"varint,12,opt,name=drivenByAdmin,proto3" json:"drivenByAdmin,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GuessGameStart 游戏创建

func (*GuessGameStart) Descriptor

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

func (*GuessGameStart) GetCategory

func (m *GuessGameStart) GetCategory() string

func (*GuessGameStart) GetDevFeeAddr

func (m *GuessGameStart) GetDevFeeAddr() string

func (*GuessGameStart) GetDevFeeFactor

func (m *GuessGameStart) GetDevFeeFactor() int64

func (*GuessGameStart) GetDrivenByAdmin

func (m *GuessGameStart) GetDrivenByAdmin() bool

func (*GuessGameStart) GetExpireHeight

func (m *GuessGameStart) GetExpireHeight() int64

func (*GuessGameStart) GetMaxBetHeight

func (m *GuessGameStart) GetMaxBetHeight() int64

func (*GuessGameStart) GetMaxBetsNumber

func (m *GuessGameStart) GetMaxBetsNumber() int64

func (*GuessGameStart) GetMaxBetsOneTime

func (m *GuessGameStart) GetMaxBetsOneTime() int64

func (*GuessGameStart) GetOptions

func (m *GuessGameStart) GetOptions() string

func (*GuessGameStart) GetPlatFeeAddr

func (m *GuessGameStart) GetPlatFeeAddr() string

func (*GuessGameStart) GetPlatFeeFactor

func (m *GuessGameStart) GetPlatFeeFactor() int64

func (*GuessGameStart) GetTopic

func (m *GuessGameStart) GetTopic() string

func (*GuessGameStart) ProtoMessage

func (*GuessGameStart) ProtoMessage()

func (*GuessGameStart) Reset

func (m *GuessGameStart) Reset()

func (*GuessGameStart) String

func (m *GuessGameStart) String() string

func (*GuessGameStart) XXX_DiscardUnknown

func (m *GuessGameStart) XXX_DiscardUnknown()

func (*GuessGameStart) XXX_Marshal

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

func (*GuessGameStart) XXX_Merge

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

func (*GuessGameStart) XXX_Size

func (m *GuessGameStart) XXX_Size() int

func (*GuessGameStart) XXX_Unmarshal

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

type GuessGameStopBet

type GuessGameStopBet 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:"-"`
}

GuessGameStopBet 游戏停止下注

func (*GuessGameStopBet) Descriptor

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

func (*GuessGameStopBet) GetGameID

func (m *GuessGameStopBet) GetGameID() string

func (*GuessGameStopBet) ProtoMessage

func (*GuessGameStopBet) ProtoMessage()

func (*GuessGameStopBet) Reset

func (m *GuessGameStopBet) Reset()

func (*GuessGameStopBet) String

func (m *GuessGameStopBet) String() string

func (*GuessGameStopBet) XXX_DiscardUnknown

func (m *GuessGameStopBet) XXX_DiscardUnknown()

func (*GuessGameStopBet) XXX_Marshal

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

func (*GuessGameStopBet) XXX_Merge

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

func (*GuessGameStopBet) XXX_Size

func (m *GuessGameStopBet) XXX_Size() int

func (*GuessGameStopBet) XXX_Unmarshal

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

type GuessPlayer

type GuessPlayer struct {
	Addr                 string    `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	Bet                  *GuessBet `protobuf:"bytes,2,opt,name=bet,proto3" json:"bet,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

GuessPlayer 竞猜玩家信息

func (*GuessPlayer) Descriptor

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

func (*GuessPlayer) GetAddr

func (m *GuessPlayer) GetAddr() string

func (*GuessPlayer) GetBet

func (m *GuessPlayer) GetBet() *GuessBet

func (*GuessPlayer) ProtoMessage

func (*GuessPlayer) ProtoMessage()

func (*GuessPlayer) Reset

func (m *GuessPlayer) Reset()

func (*GuessPlayer) String

func (m *GuessPlayer) String() string

func (*GuessPlayer) XXX_DiscardUnknown

func (m *GuessPlayer) XXX_DiscardUnknown()

func (*GuessPlayer) XXX_Marshal

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

func (*GuessPlayer) XXX_Merge

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

func (*GuessPlayer) XXX_Size

func (m *GuessPlayer) XXX_Size() int

func (*GuessPlayer) XXX_Unmarshal

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

type GuessPublishTxReq

type GuessPublishTxReq struct {
	GameID               string   `protobuf:"bytes,1,opt,name=gameID,proto3" json:"gameID,omitempty"`
	Result               string   `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	Fee                  int64    `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GuessPublishTxReq 构造publish交易的请求

func (*GuessPublishTxReq) Descriptor

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

func (*GuessPublishTxReq) GetFee

func (m *GuessPublishTxReq) GetFee() int64

func (*GuessPublishTxReq) GetGameID

func (m *GuessPublishTxReq) GetGameID() string

func (*GuessPublishTxReq) GetResult

func (m *GuessPublishTxReq) GetResult() string

func (*GuessPublishTxReq) ProtoMessage

func (*GuessPublishTxReq) ProtoMessage()

func (*GuessPublishTxReq) Reset

func (m *GuessPublishTxReq) Reset()

func (*GuessPublishTxReq) String

func (m *GuessPublishTxReq) String() string

func (*GuessPublishTxReq) XXX_DiscardUnknown

func (m *GuessPublishTxReq) XXX_DiscardUnknown()

func (*GuessPublishTxReq) XXX_Marshal

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

func (*GuessPublishTxReq) XXX_Merge

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

func (*GuessPublishTxReq) XXX_Size

func (m *GuessPublishTxReq) XXX_Size() int

func (*GuessPublishTxReq) XXX_Unmarshal

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

type GuessServer

type GuessServer interface {
	//游戏开始
	GuessStart(context.Context, *GuessGameStart) (*types.UnsignTx, error)
	//游戏下注
	GuessBet(context.Context, *GuessGameBet) (*types.UnsignTx, error)
	//游戏终止下注
	GuessStopBet(context.Context, *GuessGameStopBet) (*types.UnsignTx, error)
	//游戏异常终止
	GuessAbort(context.Context, *GuessGameAbort) (*types.UnsignTx, error)
	//游戏结束
	GuessPublish(context.Context, *GuessGamePublish) (*types.UnsignTx, error)
}

GuessServer is the server API for Guess service.

type GuessStartTxReq

type GuessStartTxReq struct {
	Topic                string   `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Options              string   `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	Category             string   `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"`
	MaxHeight            int64    `protobuf:"varint,4,opt,name=maxHeight,proto3" json:"maxHeight,omitempty"`
	MaxBetHeight         int64    `protobuf:"varint,5,opt,name=maxBetHeight,proto3" json:"maxBetHeight,omitempty"`
	MaxBetsOneTime       int64    `protobuf:"varint,6,opt,name=maxBetsOneTime,proto3" json:"maxBetsOneTime,omitempty"`
	MaxBetsNumber        int64    `protobuf:"varint,7,opt,name=maxBetsNumber,proto3" json:"maxBetsNumber,omitempty"`
	DevFeeFactor         int64    `protobuf:"varint,8,opt,name=devFeeFactor,proto3" json:"devFeeFactor,omitempty"`
	DevFeeAddr           string   `protobuf:"bytes,9,opt,name=devFeeAddr,proto3" json:"devFeeAddr,omitempty"`
	PlatFeeFactor        int64    `protobuf:"varint,10,opt,name=platFeeFactor,proto3" json:"platFeeFactor,omitempty"`
	PlatFeeAddr          string   `protobuf:"bytes,11,opt,name=platFeeAddr,proto3" json:"platFeeAddr,omitempty"`
	ExpireHeight         int64    `protobuf:"varint,12,opt,name=expireHeight,proto3" json:"expireHeight,omitempty"`
	Fee                  int64    `protobuf:"varint,13,opt,name=fee,proto3" json:"fee,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GuessStartTxReq 构造start交易的请求

func (*GuessStartTxReq) Descriptor

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

func (*GuessStartTxReq) GetCategory

func (m *GuessStartTxReq) GetCategory() string

func (*GuessStartTxReq) GetDevFeeAddr

func (m *GuessStartTxReq) GetDevFeeAddr() string

func (*GuessStartTxReq) GetDevFeeFactor

func (m *GuessStartTxReq) GetDevFeeFactor() int64

func (*GuessStartTxReq) GetExpireHeight

func (m *GuessStartTxReq) GetExpireHeight() int64

func (*GuessStartTxReq) GetFee

func (m *GuessStartTxReq) GetFee() int64

func (*GuessStartTxReq) GetMaxBetHeight

func (m *GuessStartTxReq) GetMaxBetHeight() int64

func (*GuessStartTxReq) GetMaxBetsNumber

func (m *GuessStartTxReq) GetMaxBetsNumber() int64

func (*GuessStartTxReq) GetMaxBetsOneTime

func (m *GuessStartTxReq) GetMaxBetsOneTime() int64

func (*GuessStartTxReq) GetMaxHeight

func (m *GuessStartTxReq) GetMaxHeight() int64

func (*GuessStartTxReq) GetOptions

func (m *GuessStartTxReq) GetOptions() string

func (*GuessStartTxReq) GetPlatFeeAddr

func (m *GuessStartTxReq) GetPlatFeeAddr() string

func (*GuessStartTxReq) GetPlatFeeFactor

func (m *GuessStartTxReq) GetPlatFeeFactor() int64

func (*GuessStartTxReq) GetTopic

func (m *GuessStartTxReq) GetTopic() string

func (*GuessStartTxReq) ProtoMessage

func (*GuessStartTxReq) ProtoMessage()

func (*GuessStartTxReq) Reset

func (m *GuessStartTxReq) Reset()

func (*GuessStartTxReq) String

func (m *GuessStartTxReq) String() string

func (*GuessStartTxReq) XXX_DiscardUnknown

func (m *GuessStartTxReq) XXX_DiscardUnknown()

func (*GuessStartTxReq) XXX_Marshal

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

func (*GuessStartTxReq) XXX_Merge

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

func (*GuessStartTxReq) XXX_Size

func (m *GuessStartTxReq) XXX_Size() int

func (*GuessStartTxReq) XXX_Unmarshal

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

type GuessStopBetTxReq

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

GuessStopBetTxReq 构造stopBet交易的请求

func (*GuessStopBetTxReq) Descriptor

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

func (*GuessStopBetTxReq) GetFee

func (m *GuessStopBetTxReq) GetFee() int64

func (*GuessStopBetTxReq) GetGameID

func (m *GuessStopBetTxReq) GetGameID() string

func (*GuessStopBetTxReq) ProtoMessage

func (*GuessStopBetTxReq) ProtoMessage()

func (*GuessStopBetTxReq) Reset

func (m *GuessStopBetTxReq) Reset()

func (*GuessStopBetTxReq) String

func (m *GuessStopBetTxReq) String() string

func (*GuessStopBetTxReq) XXX_DiscardUnknown

func (m *GuessStopBetTxReq) XXX_DiscardUnknown()

func (*GuessStopBetTxReq) XXX_Marshal

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

func (*GuessStopBetTxReq) XXX_Merge

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

func (*GuessStopBetTxReq) XXX_Size

func (m *GuessStopBetTxReq) XXX_Size() int

func (*GuessStopBetTxReq) XXX_Unmarshal

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

type GuessType

type GuessType struct {
	types.ExecTypeBase
}

GuessType struct

func NewType

func NewType() *GuessType

NewType method

func (*GuessType) GetLogMap

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

GetLogMap method

func (*GuessType) GetPayload

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

GetPayload method

func (*GuessType) GetTypeMap

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

GetTypeMap method

type GuessUserRow

type GuessUserRow struct {
	*UserBet
}

GuessUserRow table meta 结构

func NewGuessUserRow

func NewGuessUserRow() *GuessUserRow

NewGuessUserRow 新建一个meta 结构

func (*GuessUserRow) CreateRow

func (tx *GuessUserRow) CreateRow() *table.Row

CreateRow 新建数据行(注意index 数据一定也要保存到数据中,不能就保存eventid)

func (*GuessUserRow) Get

func (tx *GuessUserRow) Get(key string) ([]byte, error)

Get 按照indexName 查询 indexValue

func (*GuessUserRow) SetPayload

func (tx *GuessUserRow) SetPayload(data types.Message) error

SetPayload 设置数据

type QueryGuessGameInfo

type QueryGuessGameInfo 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"`
	AdminAddr            string   `protobuf:"bytes,5,opt,name=adminAddr,proto3" json:"adminAddr,omitempty"`
	Category             string   `protobuf:"bytes,6,opt,name=category,proto3" json:"category,omitempty"`
	PrimaryKey           string   `protobuf:"bytes,7,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

QueryGuessGameInfo 游戏信息查询消息

func (*QueryGuessGameInfo) Descriptor

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

func (*QueryGuessGameInfo) GetAddr

func (m *QueryGuessGameInfo) GetAddr() string

func (*QueryGuessGameInfo) GetAdminAddr

func (m *QueryGuessGameInfo) GetAdminAddr() string

func (*QueryGuessGameInfo) GetCategory

func (m *QueryGuessGameInfo) GetCategory() string

func (*QueryGuessGameInfo) GetGameID

func (m *QueryGuessGameInfo) GetGameID() string

func (*QueryGuessGameInfo) GetIndex

func (m *QueryGuessGameInfo) GetIndex() int64

func (*QueryGuessGameInfo) GetPrimaryKey

func (m *QueryGuessGameInfo) GetPrimaryKey() string

func (*QueryGuessGameInfo) GetStatus

func (m *QueryGuessGameInfo) GetStatus() int32

func (*QueryGuessGameInfo) ProtoMessage

func (*QueryGuessGameInfo) ProtoMessage()

func (*QueryGuessGameInfo) Reset

func (m *QueryGuessGameInfo) Reset()

func (*QueryGuessGameInfo) String

func (m *QueryGuessGameInfo) String() string

func (*QueryGuessGameInfo) XXX_DiscardUnknown

func (m *QueryGuessGameInfo) XXX_DiscardUnknown()

func (*QueryGuessGameInfo) XXX_Marshal

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

func (*QueryGuessGameInfo) XXX_Merge

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

func (*QueryGuessGameInfo) XXX_Size

func (m *QueryGuessGameInfo) XXX_Size() int

func (*QueryGuessGameInfo) XXX_Unmarshal

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

type QueryGuessGameInfos

type QueryGuessGameInfos 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:"-"`
}

QueryGuessGameInfos 游戏信息列表查询消息

func (*QueryGuessGameInfos) Descriptor

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

func (*QueryGuessGameInfos) GetGameIDs

func (m *QueryGuessGameInfos) GetGameIDs() []string

func (*QueryGuessGameInfos) ProtoMessage

func (*QueryGuessGameInfos) ProtoMessage()

func (*QueryGuessGameInfos) Reset

func (m *QueryGuessGameInfos) Reset()

func (*QueryGuessGameInfos) String

func (m *QueryGuessGameInfos) String() string

func (*QueryGuessGameInfos) XXX_DiscardUnknown

func (m *QueryGuessGameInfos) XXX_DiscardUnknown()

func (*QueryGuessGameInfos) XXX_Marshal

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

func (*QueryGuessGameInfos) XXX_Merge

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

func (*QueryGuessGameInfos) XXX_Size

func (m *QueryGuessGameInfos) XXX_Size() int

func (*QueryGuessGameInfos) XXX_Unmarshal

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

type ReceiptGuessGame

type ReceiptGuessGame struct {
	StartIndex           int64      `protobuf:"varint,1,opt,name=startIndex,proto3" json:"startIndex,omitempty"`
	GameID               string     `protobuf:"bytes,2,opt,name=gameID,proto3" json:"gameID,omitempty"`
	PreStatus            int32      `protobuf:"varint,3,opt,name=preStatus,proto3" json:"preStatus,omitempty"`
	Status               int32      `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"`
	Addr                 string     `protobuf:"bytes,5,opt,name=addr,proto3" json:"addr,omitempty"`
	AdminAddr            string     `protobuf:"bytes,6,opt,name=adminAddr,proto3" json:"adminAddr,omitempty"`
	PreIndex             int64      `protobuf:"varint,7,opt,name=preIndex,proto3" json:"preIndex,omitempty"`
	Index                int64      `protobuf:"varint,8,opt,name=index,proto3" json:"index,omitempty"`
	Category             string     `protobuf:"bytes,9,opt,name=category,proto3" json:"category,omitempty"`
	StatusChange         bool       `protobuf:"varint,10,opt,name=statusChange,proto3" json:"statusChange,omitempty"`
	Bet                  bool       `protobuf:"varint,11,opt,name=bet,proto3" json:"bet,omitempty"`
	Option               string     `protobuf:"bytes,12,opt,name=option,proto3" json:"option,omitempty"`
	BetsNumber           int64      `protobuf:"varint,13,opt,name=betsNumber,proto3" json:"betsNumber,omitempty"`
	Game                 *GuessGame `protobuf:"bytes,14,opt,name=game,proto3" json:"game,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

ReceiptGuessGame 竞猜游戏收据信息

func (*ReceiptGuessGame) Descriptor

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

func (*ReceiptGuessGame) GetAddr

func (m *ReceiptGuessGame) GetAddr() string

func (*ReceiptGuessGame) GetAdminAddr

func (m *ReceiptGuessGame) GetAdminAddr() string

func (*ReceiptGuessGame) GetBet

func (m *ReceiptGuessGame) GetBet() bool

func (*ReceiptGuessGame) GetBetsNumber

func (m *ReceiptGuessGame) GetBetsNumber() int64

func (*ReceiptGuessGame) GetCategory

func (m *ReceiptGuessGame) GetCategory() string

func (*ReceiptGuessGame) GetGame

func (m *ReceiptGuessGame) GetGame() *GuessGame

func (*ReceiptGuessGame) GetGameID

func (m *ReceiptGuessGame) GetGameID() string

func (*ReceiptGuessGame) GetIndex

func (m *ReceiptGuessGame) GetIndex() int64

func (*ReceiptGuessGame) GetOption

func (m *ReceiptGuessGame) GetOption() string

func (*ReceiptGuessGame) GetPreIndex

func (m *ReceiptGuessGame) GetPreIndex() int64

func (*ReceiptGuessGame) GetPreStatus

func (m *ReceiptGuessGame) GetPreStatus() int32

func (*ReceiptGuessGame) GetStartIndex

func (m *ReceiptGuessGame) GetStartIndex() int64

func (*ReceiptGuessGame) GetStatus

func (m *ReceiptGuessGame) GetStatus() int32

func (*ReceiptGuessGame) GetStatusChange

func (m *ReceiptGuessGame) GetStatusChange() bool

func (*ReceiptGuessGame) ProtoMessage

func (*ReceiptGuessGame) ProtoMessage()

func (*ReceiptGuessGame) Reset

func (m *ReceiptGuessGame) Reset()

func (*ReceiptGuessGame) String

func (m *ReceiptGuessGame) String() string

func (*ReceiptGuessGame) XXX_DiscardUnknown

func (m *ReceiptGuessGame) XXX_DiscardUnknown()

func (*ReceiptGuessGame) XXX_Marshal

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

func (*ReceiptGuessGame) XXX_Merge

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

func (*ReceiptGuessGame) XXX_Size

func (m *ReceiptGuessGame) XXX_Size() int

func (*ReceiptGuessGame) XXX_Unmarshal

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

type ReplyGuessGameInfo

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

ReplyGuessGameInfo 游戏信息查询响应消息

func (*ReplyGuessGameInfo) Descriptor

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

func (*ReplyGuessGameInfo) GetGame

func (m *ReplyGuessGameInfo) GetGame() *GuessGame

func (*ReplyGuessGameInfo) ProtoMessage

func (*ReplyGuessGameInfo) ProtoMessage()

func (*ReplyGuessGameInfo) Reset

func (m *ReplyGuessGameInfo) Reset()

func (*ReplyGuessGameInfo) String

func (m *ReplyGuessGameInfo) String() string

func (*ReplyGuessGameInfo) XXX_DiscardUnknown

func (m *ReplyGuessGameInfo) XXX_DiscardUnknown()

func (*ReplyGuessGameInfo) XXX_Marshal

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

func (*ReplyGuessGameInfo) XXX_Merge

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

func (*ReplyGuessGameInfo) XXX_Size

func (m *ReplyGuessGameInfo) XXX_Size() int

func (*ReplyGuessGameInfo) XXX_Unmarshal

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

type ReplyGuessGameInfos

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

ReplyGuessGameInfos 游戏信息列表查询响应消息

func (*ReplyGuessGameInfos) Descriptor

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

func (*ReplyGuessGameInfos) GetGames

func (m *ReplyGuessGameInfos) GetGames() []*GuessGame

func (*ReplyGuessGameInfos) ProtoMessage

func (*ReplyGuessGameInfos) ProtoMessage()

func (*ReplyGuessGameInfos) Reset

func (m *ReplyGuessGameInfos) Reset()

func (*ReplyGuessGameInfos) String

func (m *ReplyGuessGameInfos) String() string

func (*ReplyGuessGameInfos) XXX_DiscardUnknown

func (m *ReplyGuessGameInfos) XXX_DiscardUnknown()

func (*ReplyGuessGameInfos) XXX_Marshal

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

func (*ReplyGuessGameInfos) XXX_Merge

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

func (*ReplyGuessGameInfos) XXX_Size

func (m *ReplyGuessGameInfos) XXX_Size() int

func (*ReplyGuessGameInfos) XXX_Unmarshal

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

type UserBet

type UserBet struct {
	StartIndex           int64    `protobuf:"varint,1,opt,name=startIndex,proto3" json:"startIndex,omitempty"`
	Index                int64    `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	GameID               string   `protobuf:"bytes,3,opt,name=gameID,proto3" json:"gameID,omitempty"`
	Addr                 string   `protobuf:"bytes,4,opt,name=addr,proto3" json:"addr,omitempty"`
	Option               string   `protobuf:"bytes,5,opt,name=option,proto3" json:"option,omitempty"`
	BetsNumber           int64    `protobuf:"varint,6,opt,name=betsNumber,proto3" json:"betsNumber,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

UserBet 用户下注信息

func (*UserBet) Descriptor

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

func (*UserBet) GetAddr

func (m *UserBet) GetAddr() string

func (*UserBet) GetBetsNumber

func (m *UserBet) GetBetsNumber() int64

func (*UserBet) GetGameID

func (m *UserBet) GetGameID() string

func (*UserBet) GetIndex

func (m *UserBet) GetIndex() int64

func (*UserBet) GetOption

func (m *UserBet) GetOption() string

func (*UserBet) GetStartIndex

func (m *UserBet) GetStartIndex() int64

func (*UserBet) ProtoMessage

func (*UserBet) ProtoMessage()

func (*UserBet) Reset

func (m *UserBet) Reset()

func (*UserBet) String

func (m *UserBet) String() string

func (*UserBet) XXX_DiscardUnknown

func (m *UserBet) XXX_DiscardUnknown()

func (*UserBet) XXX_Marshal

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

func (*UserBet) XXX_Merge

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

func (*UserBet) XXX_Size

func (m *UserBet) XXX_Size() int

func (*UserBet) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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