Documentation
¶
Overview ¶
Code generated by vktl/cmd/tlgen2; DO NOT EDIT.
Index ¶
- func GetTLName(tag uint32, notFoundName string) string
- func SchemaCommit() string
- func SchemaGenerator() string
- func SchemaTimestamp() uint32
- func SchemaURL() string
- func SetGlobalFactoryCreateForEnumElement(itemTag uint32)
- func SetGlobalFactoryCreateForEnumElementBytes(itemTag uint32)
- func SetGlobalFactoryCreateForFunction(itemTag uint32, createObject func() Object, createFunction func() Function, ...)
- func SetGlobalFactoryCreateForFunctionBytes(itemTag uint32, createObject func() Object, createFunction func() Function, ...)
- func SetGlobalFactoryCreateForObject(itemTag uint32, createObject func() Object)
- func SetGlobalFactoryCreateForObjectBytes(itemTag uint32, createObject func() Object)
- type Function
- type Object
- type TLItem
- func (item TLItem) AnnotationRead() bool
- func (item TLItem) AnnotationReadwrite() bool
- func (item TLItem) CreateFunction() Function
- func (item TLItem) CreateFunctionLong() Function
- func (item TLItem) CreateObject() Object
- func (item *TLItem) FillRandom(rg *basictl.RandGenerator)
- func (item TLItem) HasFunctionLong() bool
- func (item TLItem) HasUnionTypesInArguments() bool
- func (item TLItem) HasUnionTypesInResult() bool
- func (item TLItem) IsFunction() bool
- func (item *TLItem) MarshalJSON() ([]byte, error)
- func (item *TLItem) Read(w []byte) ([]byte, error)
- func (item *TLItem) ReadBoxed(w []byte) ([]byte, error)
- func (item *TLItem) ReadJSON(legacyTypeNames bool, in *basictl.JsonLexer) error
- func (item *TLItem) Reset()
- func (item TLItem) String() string
- func (item TLItem) TLName() string
- func (item TLItem) TLTag() uint32
- func (item *TLItem) UnmarshalJSON(b []byte) error
- func (item *TLItem) Write(w []byte) []byte
- func (item *TLItem) WriteBoxed(w []byte) []byte
- func (item *TLItem) WriteBoxedGeneral(w []byte) ([]byte, error)
- func (item *TLItem) WriteGeneral(w []byte) ([]byte, error)
- func (item *TLItem) WriteJSON(w []byte) []byte
- func (item *TLItem) WriteJSONGeneral(w []byte) (_ []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SchemaCommit ¶ added in v1.1.10
func SchemaCommit() string
func SchemaGenerator ¶ added in v1.1.10
func SchemaGenerator() string
func SchemaTimestamp ¶ added in v1.1.10
func SchemaTimestamp() uint32
func SetGlobalFactoryCreateForEnumElement ¶
func SetGlobalFactoryCreateForEnumElement(itemTag uint32)
func SetGlobalFactoryCreateForEnumElementBytes ¶ added in v1.1.7
func SetGlobalFactoryCreateForEnumElementBytes(itemTag uint32)
func SetGlobalFactoryCreateForFunctionBytes ¶ added in v1.1.7
func SetGlobalFactoryCreateForObjectBytes ¶ added in v1.1.7
Types ¶
type Function ¶
type Function interface { Object ReadResultWriteResultJSON(r []byte, w []byte) ([]byte, []byte, error) // combination of ReadResult(r) + WriteResultJSON(w). Returns new r, new w, plus error ReadResultJSONWriteResult(r []byte, w []byte) ([]byte, []byte, error) // combination of ReadResultJSON(r) + WriteResult(w). Returns new r, new w, plus error // For transcoding short-long version during Long ID and newTypeNames transition ReadResultWriteResultJSONOpt(newTypeNames bool, short bool, r []byte, w []byte) ([]byte, []byte, error) }
func CreateFunction ¶
func CreateFunctionBytes ¶ added in v1.1.7
func CreateFunctionFromName ¶
name can be in any of 3 forms "ch_proxy.insert#7cf362ba", "ch_proxy.insert" or "#7cf362ba"
func CreateFunctionFromNameBytes ¶ added in v1.1.7
name can be in any of 3 forms "ch_proxy.insert#7cf362ba", "ch_proxy.insert" or "#7cf362ba"
type Object ¶
type Object interface { TLName() string // returns type's TL name. For union, returns constructor name depending on actual union value TLTag() uint32 // returns type's TL tag. For union, returns constructor tag depending on actual union value String() string // returns type's representation for debugging (JSON for now) FillRandom(rg *basictl.RandGenerator) Read(w []byte) ([]byte, error) // reads type's bare TL representation by consuming bytes from the start of w and returns remaining bytes, plus error ReadBoxed(w []byte) ([]byte, error) // same as Read, but reads/checks TLTag first (this method is general version of Write, use it only when you are working with interface) WriteGeneral(w []byte) ([]byte, error) // appends bytes of type's bare TL representation to the end of w and returns it, plus error WriteBoxedGeneral(w []byte) ([]byte, error) // same as Write, but writes TLTag first (this method is general version of WriteBoxed, use it only when you are working with interface) MarshalJSON() ([]byte, error) // returns type's JSON representation, plus error UnmarshalJSON([]byte) error // reads type's JSON representation ReadJSON(legacyTypeNames bool, in *basictl.JsonLexer) error WriteJSONGeneral(w []byte) ([]byte, error) // like MarshalJSON, but appends to w and returns it (this method is general version of WriteBoxed, use it only when you are working with interface) }
We can create only types which have zero type arguments and zero nat arguments
func CreateObject ¶
func CreateObjectBytes ¶ added in v1.1.7
func CreateObjectFromName ¶
name can be in any of 3 forms "ch_proxy.insert#7cf362ba", "ch_proxy.insert" or "#7cf362ba"
func CreateObjectFromNameBytes ¶ added in v1.1.7
name can be in any of 3 forms "ch_proxy.insert#7cf362ba", "ch_proxy.insert" or "#7cf362ba"
type TLItem ¶
type TLItem struct {
// contains filtered or unexported fields
}
func FactoryItemByTLName ¶
func FactoryItemByTLTag ¶
func GetAllTLItems ¶
func GetAllTLItems() []TLItem
func (TLItem) AnnotationReadwrite ¶
func (TLItem) CreateFunction ¶
func (TLItem) CreateFunctionLong ¶
func (TLItem) CreateObject ¶
func (*TLItem) FillRandom ¶
func (item *TLItem) FillRandom(rg *basictl.RandGenerator)
func (TLItem) HasFunctionLong ¶
For transcoding short-long version during Long ID transition
func (TLItem) HasUnionTypesInArguments ¶ added in v1.1.11
func (TLItem) HasUnionTypesInResult ¶ added in v1.1.11
func (TLItem) IsFunction ¶
func (*TLItem) MarshalJSON ¶
func (*TLItem) Reset ¶
func (item *TLItem) Reset()
TLItem serves as a single type for all enum values
func (*TLItem) UnmarshalJSON ¶
func (*TLItem) WriteBoxed ¶
Click to show internal directories.
Click to hide internal directories.