tlparser

package
v0.0.0-...-d1c98d5 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClassInfo

type ClassInfo struct {
	Name        string     `json:"name"`
	Properties  []Property `json:"properties"`
	Description string     `json:"description"`
	RootName    string     `json:"rootName"`
}

ClassInfo holds info of a Class in .tl file

type EnumInfo

type EnumInfo struct {
	EnumType string         `json:"enumType"`
	Items    []EnumInfoItem `json:"items"`
}

EnumInfo ...

type EnumInfoItem

type EnumInfoItem struct {
	OriginalType string `json:"original_type"`
	GolangType   string `json:"golang_type"`
}

type FunctionInfo

type FunctionInfo struct {
	Name          string     `json:"name"`
	Properties    []Property `json:"properties"`
	Description   string     `json:"description"`
	ReturnType    string     `json:"return_type"`
	IsSynchronous bool       `json:"is_synchronous"`
}

FunctionInfo holds info of a function in .tl file

type InterfaceInfo

type InterfaceInfo struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

InterfaceInfo equals to abstract base classes in .tl file

type Property

type Property struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Description string `json:"description"`
}

Property holds info about properties of a class (or function)

type TlSchema

type TlSchema struct {
	Enums      []*EnumInfo
	Interfaces []*InterfaceInfo
	Classes    []*ClassInfo
	Functions  []*FunctionInfo
}

func ParseInputSchema

func ParseInputSchema(reader io.Reader) (*TlSchema, error)

Jump to

Keyboard shortcuts

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