tlparser

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCode

func ParseCode(reader io.Reader, schema *Schema) error

Types

type Class

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

type Function

type Function struct {
	Name          string       `json:"name"`
	Description   string       `json:"description"`
	Class         string       `json:"class"`
	Properties    []*Property  `json:"properties"`
	IsSynchronous bool         `json:"is_synchronous"`
	Type          FunctionType `json:"type"`
}

type FunctionType

type FunctionType int
const (
	FUNCTION_TYPE_UNKNOWN FunctionType = iota
	FUNCTION_TYPE_COMMON
	FUNCTION_TYPE_USER
	FUNCTION_TYPE_BOT
)

type Property

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

type Schema

type Schema struct {
	Types     []*Type     `json:"types"`
	Classes   []*Class    `json:"classes"`
	Functions []*Function `json:"functions"`
}

func Parse

func Parse(reader io.Reader) (*Schema, error)

type Type

type Type struct {
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Class       string      `json:"class"`
	Properties  []*Property `json:"properties"`
}

Jump to

Keyboard shortcuts

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