go-tdlib/tlparser/type.go

44 lines
1 KiB
Go
Raw Permalink Normal View History

2018-08-30 14:55:42 +00:00
package tlparser
type Schema struct {
2018-10-23 12:49:10 +00:00
Types []*Type `json:"types"`
Classes []*Class `json:"classes"`
Functions []*Function `json:"functions"`
2018-08-30 14:55:42 +00:00
}
type Type struct {
2018-10-23 12:49:10 +00:00
Name string `json:"name"`
Description string `json:"description"`
Class string `json:"class"`
Properties []*Property `json:"properties"`
2018-08-30 14:55:42 +00:00
}
type Class struct {
2018-10-23 12:49:10 +00:00
Name string `json:"name"`
Description string `json:"description"`
2018-08-30 14:55:42 +00:00
}
2018-10-19 18:06:07 +00:00
type FunctionType int
const (
2018-10-23 12:49:10 +00:00
FUNCTION_TYPE_UNKNOWN FunctionType = iota
FUNCTION_TYPE_COMMON
FUNCTION_TYPE_USER
FUNCTION_TYPE_BOT
2018-10-19 18:06:07 +00:00
)
2018-08-30 14:55:42 +00:00
type Function struct {
2018-10-23 12:49:10 +00:00
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"`
2018-08-30 14:55:42 +00:00
}
type Property struct {
2018-10-23 12:49:10 +00:00
Name string `json:"name"`
Type string `json:"type"`
Description string `json:"description"`
2018-08-30 14:55:42 +00:00
}