rpc

package
v1.66.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: BSD-3-Clause Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(name string, s rpctypes.RPCServer)

Init init grpc param

Types

type BlackwhiteCreateTx

type BlackwhiteCreateTx struct {
	PlayAmount  int64  `json:"amount"`
	PlayerCount int32  `json:"playerCount"`
	Timeout     int64  `json:"timeout"`
	GameName    string `json:"gameName"`
	Fee         int64  `json:"fee"`
}

BlackwhiteCreateTx 创建游戏结构体

type BlackwhiteCreateTxRPC

type BlackwhiteCreateTxRPC struct{}

BlackwhiteCreateTxRPC ...

func (*BlackwhiteCreateTxRPC) Input

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

Input for convert struct

func (*BlackwhiteCreateTxRPC) Output

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

Output for convert struct

type BlackwhitePlayTx

type BlackwhitePlayTx struct {
	GameID     string   `json:"gameID"`
	Amount     int64    `json:"amount"`
	HashValues [][]byte `json:"hashValues"`
	Fee        int64    `json:"fee"`
}

BlackwhitePlayTx 参与游戏结构体

type BlackwhitePlayTxRPC

type BlackwhitePlayTxRPC struct {
}

BlackwhitePlayTxRPC ...

func (*BlackwhitePlayTxRPC) Input

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

Input for convert struct

func (*BlackwhitePlayTxRPC) Output

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

Output for convert struct

type BlackwhiteShowTx

type BlackwhiteShowTx struct {
	GameID string `json:"gameID"`
	Secret string `json:"secret"`
	Fee    int64  `json:"fee"`
}

BlackwhiteShowTx 出示密钥结构体

type BlackwhiteShowTxRPC

type BlackwhiteShowTxRPC struct {
}

BlackwhiteShowTxRPC ...

func (*BlackwhiteShowTxRPC) Input

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

Input for convert struct

func (*BlackwhiteShowTxRPC) Output

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

Output for convert struct

type BlackwhiteTimeoutDoneTx

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

BlackwhiteTimeoutDoneTx 游戏超时结构体

type BlackwhiteTimeoutDoneTxRPC

type BlackwhiteTimeoutDoneTxRPC struct {
}

BlackwhiteTimeoutDoneTxRPC ...

func (*BlackwhiteTimeoutDoneTxRPC) Input

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

Input for convert struct

func (*BlackwhiteTimeoutDoneTxRPC) Output

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

Output for convert struct

type Grpc

type Grpc struct {
	// contains filtered or unexported fields
}

Grpc grpc struct

func (Grpc) Create

func (c Grpc) Create(ctx context.Context, head *bw.BlackwhiteCreate) (*types.UnsignTx, error)

func (Grpc) Play

func (c Grpc) Play(ctx context.Context, head *bw.BlackwhitePlay) (*types.UnsignTx, error)

func (Grpc) Show

func (c Grpc) Show(ctx context.Context, head *bw.BlackwhiteShow) (*types.UnsignTx, error)

func (Grpc) TimeoutDone

func (c Grpc) TimeoutDone(ctx context.Context, head *bw.BlackwhiteTimeoutDone) (*types.UnsignTx, error)

type Jrpc

type Jrpc struct {
	// contains filtered or unexported fields
}

Jrpc json rpc struct

func (*Jrpc) BlackwhiteCreateTx

func (c *Jrpc) BlackwhiteCreateTx(parm *bw.BlackwhiteCreateTxReq, result *interface{}) error

BlackwhiteCreateTx 创建游戏RPC接口

func (*Jrpc) BlackwhitePlayTx

func (c *Jrpc) BlackwhitePlayTx(parm *BlackwhitePlayTx, result *interface{}) error

BlackwhitePlayTx 参与游戏的RPC接口

func (*Jrpc) BlackwhiteShowTx

func (c *Jrpc) BlackwhiteShowTx(parm *BlackwhiteShowTx, result *interface{}) error

BlackwhiteShowTx 出示游戏密钥的RPC接口

func (*Jrpc) BlackwhiteTimeoutDoneTx

func (c *Jrpc) BlackwhiteTimeoutDoneTx(parm *BlackwhiteTimeoutDoneTx, result *interface{}) error

BlackwhiteTimeoutDoneTx 游戏超时RPC接口

Jump to

Keyboard shortcuts

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