parser

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ABI

type ABI struct {
	Methods   []GetMethod `xml:"get_method"`
	Internals []Message   `xml:"internal"`
	Externals []Message   `xml:"external"`
	Types     []string    `xml:"types"`
}

func ParseABI

func ParseABI(s []byte) (ABI, error)

type Generator

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

func NewGenerator

func NewGenerator(knownTypes map[string]string, abi ABI) (*Generator, error)

func (*Generator) CollectedTypes

func (g *Generator) CollectedTypes() string

func (*Generator) GenerateMsgDecoder

func (g *Generator) GenerateMsgDecoder() string

func (*Generator) GetMethods

func (g *Generator) GetMethods() (string, error)

func (*Generator) RenderInvocationOrderList

func (g *Generator) RenderInvocationOrderList() (string, error)

type GetMethod

type GetMethod struct {
	Tag   xml.Name
	Input struct {
		StackValues []StackRecord `xml:",any"`
	} `xml:"input"`
	Name       string            `xml:"name,attr"`
	Interfaces []string          `xml:"interface,attr"`
	ID         int               `xml:"id,attr"`
	Output     []GetMethodOutput `xml:"output"`
	// GolangName defines a name of a golang function generated to execute this get method.
	GolangName string `xml:"golang_name,attr"`
}

func ParseMethod

func ParseMethod(s []byte) (GetMethod, error)

func (GetMethod) GolangFunctionName

func (m GetMethod) GolangFunctionName() string

func (GetMethod) UsedByIntrospection

func (m GetMethod) UsedByIntrospection() bool

type GetMethodOutput

type GetMethodOutput struct {
	Version     string        `xml:"version,attr"`
	FixedLength bool          `xml:"fixed_length,attr"`
	Stack       []StackRecord `xml:",any"`
	Interface   string        `xml:"interface,attr"`
}

func (GetMethodOutput) FullResultName

func (o GetMethodOutput) FullResultName(methodName string) string

type Message

type Message struct {
	Name       string   `xml:"name,attr"`
	Input      string   `xml:",chardata"`
	Interfaces []string `xml:"interface,attr"`
}

type StackRecord

type StackRecord struct {
	XMLName       xml.Name
	Name          string        `xml:"name,attr"`
	Nullable      bool          `xml:"nullable,attr"`
	List          bool          `xml:"list,attr"`
	Type          string        `xml:",chardata"`
	RequiredValue string        `xml:"required_value,attr"`
	SubStack      []StackRecord `xml:",any"`
}

type TLBMsgBody

type TLBMsgBody struct {
	TypeName      string
	OperationName string
	Tag           uint64
	Code          string
}

Jump to

Keyboard shortcuts

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