glua

package
v0.0.0-...-17003a6 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Invoke         = "Invoke"
	Transfer       = "Transfer"
	Option         = "Option"
	Result         = "Result"
	Query          = "Query"
	SetContext     = "SetContext"
	Statistic      = "Statistic"
	DeployContract = "DeployContract"
)

Variables

This section is empty.

Functions

func Go2Lua

func Go2Lua(L *lua.LState, val interface{}) lua.LValue

Go2Lua convert go interface val to lua.LValue value and reutrn

func Lua2Go

func Lua2Go(value lua.LValue) (interface{}, error)

Lua2Go convert lua.LValue to corresponding type

func NewClientLValue

func NewClientLValue(L *lua.LState, client fcom.Blockchain) lua.LValue

func NewLIndexLValue

func NewLIndexLValue(L *lua.LState, idx *idex.Index) lua.LValue

func NewResultLValue

func NewResultLValue(L *lua.LState, r *fcom.Result) lua.LValue

func NewToolKitLValue

func NewToolKitLValue(L *lua.LState, kit *toolkit.ToolKit) lua.LValue

func TableLua2GoStruct

func TableLua2GoStruct(tbl *lua.LTable, st interface{}) error

TableLua2GoStruct maps the lua table to the given struct pointer.

Types

type FakeChain

type FakeChain struct {
	Name string
	// contains filtered or unexported fields
}

func NewMock

func NewMock() (client *FakeChain, err error)

func (*FakeChain) Confirm

func (chain *FakeChain) Confirm(rt *fcom.Result, ops ...fcom.Option) *fcom.Result

func (*FakeChain) DeployContract

func (chain *FakeChain) DeployContract() error

func (*FakeChain) GetContext

func (chain *FakeChain) GetContext() (string, error)

func (*FakeChain) Invoke

func (chain *FakeChain) Invoke(invoke fcom.Invoke, ops ...fcom.Option) *fcom.Result

func (*FakeChain) LogStatus

func (chain *FakeChain) LogStatus() (int64, error)

func (*FakeChain) Option

func (chain *FakeChain) Option(op fcom.Option) error

func (*FakeChain) Query

func (chain *FakeChain) Query(bq fcom.Query, ops ...fcom.Option) interface{}

func (*FakeChain) ResetContext

func (chain *FakeChain) ResetContext() error

func (*FakeChain) SetContext

func (chain *FakeChain) SetContext(ctx string) error

func (*FakeChain) Statistic

func (chain *FakeChain) Statistic(statistic fcom.Statistic) (*fcom.RemoteStatistic, error)

func (*FakeChain) Transfer

func (chain *FakeChain) Transfer(transfer fcom.Transfer, ops ...fcom.Option) *fcom.Result

Jump to

Keyboard shortcuts

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