genstub

package
v0.0.0-...-24d451d Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenConStFactory

func GenConStFactory(reses []*parsecode.Result, outDir string)

GenConStFactory - generate the contract stub factory go source

func GenIBCStub

func GenIBCStub(res *parsecode.Result, outDir string)

GenIBCStub - generate the ibc stub go source

func GenInterfaceStub

func GenInterfaceStub(res *parsecode.Result, outDir string)

GenInterfaceStub - generate the interface stub go source

func GenMethodStub

func GenMethodStub(res *parsecode.Result, outDir string)

GenMethodStub - generate the method stub go source

func GenStFactory

func GenStFactory(res *parsecode.Result, outDir string)

GenStubFactory - generate the interface stub factory go source

func GenStubCommon

func GenStubCommon(rootDir string)

GenStubCommon - generate the stub common go source

Types

type FatFunction

type FatFunction struct {
	parsecode.Function
	SingleParams []parsecode.Field
}

FatFunction - flat params

type OrgContracts

type OrgContracts struct {
	OrgIDs         []string
	DirectionNames []string
	ContractNames  []string
	PackageNames   []string
	Versions       []string
}

type StubExport

type StubExport struct {
	DirectionName  string
	PackageName    string
	ReceiverName   string
	ContractName   string
	ContractStruct string
	Version        string
	Versions       []string
	OrgID          string
	Owner          string
	Imports        map[parsecode.Import]struct{}
	Functions      []FatFunction
	MFunctions     []FatFunction
	IFunctions     []FatFunction
	TFunctions     []FatFunction
	Port           int

	IsExistUpdateChain bool
	IsExistInitChain   bool
	IsExistMine        bool
	PlainUserStruct    []string
}

RPCExport - the functions for rpc & autogen types

func Res2stub

func Res2stub(res *parsecode.Result, funcType int) StubExport

Res2rpc - transform the parsed result to RPC Export struct funcType: 0:method, 1:interface, 2:ibc

Jump to

Keyboard shortcuts

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