telegraph

package
v0.0.0-...-a566a6b Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const HTML_REGEX_PATTERN = `<.*?>`

Variables

View Source
var CoreDataTypes = []string{"String", "Integer", "Boolean", "Object"}
View Source
var Methods []string
View Source
var Types []string

Functions

func FindMethodsAndTypes

func FindMethodsAndTypes(doc soup.Root)

func GetDescription

func GetDescription(children []soup.Root) string

func IsMethodRequired

func IsMethodRequired(children []soup.Root) bool

func IsTypeOptional

func IsTypeOptional(children []soup.Root) bool

Types

type Attrubute

type Attrubute struct {
	Name        string       `json:"name"`
	DataType    DataTypeInfo `json:"data_type"`
	Optional    bool         `json:"optional"`
	Description string       `json:"description"`
}

func GetTypeAttr

func GetTypeAttr(m soup.Root) []Attrubute

type DataTypeInfo

type DataTypeInfo struct {
	Name    string `json:"name"`
	IsArray bool   `json:"is_array"`
}

func GetDataType

func GetDataType(children []soup.Root) DataTypeInfo

type Method

type Method struct {
	Name          string      `json:"name"`
	Returns       string      `json:"returns"`
	Description   string      `json:"description"`
	SampleRequest string      `json:"sample_request"`
	Parameters    []Parameter `json:"parameters"`
}

func GetMethods

func GetMethods(doc soup.Root) []Method

type Parameter

type Parameter struct {
	Name        string       `json:"name"`
	DataType    DataTypeInfo `json:"data_type"`
	Required    bool         `json:"required"`
	Description string       `json:"description"`
}

func GetMethodParams

func GetMethodParams(m soup.Root) []Parameter

type Result

type Result struct {
	Methods []Method `json:"methods"`
	Types   []Type   `json:"types"`
}

func MakeResult

func MakeResult(doc soup.Root) Result

type Type

type Type struct {
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Attributes  []Attrubute `json:"attributes"`
}

func GetTypes

func GetTypes(doc soup.Root) []Type

Jump to

Keyboard shortcuts

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