rpc

package
v0.0.0-...-649a59b Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const WeCrossRPCModelTag = "WeCrossRPCModel"

Variables

This section is empty.

Functions

This section is empty.

Types

type RemoteCall

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

func NewRemoteCall

func NewRemoteCall(weCrossService service.WeCrossService, httpMethod string, uri string, responseType response.ResponseType, request *types.Request) *RemoteCall

func (*RemoteCall) AsyncSend

func (rc *RemoteCall) AsyncSend(back *types.CallBack)

func (*RemoteCall) Send

type WeCrossRPC

type WeCrossRPC interface {
	Test() *RemoteCall
	SupportedStubs() *RemoteCall
	QueryPub() *RemoteCall
	QueryAuthCode() *RemoteCall
	ListAccount() *RemoteCall
	ListResources(ignoreRemote bool) *RemoteCall
	Detail(path string) *RemoteCall
	Call(path, method string, args ...string) *RemoteCall
	SendTransaction(path, method string, args ...string) *RemoteCall
	Invoke(path, method string, args ...string) *RemoteCall
	CallXA(transactionID, path, method string, args ...string) *RemoteCall
	SendXATransaction(transactionID, path, method string, args ...string) *RemoteCall
	StartXATransaction(transactionID string, paths []string) *RemoteCall
	CommitXATransaction(transactionID string, paths []string) *RemoteCall
	RollbackXATransaction(transactionID string, paths []string) *RemoteCall
	GetXATransaction(transactionID string, paths []string) *RemoteCall
	CustomCommand(command string, path string, args ...any) *RemoteCall
	ListXATransactions(size int) *RemoteCall
	Register(name, password string) (*RemoteCall, *common.WeCrossSDKError)
	Login(name, password string) (*RemoteCall, *common.WeCrossSDKError)
	Logout() *RemoteCall
	AddChainAccount(chainType string, chainAccount account.ChainAccount) *RemoteCall

	// chainAccount and keyID should be input at least one, and first use the chainAccount.
	// when use keyID to represent the account, please input chainAccount as nil
	SetDefaultAccount(chainType string, chainAccount account.ChainAccount, keyID int) *RemoteCall
	GetCurrentTransactionID() string
}

type WeCrossRPCModel

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

func NewWeCrossRPCModel

func NewWeCrossRPCModel(weCrossService service.WeCrossService) *WeCrossRPCModel

func (*WeCrossRPCModel) AddChainAccount

func (w *WeCrossRPCModel) AddChainAccount(chainType string, chainAccount account.ChainAccount) *RemoteCall

func (*WeCrossRPCModel) Call

func (w *WeCrossRPCModel) Call(path, method string, args ...string) *RemoteCall

func (*WeCrossRPCModel) CallXA

func (w *WeCrossRPCModel) CallXA(transactionID, path, method string, args ...string) *RemoteCall

func (*WeCrossRPCModel) CommitXATransaction

func (w *WeCrossRPCModel) CommitXATransaction(transactionID string, paths []string) *RemoteCall

func (*WeCrossRPCModel) CustomCommand

func (w *WeCrossRPCModel) CustomCommand(command string, path string, args ...any) *RemoteCall

func (*WeCrossRPCModel) Detail

func (w *WeCrossRPCModel) Detail(path string) *RemoteCall

func (*WeCrossRPCModel) GetCurrentTransactionID

func (w *WeCrossRPCModel) GetCurrentTransactionID() string

func (*WeCrossRPCModel) GetXATransaction

func (w *WeCrossRPCModel) GetXATransaction(transactionID string, paths []string) *RemoteCall

func (*WeCrossRPCModel) Invoke

func (w *WeCrossRPCModel) Invoke(path, method string, args ...string) *RemoteCall

func (*WeCrossRPCModel) ListAccount

func (w *WeCrossRPCModel) ListAccount() *RemoteCall

func (*WeCrossRPCModel) ListResources

func (w *WeCrossRPCModel) ListResources(ignoreRemote bool) *RemoteCall

func (*WeCrossRPCModel) ListXATransactions

func (w *WeCrossRPCModel) ListXATransactions(size int) *RemoteCall

func (*WeCrossRPCModel) Login

func (w *WeCrossRPCModel) Login(name, password string) (*RemoteCall, *common.WeCrossSDKError)

func (*WeCrossRPCModel) Logout

func (w *WeCrossRPCModel) Logout() *RemoteCall

func (*WeCrossRPCModel) QueryAuthCode

func (w *WeCrossRPCModel) QueryAuthCode() *RemoteCall

func (*WeCrossRPCModel) QueryPub

func (w *WeCrossRPCModel) QueryPub() *RemoteCall

func (*WeCrossRPCModel) Register

func (w *WeCrossRPCModel) Register(name, password string) (*RemoteCall, *common.WeCrossSDKError)

func (*WeCrossRPCModel) RollbackXATransaction

func (w *WeCrossRPCModel) RollbackXATransaction(transactionID string, paths []string) *RemoteCall

func (*WeCrossRPCModel) SendTransaction

func (w *WeCrossRPCModel) SendTransaction(path, method string, args ...string) *RemoteCall

func (*WeCrossRPCModel) SendXATransaction

func (w *WeCrossRPCModel) SendXATransaction(transactionID, path, method string, args ...string) *RemoteCall

func (*WeCrossRPCModel) SetDefaultAccount

func (w *WeCrossRPCModel) SetDefaultAccount(chainType string, chainAccount account.ChainAccount, keyID int) *RemoteCall

func (*WeCrossRPCModel) StartXATransaction

func (w *WeCrossRPCModel) StartXATransaction(transactionID string, paths []string) *RemoteCall

func (*WeCrossRPCModel) SupportedStubs

func (w *WeCrossRPCModel) SupportedStubs() *RemoteCall

func (*WeCrossRPCModel) Test

func (w *WeCrossRPCModel) Test() *RemoteCall

Jump to

Keyboard shortcuts

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