types

package
v1.68.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: BSD-3-Clause Imports: 12 Imported by: 16

Documentation

Index

Constants

View Source
const (
	BlackwhiteStatusCreate = iota + 1
	BlackwhiteStatusPlay
	BlackwhiteStatusShow
	BlackwhiteStatusTimeout
	BlackwhiteStatusDone
)

status

View Source
const (
	// TyLogBlackwhiteCreate log for blackwhite create game
	TyLogBlackwhiteCreate = 750
	// TyLogBlackwhitePlay log for blackwhite play game
	TyLogBlackwhitePlay = 751
	// TyLogBlackwhiteShow log for blackwhite show game
	TyLogBlackwhiteShow = 752
	// TyLogBlackwhiteTimeout log for blackwhite timeout game
	TyLogBlackwhiteTimeout = 753
	// TyLogBlackwhiteDone log for blackwhite down game
	TyLogBlackwhiteDone = 754
	// TyLogBlackwhiteLoopInfo log for blackwhite LoopInfo game
	TyLogBlackwhiteLoopInfo = 755
)
View Source
const (
	// GetBlackwhiteRoundInfo 用于在cmd里面的区分不同的查询
	GetBlackwhiteRoundInfo = "GetBlackwhiteRoundInfo"
	// GetBlackwhiteByStatusAndAddr 用于在cmd里面的区分不同的查询
	GetBlackwhiteByStatusAndAddr = "GetBlackwhiteByStatusAndAddr"
	// GetBlackwhiteloopResult 用于在cmd里面的区分不同的查询
	GetBlackwhiteloopResult = "GetBlackwhiteloopResult"
)
View Source
const (
	// BlackwhiteActionCreate blackwhite create action
	BlackwhiteActionCreate = iota
	// BlackwhiteActionPlay blackwhite play action
	BlackwhiteActionPlay
	// BlackwhiteActionShow blackwhite show action
	BlackwhiteActionShow
	// BlackwhiteActionTimeoutDone blackwhite timeout action
	BlackwhiteActionTimeoutDone
)

blackwhite action type

Variables

View Source
var (
	// BlackwhiteX 执行器名字
	BlackwhiteX = "blackwhite"

	// JRPCName json RPC name
	JRPCName = "Blackwhite"
	// ExecerBlackwhite 执行器名字byte形式
	ExecerBlackwhite = []byte(BlackwhiteX)
)
View Source
var (
	// ErrIncorrectStatus 所处游戏状态不正确
	ErrIncorrectStatus = errors.New("ErrIncorrectStatus")
	// ErrRepeatPlayerAddr 重复玩家
	ErrRepeatPlayerAddr = errors.New("ErrRepeatPlayerAddress")
	// ErrNoTimeoutDone 还未超时
	ErrNoTimeoutDone = errors.New("ErrNoTimeoutDone")
	// ErrNoExistAddr 不存在地址,未参与游戏
	ErrNoExistAddr = errors.New("ErrNoExistAddress")
	// ErrNoLoopSeq 查询的轮次大于决出胜负的轮次
	ErrNoLoopSeq = errors.New("ErrBlackwhiteFinalloopLessThanSeq")
)
View Source
var File_blackwhite_proto protoreflect.FileDescriptor

Functions

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor ...

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork ...

func RegisterBlackwhiteServer

func RegisterBlackwhiteServer(s *grpc.Server, srv BlackwhiteServer)

Types

type AddressResult

type AddressResult struct {
	Addr       string   `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	Amount     int64    `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	HashValues [][]byte `protobuf:"bytes,3,rep,name=hashValues,proto3" json:"hashValues,omitempty"`
	ShowSecret string   `protobuf:"bytes,4,opt,name=showSecret,proto3" json:"showSecret,omitempty"`
	// contains filtered or unexported fields
}

func (*AddressResult) Descriptor deprecated

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

Deprecated: Use AddressResult.ProtoReflect.Descriptor instead.

func (*AddressResult) GetAddr

func (x *AddressResult) GetAddr() string

func (*AddressResult) GetAmount

func (x *AddressResult) GetAmount() int64

func (*AddressResult) GetHashValues

func (x *AddressResult) GetHashValues() [][]byte

func (*AddressResult) GetShowSecret

func (x *AddressResult) GetShowSecret() string

func (*AddressResult) ProtoMessage

func (*AddressResult) ProtoMessage()

func (*AddressResult) ProtoReflect added in v1.65.3

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

func (*AddressResult) Reset

func (x *AddressResult) Reset()

func (*AddressResult) String

func (x *AddressResult) String() string

type BlackwhiteAction

type BlackwhiteAction struct {

	// Types that are assignable to Value:
	//	*BlackwhiteAction_Create
	//	*BlackwhiteAction_Play
	//	*BlackwhiteAction_Show
	//	*BlackwhiteAction_TimeoutDone
	Value isBlackwhiteAction_Value `protobuf_oneof:"value"`
	Ty    int32                    `protobuf:"varint,6,opt,name=ty,proto3" json:"ty,omitempty"`
	// contains filtered or unexported fields
}

actions

func (*BlackwhiteAction) Descriptor deprecated

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

Deprecated: Use BlackwhiteAction.ProtoReflect.Descriptor instead.

func (*BlackwhiteAction) GetCreate

func (x *BlackwhiteAction) GetCreate() *BlackwhiteCreate

func (*BlackwhiteAction) GetPlay

func (x *BlackwhiteAction) GetPlay() *BlackwhitePlay

func (*BlackwhiteAction) GetShow

func (x *BlackwhiteAction) GetShow() *BlackwhiteShow

func (*BlackwhiteAction) GetTimeoutDone

func (x *BlackwhiteAction) GetTimeoutDone() *BlackwhiteTimeoutDone

func (*BlackwhiteAction) GetTy

func (x *BlackwhiteAction) GetTy() int32

func (*BlackwhiteAction) GetValue

func (m *BlackwhiteAction) GetValue() isBlackwhiteAction_Value

func (*BlackwhiteAction) ProtoMessage

func (*BlackwhiteAction) ProtoMessage()

func (*BlackwhiteAction) ProtoReflect added in v1.65.3

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

func (*BlackwhiteAction) Reset

func (x *BlackwhiteAction) Reset()

func (*BlackwhiteAction) String

func (x *BlackwhiteAction) String() string

type BlackwhiteAction_Create

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

type BlackwhiteAction_Play

type BlackwhiteAction_Play struct {
	Play *BlackwhitePlay `protobuf:"bytes,2,opt,name=play,proto3,oneof"`
}

type BlackwhiteAction_Show

type BlackwhiteAction_Show struct {
	Show *BlackwhiteShow `protobuf:"bytes,3,opt,name=show,proto3,oneof"`
}

type BlackwhiteAction_TimeoutDone

type BlackwhiteAction_TimeoutDone struct {
	TimeoutDone *BlackwhiteTimeoutDone `protobuf:"bytes,4,opt,name=timeoutDone,proto3,oneof"`
}

type BlackwhiteByStatusAndAddr

type BlackwhiteByStatusAndAddr struct {
}

BlackwhiteByStatusAndAddr ...

func (*BlackwhiteByStatusAndAddr) Input

func (t *BlackwhiteByStatusAndAddr) Input(message json.RawMessage) ([]byte, error)

Input for convert struct

func (*BlackwhiteByStatusAndAddr) Output

func (t *BlackwhiteByStatusAndAddr) Output(reply interface{}) (interface{}, error)

Output for convert struct

type BlackwhiteClient

type BlackwhiteClient interface {
	// blackwhite 对外提供服务的接口
	//区块链接口
	Create(ctx context.Context, in *BlackwhiteCreate, opts ...grpc.CallOption) (*types.UnsignTx, error)
	//获取最新的区块头
	Show(ctx context.Context, in *BlackwhiteShow, opts ...grpc.CallOption) (*types.UnsignTx, error)
	//交易接口
	Play(ctx context.Context, in *BlackwhitePlay, opts ...grpc.CallOption) (*types.UnsignTx, error)
	TimeoutDone(ctx context.Context, in *BlackwhiteTimeoutDone, opts ...grpc.CallOption) (*types.UnsignTx, error)
}

BlackwhiteClient is the client API for Blackwhite service.

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

func NewBlackwhiteClient

func NewBlackwhiteClient(cc grpc.ClientConnInterface) BlackwhiteClient

type BlackwhiteCreate

type BlackwhiteCreate struct {
	PlayAmount  int64  `protobuf:"varint,1,opt,name=playAmount,proto3" json:"playAmount,omitempty"`
	PlayerCount int32  `protobuf:"varint,2,opt,name=playerCount,proto3" json:"playerCount,omitempty"`
	Timeout     int64  `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	GameName    string `protobuf:"bytes,4,opt,name=gameName,proto3" json:"gameName,omitempty"`
	// contains filtered or unexported fields
}

func (*BlackwhiteCreate) Descriptor deprecated

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

Deprecated: Use BlackwhiteCreate.ProtoReflect.Descriptor instead.

func (*BlackwhiteCreate) GetGameName

func (x *BlackwhiteCreate) GetGameName() string

func (*BlackwhiteCreate) GetPlayAmount

func (x *BlackwhiteCreate) GetPlayAmount() int64

func (*BlackwhiteCreate) GetPlayerCount

func (x *BlackwhiteCreate) GetPlayerCount() int32

func (*BlackwhiteCreate) GetTimeout

func (x *BlackwhiteCreate) GetTimeout() int64

func (*BlackwhiteCreate) ProtoMessage

func (*BlackwhiteCreate) ProtoMessage()

func (*BlackwhiteCreate) ProtoReflect added in v1.65.3

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

func (*BlackwhiteCreate) Reset

func (x *BlackwhiteCreate) Reset()

func (*BlackwhiteCreate) String

func (x *BlackwhiteCreate) String() string

type BlackwhiteCreateTxReq

type BlackwhiteCreateTxReq struct {
	PlayAmount  int64  `protobuf:"varint,1,opt,name=PlayAmount,proto3" json:"PlayAmount,omitempty"`
	PlayerCount int32  `protobuf:"varint,2,opt,name=PlayerCount,proto3" json:"PlayerCount,omitempty"`
	Timeout     int64  `protobuf:"varint,3,opt,name=Timeout,proto3" json:"Timeout,omitempty"`
	GameName    string `protobuf:"bytes,4,opt,name=GameName,proto3" json:"GameName,omitempty"`
	Fee         int64  `protobuf:"varint,5,opt,name=Fee,proto3" json:"Fee,omitempty"`
	// contains filtered or unexported fields
}

func (*BlackwhiteCreateTxReq) Descriptor deprecated

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

Deprecated: Use BlackwhiteCreateTxReq.ProtoReflect.Descriptor instead.

func (*BlackwhiteCreateTxReq) GetFee

func (x *BlackwhiteCreateTxReq) GetFee() int64

func (*BlackwhiteCreateTxReq) GetGameName

func (x *BlackwhiteCreateTxReq) GetGameName() string

func (*BlackwhiteCreateTxReq) GetPlayAmount

func (x *BlackwhiteCreateTxReq) GetPlayAmount() int64

func (*BlackwhiteCreateTxReq) GetPlayerCount

func (x *BlackwhiteCreateTxReq) GetPlayerCount() int32

func (*BlackwhiteCreateTxReq) GetTimeout

func (x *BlackwhiteCreateTxReq) GetTimeout() int64

func (*BlackwhiteCreateTxReq) ProtoMessage

func (*BlackwhiteCreateTxReq) ProtoMessage()

func (*BlackwhiteCreateTxReq) ProtoReflect added in v1.65.3

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

func (*BlackwhiteCreateTxReq) Reset

func (x *BlackwhiteCreateTxReq) Reset()

func (*BlackwhiteCreateTxReq) String

func (x *BlackwhiteCreateTxReq) String() string

type BlackwhitePlay

type BlackwhitePlay struct {
	GameID     string   `protobuf:"bytes,1,opt,name=gameID,proto3" json:"gameID,omitempty"`
	Amount     int64    `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	HashValues [][]byte `protobuf:"bytes,3,rep,name=hashValues,proto3" json:"hashValues,omitempty"`
	// contains filtered or unexported fields
}

func (*BlackwhitePlay) Descriptor deprecated

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

Deprecated: Use BlackwhitePlay.ProtoReflect.Descriptor instead.

func (*BlackwhitePlay) GetAmount

func (x *BlackwhitePlay) GetAmount() int64

func (*BlackwhitePlay) GetGameID

func (x *BlackwhitePlay) GetGameID() string

func (*BlackwhitePlay) GetHashValues

func (x *BlackwhitePlay) GetHashValues() [][]byte

func (*BlackwhitePlay) ProtoMessage

func (*BlackwhitePlay) ProtoMessage()

func (*BlackwhitePlay) ProtoReflect added in v1.65.3

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

func (*BlackwhitePlay) Reset

func (x *BlackwhitePlay) Reset()

func (*BlackwhitePlay) String

func (x *BlackwhitePlay) String() string

type BlackwhitePlayTxReq

type BlackwhitePlayTxReq struct {
	GameID     string   `protobuf:"bytes,1,opt,name=GameID,proto3" json:"GameID,omitempty"`
	Amount     int64    `protobuf:"varint,2,opt,name=Amount,proto3" json:"Amount,omitempty"`
	HashValues [][]byte `protobuf:"bytes,3,rep,name=HashValues,proto3" json:"HashValues,omitempty"`
	Fee        int64    `protobuf:"varint,4,opt,name=Fee,proto3" json:"Fee,omitempty"`
	// contains filtered or unexported fields
}

func (*BlackwhitePlayTxReq) Descriptor deprecated

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

Deprecated: Use BlackwhitePlayTxReq.ProtoReflect.Descriptor instead.

func (*BlackwhitePlayTxReq) GetAmount

func (x *BlackwhitePlayTxReq) GetAmount() int64

func (*BlackwhitePlayTxReq) GetFee

func (x *BlackwhitePlayTxReq) GetFee() int64

func (*BlackwhitePlayTxReq) GetGameID

func (x *BlackwhitePlayTxReq) GetGameID() string

func (*BlackwhitePlayTxReq) GetHashValues

func (x *BlackwhitePlayTxReq) GetHashValues() [][]byte

func (*BlackwhitePlayTxReq) ProtoMessage

func (*BlackwhitePlayTxReq) ProtoMessage()

func (*BlackwhitePlayTxReq) ProtoReflect added in v1.65.3

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

func (*BlackwhitePlayTxReq) Reset

func (x *BlackwhitePlayTxReq) Reset()

func (*BlackwhitePlayTxReq) String

func (x *BlackwhitePlayTxReq) String() string

type BlackwhiteRound

type BlackwhiteRound struct {

	// txhash
	GameID string `protobuf:"bytes,1,opt,name=gameID,proto3" json:"gameID,omitempty"`
	// create -> play(timeout) -> show -> done
	Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	// 游戏押金可大于
	PlayAmount int64 `protobuf:"varint,3,opt,name=playAmount,proto3" json:"playAmount,omitempty"`
	// 游戏人数
	PlayerCount int32 `protobuf:"varint,4,opt,name=playerCount,proto3" json:"playerCount,omitempty"`
	// 当前游戏人数
	CurPlayerCount int32 `protobuf:"varint,5,opt,name=curPlayerCount,proto3" json:"curPlayerCount,omitempty"`
	// 游戏需要比对次数
	Loop int32 `protobuf:"varint,6,opt,name=loop,proto3" json:"loop,omitempty"`
	// 当前出示密钥人数
	CurShowCount int32 `protobuf:"varint,7,opt,name=curShowCount,proto3" json:"curShowCount,omitempty"`
	// 创建游戏时间
	CreateTime int64 `protobuf:"varint,8,opt,name=createTime,proto3" json:"createTime,omitempty"`
	// 出示密钥开始时间
	ShowTime int64 `protobuf:"varint,9,opt,name=showTime,proto3" json:"showTime,omitempty"`
	// 超时时间
	Timeout int64 `protobuf:"varint,10,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// 创建游戏地址
	CreateAddr string `protobuf:"bytes,11,opt,name=createAddr,proto3" json:"createAddr,omitempty"`
	// 游戏名称
	GameName string `protobuf:"bytes,12,opt,name=gameName,proto3" json:"gameName,omitempty"`
	// 游戏加密结果
	AddrResult []*AddressResult `protobuf:"bytes,13,rep,name=addrResult,proto3" json:"addrResult,omitempty"`
	// 游戏赢家
	Winner []string `protobuf:"bytes,14,rep,name=winner,proto3" json:"winner,omitempty"`
	// block高度以及索引值
	Index int64 `protobuf:"varint,15,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

order

func (*BlackwhiteRound) Descriptor deprecated

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

Deprecated: Use BlackwhiteRound.ProtoReflect.Descriptor instead.

func (*BlackwhiteRound) GetAddrResult

func (x *BlackwhiteRound) GetAddrResult() []*AddressResult

func (*BlackwhiteRound) GetCreateAddr

func (x *BlackwhiteRound) GetCreateAddr() string

func (*BlackwhiteRound) GetCreateTime

func (x *BlackwhiteRound) GetCreateTime() int64

func (*BlackwhiteRound) GetCurPlayerCount

func (x *BlackwhiteRound) GetCurPlayerCount() int32

func (*BlackwhiteRound) GetCurShowCount

func (x *BlackwhiteRound) GetCurShowCount() int32

func (*BlackwhiteRound) GetGameID

func (x *BlackwhiteRound) GetGameID() string

func (*BlackwhiteRound) GetGameName

func (x *BlackwhiteRound) GetGameName() string

func (*BlackwhiteRound) GetIndex

func (x *BlackwhiteRound) GetIndex() int64

func (*BlackwhiteRound) GetLoop

func (x *BlackwhiteRound) GetLoop() int32

func (*BlackwhiteRound) GetPlayAmount

func (x *BlackwhiteRound) GetPlayAmount() int64

func (*BlackwhiteRound) GetPlayerCount

func (x *BlackwhiteRound) GetPlayerCount() int32

func (*BlackwhiteRound) GetShowTime

func (x *BlackwhiteRound) GetShowTime() int64

func (*BlackwhiteRound) GetStatus

func (x *BlackwhiteRound) GetStatus() int32

func (*BlackwhiteRound) GetTimeout

func (x *BlackwhiteRound) GetTimeout() int64

func (*BlackwhiteRound) GetWinner

func (x *BlackwhiteRound) GetWinner() []string

func (*BlackwhiteRound) ProtoMessage

func (*BlackwhiteRound) ProtoMessage()

func (*BlackwhiteRound) ProtoReflect added in v1.65.3

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

func (*BlackwhiteRound) Reset

func (x *BlackwhiteRound) Reset()

func (*BlackwhiteRound) String

func (x *BlackwhiteRound) String() string

type BlackwhiteRoundInfo

type BlackwhiteRoundInfo struct {
}

BlackwhiteRoundInfo ...

func (*BlackwhiteRoundInfo) Input

func (t *BlackwhiteRoundInfo) Input(message json.RawMessage) ([]byte, error)

Input for convert struct

func (*BlackwhiteRoundInfo) Output

func (t *BlackwhiteRoundInfo) Output(reply interface{}) (interface{}, error)

Output for convert struct

type BlackwhiteRoundResult

type BlackwhiteRoundResult struct {

	// txhash
	GameID string `protobuf:"bytes,1,opt,name=gameID,proto3" json:"gameID,omitempty"`
	// create -> play(timeout) -> show -> done
	Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	// 游戏押金可大于
	PlayAmount int64 `protobuf:"varint,3,opt,name=playAmount,proto3" json:"playAmount,omitempty"`
	// 游戏人数
	PlayerCount int32 `protobuf:"varint,4,opt,name=playerCount,proto3" json:"playerCount,omitempty"`
	// 当前游戏人数
	CurPlayerCount int32 `protobuf:"varint,5,opt,name=curPlayerCount,proto3" json:"curPlayerCount,omitempty"`
	// 游戏需要比对次数
	Loop int32 `protobuf:"varint,6,opt,name=loop,proto3" json:"loop,omitempty"`
	// 当前出示密钥人数
	CurShowCount int32 `protobuf:"varint,7,opt,name=curShowCount,proto3" json:"curShowCount,omitempty"`
	// 创建游戏时间
	CreateTime int64 `protobuf:"varint,8,opt,name=createTime,proto3" json:"createTime,omitempty"`
	// 出示密钥开始时间
	ShowTime int64 `protobuf:"varint,9,opt,name=showTime,proto3" json:"showTime,omitempty"`
	// 超时时间
	Timeout int64 `protobuf:"varint,10,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// 创建游戏地址
	CreateAddr string `protobuf:"bytes,11,opt,name=createAddr,proto3" json:"createAddr,omitempty"`
	// 游戏名称
	GameName string `protobuf:"bytes,12,opt,name=gameName,proto3" json:"gameName,omitempty"`
	// 游戏加密结果
	AddrResult []*AddressResult `protobuf:"bytes,13,rep,name=addrResult,proto3" json:"addrResult,omitempty"`
	// 游戏赢家
	Winner []string `protobuf:"bytes,14,rep,name=winner,proto3" json:"winner,omitempty"`
	// block高度以及索引值
	Index int64 `protobuf:"varint,15,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

func (*BlackwhiteRoundResult) Descriptor deprecated

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

Deprecated: Use BlackwhiteRoundResult.ProtoReflect.Descriptor instead.

func (*BlackwhiteRoundResult) GetAddrResult

func (x *BlackwhiteRoundResult) GetAddrResult() []*AddressResult

func (*BlackwhiteRoundResult) GetCreateAddr

func (x *BlackwhiteRoundResult) GetCreateAddr() string

func (*BlackwhiteRoundResult) GetCreateTime

func (x *BlackwhiteRoundResult) GetCreateTime() int64

func (*BlackwhiteRoundResult) GetCurPlayerCount

func (x *BlackwhiteRoundResult) GetCurPlayerCount() int32

func (*BlackwhiteRoundResult) GetCurShowCount

func (x *BlackwhiteRoundResult) GetCurShowCount() int32

func (*BlackwhiteRoundResult) GetGameID

func (x *BlackwhiteRoundResult) GetGameID() string

func (*BlackwhiteRoundResult) GetGameName

func (x *BlackwhiteRoundResult) GetGameName() string

func (*BlackwhiteRoundResult) GetIndex

func (x *BlackwhiteRoundResult) GetIndex() int64

func (*BlackwhiteRoundResult) GetLoop

func (x *BlackwhiteRoundResult) GetLoop() int32

func (*BlackwhiteRoundResult) GetPlayAmount

func (x *BlackwhiteRoundResult) GetPlayAmount() int64

func (*BlackwhiteRoundResult) GetPlayerCount

func (x *BlackwhiteRoundResult) GetPlayerCount() int32

func (*BlackwhiteRoundResult) GetShowTime

func (x *BlackwhiteRoundResult) GetShowTime() int64

func (*BlackwhiteRoundResult) GetStatus

func (x *BlackwhiteRoundResult) GetStatus() int32

func (*BlackwhiteRoundResult) GetTimeout

func (x *BlackwhiteRoundResult) GetTimeout() int64

func (*BlackwhiteRoundResult) GetWinner

func (x *BlackwhiteRoundResult) GetWinner() []string

func (*BlackwhiteRoundResult) ProtoMessage

func (*BlackwhiteRoundResult) ProtoMessage()

func (*BlackwhiteRoundResult) ProtoReflect added in v1.65.3

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

func (*BlackwhiteRoundResult) Reset

func (x *BlackwhiteRoundResult) Reset()

func (*BlackwhiteRoundResult) String

func (x *BlackwhiteRoundResult) String() string

type BlackwhiteServer

type BlackwhiteServer interface {
	// blackwhite 对外提供服务的接口
	//区块链接口
	Create(context.Context, *BlackwhiteCreate) (*types.UnsignTx, error)
	//获取最新的区块头
	Show(context.Context, *BlackwhiteShow) (*types.UnsignTx, error)
	//交易接口
	Play(context.Context, *BlackwhitePlay) (*types.UnsignTx, error)
	TimeoutDone(context.Context, *BlackwhiteTimeoutDone) (*types.UnsignTx, error)
}

BlackwhiteServer is the server API for Blackwhite service.

type BlackwhiteShow

type BlackwhiteShow 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"`
	// contains filtered or unexported fields
}

func (*BlackwhiteShow) Descriptor deprecated

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

Deprecated: Use BlackwhiteShow.ProtoReflect.Descriptor instead.

func (*BlackwhiteShow) GetGameID

func (x *BlackwhiteShow) GetGameID() string

func (*BlackwhiteShow) GetSecret

func (x *BlackwhiteShow) GetSecret() string

func (*BlackwhiteShow) ProtoMessage

func (*BlackwhiteShow) ProtoMessage()

func (*BlackwhiteShow) ProtoReflect added in v1.65.3

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

func (*BlackwhiteShow) Reset

func (x *BlackwhiteShow) Reset()

func (*BlackwhiteShow) String

func (x *BlackwhiteShow) String() string

type BlackwhiteShowTxReq

type BlackwhiteShowTxReq 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"`
	Fee    int64  `protobuf:"varint,3,opt,name=Fee,proto3" json:"Fee,omitempty"`
	// contains filtered or unexported fields
}

func (*BlackwhiteShowTxReq) Descriptor deprecated

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

Deprecated: Use BlackwhiteShowTxReq.ProtoReflect.Descriptor instead.

func (*BlackwhiteShowTxReq) GetFee

func (x *BlackwhiteShowTxReq) GetFee() int64

func (*BlackwhiteShowTxReq) GetGameID

func (x *BlackwhiteShowTxReq) GetGameID() string

func (*BlackwhiteShowTxReq) GetSecret

func (x *BlackwhiteShowTxReq) GetSecret() string

func (*BlackwhiteShowTxReq) ProtoMessage

func (*BlackwhiteShowTxReq) ProtoMessage()

func (*BlackwhiteShowTxReq) ProtoReflect added in v1.65.3

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

func (*BlackwhiteShowTxReq) Reset

func (x *BlackwhiteShowTxReq) Reset()

func (*BlackwhiteShowTxReq) String

func (x *BlackwhiteShowTxReq) String() string

type BlackwhiteTimeoutDone

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

func (*BlackwhiteTimeoutDone) Descriptor deprecated

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

Deprecated: Use BlackwhiteTimeoutDone.ProtoReflect.Descriptor instead.

func (*BlackwhiteTimeoutDone) GetGameID

func (x *BlackwhiteTimeoutDone) GetGameID() string

func (*BlackwhiteTimeoutDone) ProtoMessage

func (*BlackwhiteTimeoutDone) ProtoMessage()

func (*BlackwhiteTimeoutDone) ProtoReflect added in v1.65.3

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

func (*BlackwhiteTimeoutDone) Reset

func (x *BlackwhiteTimeoutDone) Reset()

func (*BlackwhiteTimeoutDone) String

func (x *BlackwhiteTimeoutDone) String() string

type BlackwhiteTimeoutDoneTxReq

type BlackwhiteTimeoutDoneTxReq 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 (*BlackwhiteTimeoutDoneTxReq) Descriptor deprecated

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

Deprecated: Use BlackwhiteTimeoutDoneTxReq.ProtoReflect.Descriptor instead.

func (*BlackwhiteTimeoutDoneTxReq) GetFee

func (x *BlackwhiteTimeoutDoneTxReq) GetFee() int64

func (*BlackwhiteTimeoutDoneTxReq) GetGameID

func (x *BlackwhiteTimeoutDoneTxReq) GetGameID() string

func (*BlackwhiteTimeoutDoneTxReq) ProtoMessage

func (*BlackwhiteTimeoutDoneTxReq) ProtoMessage()

func (*BlackwhiteTimeoutDoneTxReq) ProtoReflect added in v1.65.3

func (*BlackwhiteTimeoutDoneTxReq) Reset

func (x *BlackwhiteTimeoutDoneTxReq) Reset()

func (*BlackwhiteTimeoutDoneTxReq) String

func (x *BlackwhiteTimeoutDoneTxReq) String() string

type BlackwhiteType

type BlackwhiteType struct {
	types.ExecTypeBase
}

BlackwhiteType 执行器基类结构体

func NewType

func NewType(cfg *types.Chain33Config) *BlackwhiteType

NewType 创建执行器类型

func (BlackwhiteType) ActionName

func (b BlackwhiteType) ActionName(tx *types.Transaction) string

ActionName 根据交易的payLoad获取blackwhite的action的name

func (BlackwhiteType) Amount

func (b BlackwhiteType) Amount(tx *types.Transaction) (int64, error)

Amount ...

func (BlackwhiteType) CreateTx

func (b BlackwhiteType) CreateTx(action string, message json.RawMessage) (*types.Transaction, error)

CreateTx ... TODO 暂时不修改实现, 先完成结构的重构

func (*BlackwhiteType) GetLogMap

func (b *BlackwhiteType) GetLogMap() map[int64]*types.LogInfo

GetLogMap 获取log的映射对应关系

func (*BlackwhiteType) GetName

func (b *BlackwhiteType) GetName() string

GetName 获取执行器名称

func (*BlackwhiteType) GetPayload

func (b *BlackwhiteType) GetPayload() types.Message

GetPayload 获取blackwhite action

func (*BlackwhiteType) GetTypeMap

func (b *BlackwhiteType) GetTypeMap() map[string]int32

GetTypeMap 根据action的name获取type

type BlackwhiteloopResult

type BlackwhiteloopResult struct {
}

BlackwhiteloopResult ...

func (*BlackwhiteloopResult) Input

func (t *BlackwhiteloopResult) Input(message json.RawMessage) ([]byte, error)

Input for convert struct

func (*BlackwhiteloopResult) Output

func (t *BlackwhiteloopResult) Output(reply interface{}) (interface{}, error)

Output for convert struct

type PerLoopResult

type PerLoopResult struct {
	Winers []string `protobuf:"bytes,1,rep,name=winers,proto3" json:"winers,omitempty"`
	Losers []string `protobuf:"bytes,2,rep,name=losers,proto3" json:"losers,omitempty"`
	// contains filtered or unexported fields
}

func (*PerLoopResult) Descriptor deprecated

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

Deprecated: Use PerLoopResult.ProtoReflect.Descriptor instead.

func (*PerLoopResult) GetLosers

func (x *PerLoopResult) GetLosers() []string

func (*PerLoopResult) GetWiners

func (x *PerLoopResult) GetWiners() []string

func (*PerLoopResult) ProtoMessage

func (*PerLoopResult) ProtoMessage()

func (*PerLoopResult) ProtoReflect added in v1.65.3

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

func (*PerLoopResult) Reset

func (x *PerLoopResult) Reset()

func (*PerLoopResult) String

func (x *PerLoopResult) String() string

type ReceiptBlackwhite

type ReceiptBlackwhite struct {
	Round *BlackwhiteRound `protobuf:"bytes,1,opt,name=round,proto3" json:"round,omitempty"`
	// contains filtered or unexported fields
}

logs

func (*ReceiptBlackwhite) Descriptor deprecated

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

Deprecated: Use ReceiptBlackwhite.ProtoReflect.Descriptor instead.

func (*ReceiptBlackwhite) GetRound

func (x *ReceiptBlackwhite) GetRound() *BlackwhiteRound

func (*ReceiptBlackwhite) ProtoMessage

func (*ReceiptBlackwhite) ProtoMessage()

func (*ReceiptBlackwhite) ProtoReflect added in v1.65.3

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

func (*ReceiptBlackwhite) Reset

func (x *ReceiptBlackwhite) Reset()

func (*ReceiptBlackwhite) String

func (x *ReceiptBlackwhite) String() string

type ReceiptBlackwhiteStatus

type ReceiptBlackwhiteStatus 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"`
	Index      int64  `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

func (*ReceiptBlackwhiteStatus) Descriptor deprecated

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

Deprecated: Use ReceiptBlackwhiteStatus.ProtoReflect.Descriptor instead.

func (*ReceiptBlackwhiteStatus) GetAddr

func (x *ReceiptBlackwhiteStatus) GetAddr() string

func (*ReceiptBlackwhiteStatus) GetGameID

func (x *ReceiptBlackwhiteStatus) GetGameID() string

func (*ReceiptBlackwhiteStatus) GetIndex

func (x *ReceiptBlackwhiteStatus) GetIndex() int64

func (*ReceiptBlackwhiteStatus) GetPrevStatus

func (x *ReceiptBlackwhiteStatus) GetPrevStatus() int32

func (*ReceiptBlackwhiteStatus) GetStatus

func (x *ReceiptBlackwhiteStatus) GetStatus() int32

func (*ReceiptBlackwhiteStatus) ProtoMessage

func (*ReceiptBlackwhiteStatus) ProtoMessage()

func (*ReceiptBlackwhiteStatus) ProtoReflect added in v1.65.3

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

func (*ReceiptBlackwhiteStatus) Reset

func (x *ReceiptBlackwhiteStatus) Reset()

func (*ReceiptBlackwhiteStatus) String

func (x *ReceiptBlackwhiteStatus) String() string

type ReplyBlackwhiteRoundInfo

type ReplyBlackwhiteRoundInfo struct {
	Round *BlackwhiteRoundResult `protobuf:"bytes,1,opt,name=round,proto3" json:"round,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyBlackwhiteRoundInfo) Descriptor deprecated

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

Deprecated: Use ReplyBlackwhiteRoundInfo.ProtoReflect.Descriptor instead.

func (*ReplyBlackwhiteRoundInfo) GetRound

func (*ReplyBlackwhiteRoundInfo) ProtoMessage

func (*ReplyBlackwhiteRoundInfo) ProtoMessage()

func (*ReplyBlackwhiteRoundInfo) ProtoReflect added in v1.65.3

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

func (*ReplyBlackwhiteRoundInfo) Reset

func (x *ReplyBlackwhiteRoundInfo) Reset()

func (*ReplyBlackwhiteRoundInfo) String

func (x *ReplyBlackwhiteRoundInfo) String() string

type ReplyBlackwhiteRoundList

type ReplyBlackwhiteRoundList struct {
	Round []*BlackwhiteRoundResult `protobuf:"bytes,1,rep,name=round,proto3" json:"round,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyBlackwhiteRoundList) Descriptor deprecated

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

Deprecated: Use ReplyBlackwhiteRoundList.ProtoReflect.Descriptor instead.

func (*ReplyBlackwhiteRoundList) GetRound

func (*ReplyBlackwhiteRoundList) ProtoMessage

func (*ReplyBlackwhiteRoundList) ProtoMessage()

func (*ReplyBlackwhiteRoundList) ProtoReflect added in v1.65.3

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

func (*ReplyBlackwhiteRoundList) Reset

func (x *ReplyBlackwhiteRoundList) Reset()

func (*ReplyBlackwhiteRoundList) String

func (x *ReplyBlackwhiteRoundList) String() string

type ReplyLoopResults

type ReplyLoopResults struct {
	GameID  string           `protobuf:"bytes,1,opt,name=gameID,proto3" json:"gameID,omitempty"`
	Results []*PerLoopResult `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyLoopResults) Descriptor deprecated

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

Deprecated: Use ReplyLoopResults.ProtoReflect.Descriptor instead.

func (*ReplyLoopResults) GetGameID

func (x *ReplyLoopResults) GetGameID() string

func (*ReplyLoopResults) GetResults

func (x *ReplyLoopResults) GetResults() []*PerLoopResult

func (*ReplyLoopResults) ProtoMessage

func (*ReplyLoopResults) ProtoMessage()

func (*ReplyLoopResults) ProtoReflect added in v1.65.3

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

func (*ReplyLoopResults) Reset

func (x *ReplyLoopResults) Reset()

func (*ReplyLoopResults) String

func (x *ReplyLoopResults) String() string

type ReqBlackwhiteRoundInfo

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

func (*ReqBlackwhiteRoundInfo) Descriptor deprecated

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

Deprecated: Use ReqBlackwhiteRoundInfo.ProtoReflect.Descriptor instead.

func (*ReqBlackwhiteRoundInfo) GetGameID

func (x *ReqBlackwhiteRoundInfo) GetGameID() string

func (*ReqBlackwhiteRoundInfo) ProtoMessage

func (*ReqBlackwhiteRoundInfo) ProtoMessage()

func (*ReqBlackwhiteRoundInfo) ProtoReflect added in v1.65.3

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

func (*ReqBlackwhiteRoundInfo) Reset

func (x *ReqBlackwhiteRoundInfo) Reset()

func (*ReqBlackwhiteRoundInfo) String

func (x *ReqBlackwhiteRoundInfo) String() string

type ReqBlackwhiteRoundList

type ReqBlackwhiteRoundList 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"`
	Count     int32  `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	Direction int32  `protobuf:"varint,4,opt,name=direction,proto3" json:"direction,omitempty"`
	Index     int64  `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

func (*ReqBlackwhiteRoundList) Descriptor deprecated

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

Deprecated: Use ReqBlackwhiteRoundList.ProtoReflect.Descriptor instead.

func (*ReqBlackwhiteRoundList) GetAddress

func (x *ReqBlackwhiteRoundList) GetAddress() string

func (*ReqBlackwhiteRoundList) GetCount

func (x *ReqBlackwhiteRoundList) GetCount() int32

func (*ReqBlackwhiteRoundList) GetDirection

func (x *ReqBlackwhiteRoundList) GetDirection() int32

func (*ReqBlackwhiteRoundList) GetIndex

func (x *ReqBlackwhiteRoundList) GetIndex() int64

func (*ReqBlackwhiteRoundList) GetStatus

func (x *ReqBlackwhiteRoundList) GetStatus() int32

func (*ReqBlackwhiteRoundList) ProtoMessage

func (*ReqBlackwhiteRoundList) ProtoMessage()

func (*ReqBlackwhiteRoundList) ProtoReflect added in v1.65.3

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

func (*ReqBlackwhiteRoundList) Reset

func (x *ReqBlackwhiteRoundList) Reset()

func (*ReqBlackwhiteRoundList) String

func (x *ReqBlackwhiteRoundList) String() string

type ReqLoopResult

type ReqLoopResult struct {
	GameID  string `protobuf:"bytes,1,opt,name=gameID,proto3" json:"gameID,omitempty"`
	LoopSeq int32  `protobuf:"varint,2,opt,name=loopSeq,proto3" json:"loopSeq,omitempty"`
	// contains filtered or unexported fields
}

func (*ReqLoopResult) Descriptor deprecated

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

Deprecated: Use ReqLoopResult.ProtoReflect.Descriptor instead.

func (*ReqLoopResult) GetGameID

func (x *ReqLoopResult) GetGameID() string

func (*ReqLoopResult) GetLoopSeq

func (x *ReqLoopResult) GetLoopSeq() int32

func (*ReqLoopResult) ProtoMessage

func (*ReqLoopResult) ProtoMessage()

func (*ReqLoopResult) ProtoReflect added in v1.65.3

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

func (*ReqLoopResult) Reset

func (x *ReqLoopResult) Reset()

func (*ReqLoopResult) String

func (x *ReqLoopResult) String() string

type UnimplementedBlackwhiteServer

type UnimplementedBlackwhiteServer struct {
}

UnimplementedBlackwhiteServer can be embedded to have forward compatible implementations.

func (*UnimplementedBlackwhiteServer) Create

func (*UnimplementedBlackwhiteServer) Play

func (*UnimplementedBlackwhiteServer) Show

func (*UnimplementedBlackwhiteServer) TimeoutDone

Jump to

Keyboard shortcuts

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