genrpc

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenMarkdown

func GenMarkdown(res *parsecode.Result, port int, destDir string) error

GenMarkdown - generate rpc document in markdown format.

func GenRPC

func GenRPC(res *parsecode.Result, port int, owner, outDir string) error

GenRPC - generate the rpc server go source

func VerifySign

func VerifySign(filename, signFile string) bool

VerifySign - verify the file

Types

type FatFunction

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

FatFunction - flat params

type RPCExport

type RPCExport struct {
	PackageName  string
	ReceiverName string
	ContractName string
	Version      string
	Owner        string
	Imports      map[parsecode.Import]struct{}
	Functions    []FatFunction
	MFunctions   []FatFunction
	IFunctions   []FatFunction
	Port         int

	PlainUserStruct []string
}

RPCExport - the functions for rpc & autogen types

func Res2rpc

func Res2rpc(res *parsecode.Result, flag int64) RPCExport

Res2rpc - transform the parsed result to RPC Export struct

type SignInfo

type SignInfo struct {
	PubKey      string `json:"pubKey"`
	BcbAddr     string `json:"bcbAddr"`
	BcbTestAddr string `json:"bcbTestAddr"`
	DevTestAddr string `json:"devTestAddr"`
	SignStr     string `json:"signStr"`
}

SignInfo - sign info of the json file

Jump to

Keyboard shortcuts

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