client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient(target string) (types.Chain33Client, error)

func ParseError

func ParseError(err error) error

Types

type AddrbookClient

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

func NewAddrbookCient

func NewAddrbookCient(cli Cli) *AddrbookClient

func (*AddrbookClient) QueryBlackList

func (c *AddrbookClient) QueryBlackList(req *atypes.ReqGetBlackList) (*atypes.ReplyGetBlackList, error)

func (*AddrbookClient) QueryFriends

func (c *AddrbookClient) QueryFriends(req *atypes.ReqGetFriends) (*atypes.ReplyGetFriends, error)

func (*AddrbookClient) QueryServerGroup

func (*AddrbookClient) QueryUser

func (c *AddrbookClient) QueryUser(req *atypes.ReqGetUser) (*atypes.ReplyGetUser, error)

func (*AddrbookClient) UpdateBlackList

func (c *AddrbookClient) UpdateBlackList(priv crypto.PrivKey, data []*atypes.ReqUpdateBlackList) ([]*types.ReceiptLog, error)

func (*AddrbookClient) UpdateFriends

func (c *AddrbookClient) UpdateFriends(priv crypto.PrivKey, data []*atypes.ReqUpdateFriend) ([]*types.ReceiptLog, error)

func (*AddrbookClient) UpdateServerGroup

func (c *AddrbookClient) UpdateServerGroup(priv crypto.PrivKey, data []*atypes.ReqUpdateServerGroup) ([]*types.ReceiptLog, error)

func (*AddrbookClient) UpdateUser

func (c *AddrbookClient) UpdateUser(priv crypto.PrivKey, data []*atypes.ReqUpdateField) ([]*types.ReceiptLog, error)

type Cli

type Cli interface {
	Send(tx *types.Transaction) ([]*types.ReceiptLog, error)    // sync
	SendAsync(tx *types.Transaction) (txHash []byte, err error) // async
	Query(fn string, msg proto.Message) ([]byte, error)
	GetLastHeader() (int64, error)
}

type ExecCli

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

func NewExecCli

func NewExecCli(cfgFile string) *ExecCli

func (*ExecCli) GetLastHeader

func (c *ExecCli) GetLastHeader() (int64, error)

func (*ExecCli) Query

func (c *ExecCli) Query(fn string, msg proto.Message) ([]byte, error)

func (*ExecCli) Send

func (c *ExecCli) Send(tx *types.Transaction) ([]*types.ReceiptLog, error)

func (*ExecCli) SendAsync

func (c *ExecCli) SendAsync(tx *types.Transaction) (txHash []byte, err error)

type GRPCCli

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

func NewGRPCCli

func NewGRPCCli(grpcAddr string) *GRPCCli

func (*GRPCCli) GetLastHeader

func (c *GRPCCli) GetLastHeader() (int64, error)

func (*GRPCCli) Query

func (c *GRPCCli) Query(fn string, msg proto.Message) ([]byte, error)

func (*GRPCCli) Send

func (c *GRPCCli) Send(tx *types.Transaction) ([]*types.ReceiptLog, error)

func (*GRPCCli) SendAsync

func (c *GRPCCli) SendAsync(tx *types.Transaction) (txHash []byte, err error)

Jump to

Keyboard shortcuts

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