td

package
v0.113.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package td contains generated code from example schema and is used for codegen testing.

Index

Constants

View Source
const AbstractMessageClassName = "AbstractMessage"

AbstractMessageClassName is schema name of AbstractMessageClass.

View Source
const AccountThemesClassName = "account.Themes"

AccountThemesClassName is schema name of AccountThemesClass.

View Source
const AccountThemesNotModifiedTypeID = 0xf41eb622

AccountThemesNotModifiedTypeID is TL type id of AccountThemesNotModified.

View Source
const AccountThemesTypeID = 0x7f676421

AccountThemesTypeID is TL type id of AccountThemes.

View Source
const AuthClassName = "Auth"

AuthClassName is schema name of AuthClass.

View Source
const AuthPasswordTypeID = 0x29bacabb

AuthPasswordTypeID is TL type id of AuthPassword.

View Source
const AuthTypeID = 0xf8bb4a38

AuthTypeID is TL type id of Auth.

View Source
const BigMessageTypeID = 0x7490dcc5

BigMessageTypeID is TL type id of BigMessage.

View Source
const BoolClassName = "Bool"

BoolClassName is schema name of BoolClass.

View Source
const BytesMessageTypeID = 0xf990a67d

BytesMessageTypeID is TL type id of BytesMessage.

View Source
const BytesTypeID = 0xe937bb82

BytesTypeID is TL type id of Bytes.

View Source
const ClientDHInnerDataTypeID = 0x6643b654

ClientDHInnerDataTypeID is TL type id of ClientDHInnerData.

View Source
const ConfigTypeID = 0x330b4067

ConfigTypeID is TL type id of Config.

View Source
const DCOptionTypeID = 0x18b7a10d

DCOptionTypeID is TL type id of DCOption.

View Source
const DoAuthRequestTypeID = 0xfd2f6687

DoAuthRequestTypeID is TL type id of DoAuthRequest.

View Source
const EchoVectorRequestTypeID = 0xd4785939

EchoVectorRequestTypeID is TL type id of EchoVectorRequest.

View Source
const ErrorTypeID = 0x14feebbc

ErrorTypeID is TL type id of Error.

View Source
const FalseTypeID = 0xbc799737

FalseTypeID is TL type id of False.

View Source
const FieldsMessageTypeID = 0x947225b5

FieldsMessageTypeID is TL type id of FieldsMessage.

View Source
const GetUpdatesRespTypeID = 0x300bb5e1

GetUpdatesRespTypeID is TL type id of GetUpdatesResp.

View Source
const Int32TypeID = 0x5cb934fa

Int32TypeID is TL type id of Int32.

View Source
const IntVectorTypeID = bin.TypeVector

IntVectorTypeID is TL type id of IntVector.

View Source
const InvokeWithLayerTypeID = 0xda9b0d0d

InvokeWithLayerTypeID is TL type id of InvokeWithLayer.

View Source
const MessageTypeID = 0xec200d96

MessageTypeID is TL type id of Message.

View Source
const NoMessageTypeID = 0xee6324c4

NoMessageTypeID is TL type id of NoMessage.

View Source
const OkTypeID = 0xd4edbe69

OkTypeID is TL type id of Ok.

View Source
const PingRequestTypeID = 0xce73048f

PingRequestTypeID is TL type id of PingRequest.

View Source
const ResponseClassName = "Response"

ResponseClassName is schema name of ResponseClass.

View Source
const ResponseIDTypeID = 0x85d7fd8b

ResponseIDTypeID is TL type id of ResponseID.

View Source
const ResponseTextTypeID = 0xcb0244f2

ResponseTextTypeID is TL type id of ResponseText.

View Source
const SMSTypeID = 0xed8bebfe

SMSTypeID is TL type id of SMS.

View Source
const SendMultipleSMSRequestTypeID = 0xdf18e5ca

SendMultipleSMSRequestTypeID is TL type id of SendMultipleSMSRequest.

View Source
const SendRequestTypeID = 0xf74488a

SendRequestTypeID is TL type id of SendRequest.

View Source
const StringTypeID = 0xb5286e24

StringTypeID is TL type id of String.

View Source
const TargetsMessageTypeID = 0xcc6136f1

TargetsMessageTypeID is TL type id of TargetsMessage.

View Source
const TestBytesTypeID = 0xa422c4de

TestBytesTypeID is TL type id of TestBytes.

View Source
const TestIntTypeID = 0xddbd2c09

TestIntTypeID is TL type id of TestInt.

View Source
const TestStringTypeID = 0xfe56688c

TestStringTypeID is TL type id of TestString.

View Source
const TestVectorBytesTypeID = 0xa590fb25

TestVectorBytesTypeID is TL type id of TestVectorBytes.

View Source
const TestVectorIntObjectTypeID = 0xf152999b

TestVectorIntObjectTypeID is TL type id of TestVectorIntObject.

View Source
const TestVectorIntTypeID = 0xdf9eb113

TestVectorIntTypeID is TL type id of TestVectorInt.

View Source
const TestVectorStringObjectTypeID = 0xe5ecc0d

TestVectorStringObjectTypeID is TL type id of TestVectorStringObject.

View Source
const TestVectorStringTypeID = 0x5d6f85bc

TestVectorStringTypeID is TL type id of TestVectorString.

View Source
const TestVectorVectorTypeID = 0x69e8846c

TestVectorVectorTypeID is TL type id of TestVectorVector.

View Source
const TextEntitiesTypeID = 0xcf89c258

TextEntitiesTypeID is TL type id of TextEntities.

View Source
const TextEntityTypeBankCardNumberTypeID = 0x6513910

TextEntityTypeBankCardNumberTypeID is TL type id of TextEntityTypeBankCardNumber.

View Source
const TextEntityTypeBoldTypeID = 0xbcc0e1b0

TextEntityTypeBoldTypeID is TL type id of TextEntityTypeBold.

View Source
const TextEntityTypeBotCommandTypeID = 0xbb652bb3

TextEntityTypeBotCommandTypeID is TL type id of TextEntityTypeBotCommand.

View Source
const TextEntityTypeCashtagTypeID = 0x48e4374b

TextEntityTypeCashtagTypeID is TL type id of TextEntityTypeCashtag.

View Source
const TextEntityTypeClassName = "TextEntityType"

TextEntityTypeClassName is schema name of TextEntityTypeClass.

View Source
const TextEntityTypeCodeTypeID = 0xc5e9c94a

TextEntityTypeCodeTypeID is TL type id of TextEntityTypeCode.

View Source
const TextEntityTypeEmailAddressTypeID = 0x54f81821

TextEntityTypeEmailAddressTypeID is TL type id of TextEntityTypeEmailAddress.

View Source
const TextEntityTypeHashtagTypeID = 0xc2f7a2dd

TextEntityTypeHashtagTypeID is TL type id of TextEntityTypeHashtag.

View Source
const TextEntityTypeID = 0x8bab99a8

TextEntityTypeID is TL type id of TextEntity.

View Source
const TextEntityTypeItalicTypeID = 0xf8f3965d

TextEntityTypeItalicTypeID is TL type id of TextEntityTypeItalic.

View Source
const TextEntityTypeMentionNameTypeID = 0xd0d2685d

TextEntityTypeMentionNameTypeID is TL type id of TextEntityTypeMentionName.

View Source
const TextEntityTypeMentionTypeID = 0x37b3df65

TextEntityTypeMentionTypeID is TL type id of TextEntityTypeMention.

View Source
const TextEntityTypePhoneNumberTypeID = 0xbad9aa2a

TextEntityTypePhoneNumberTypeID is TL type id of TextEntityTypePhoneNumber.

View Source
const TextEntityTypePreCodeTypeID = 0xc7a77aab

TextEntityTypePreCodeTypeID is TL type id of TextEntityTypePreCode.

View Source
const TextEntityTypePreTypeID = 0x62491c8e

TextEntityTypePreTypeID is TL type id of TextEntityTypePre.

View Source
const TextEntityTypeStrikethroughTypeID = 0x394fc4fa

TextEntityTypeStrikethroughTypeID is TL type id of TextEntityTypeStrikethrough.

View Source
const TextEntityTypeTextURLTypeID = 0x1a912463

TextEntityTypeTextURLTypeID is TL type id of TextEntityTypeTextURL.

View Source
const TextEntityTypeURLTypeID = 0xb1c0d47c

TextEntityTypeURLTypeID is TL type id of TextEntityTypeURL.

View Source
const TextEntityTypeUnderlineTypeID = 0x2f39cf92

TextEntityTypeUnderlineTypeID is TL type id of TextEntityTypeUnderline.

View Source
const ThemeTypeID = 0x28f1114

ThemeTypeID is TL type id of Theme.

View Source
const TrueTypeID = 0x997275b5

TrueTypeID is TL type id of True.

View Source
const UpdateTypeID = 0xb03e2ef8

UpdateTypeID is TL type id of Update.

View Source
const UserAuthClassName = "user.Auth"

UserAuthClassName is schema name of UserAuthClass.

View Source
const UserAuthPasswordTypeID = 0x5981e317

UserAuthPasswordTypeID is TL type id of UserAuthPassword.

View Source
const UserAuthTypeID = 0xf4815592

UserAuthTypeID is TL type id of UserAuth.

Variables

This section is empty.

Functions

func ClassConstructorsMap

func ClassConstructorsMap() map[string][]uint32

ClassConstructorsMap maps class schema name to constructors type ids.

func NamesMap

func NamesMap() map[string]uint32

NamesMap returns mapping from type names to TL type ids.

func TypesConstructorMap

func TypesConstructorMap() map[uint32]func() bin.Object

TypesConstructorMap maps type ids to constructors.

func TypesMap

func TypesMap() map[uint32]string

TypesMap returns mapping from type ids to TL type names.

Types

type AbstractMessageBox

type AbstractMessageBox struct {
	AbstractMessage AbstractMessageClass
}

AbstractMessage boxes the AbstractMessageClass providing a helper.

func (*AbstractMessageBox) Decode

func (b *AbstractMessageBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for AbstractMessageBox.

func (*AbstractMessageBox) Encode

func (b *AbstractMessageBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for AbstractMessageBox.

type AbstractMessageClass

type AbstractMessageClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder

	// TypeID returns type id in TL schema.
	//
	// See https://core.telegram.org/mtproto/TL-tl#remarks.
	TypeID() uint32
	// TypeName returns name of type in TL schema.
	TypeName() string
	// String implements fmt.Stringer.
	String() string
	// Zero returns true if current object has a zero value.
	Zero() bool
	// contains filtered or unexported methods
}

AbstractMessageClass represents AbstractMessage generic type.

See https://localhost:80/doc/type/AbstractMessage for reference.

Example:

g, err := td.DecodeAbstractMessage(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *td.BigMessage: // bigMessage#7490dcc5
case *td.NoMessage: // noMessage#ee6324c4
case *td.TargetsMessage: // targetsMessage#cc6136f1
case *td.FieldsMessage: // fieldsMessage#947225b5
case *td.BytesMessage: // bytesMessage#f990a67d
default: panic(v)
}

func DecodeAbstractMessage

func DecodeAbstractMessage(buf *bin.Buffer) (AbstractMessageClass, error)

DecodeAbstractMessage implements binary de-serialization for AbstractMessageClass.

type AccountThemes

type AccountThemes struct {
	// Hash field of AccountThemes.
	Hash int
	// Themes field of AccountThemes.
	Themes []Theme
}

AccountThemes represents TL type `account.themes#7f676421`.

See https://localhost:80/doc/constructor/account.themes for reference.

func (*AccountThemes) Decode

func (t *AccountThemes) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountThemes) DecodeBare

func (t *AccountThemes) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*AccountThemes) Encode

func (t *AccountThemes) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountThemes) EncodeBare

func (t *AccountThemes) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*AccountThemes) GetHash

func (t *AccountThemes) GetHash() (value int)

GetHash returns value of Hash field.

func (*AccountThemes) GetThemes

func (t *AccountThemes) GetThemes() (value []Theme)

GetThemes returns value of Themes field.

func (*AccountThemes) String

func (t *AccountThemes) String() string

String implements fmt.Stringer.

func (*AccountThemes) TypeID

func (*AccountThemes) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*AccountThemes) TypeInfo

func (t *AccountThemes) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*AccountThemes) TypeName

func (*AccountThemes) TypeName() string

TypeName returns name of type in TL schema.

func (*AccountThemes) Zero

func (t *AccountThemes) Zero() bool

type AccountThemesBox

type AccountThemesBox struct {
	Themes AccountThemesClass
}

AccountThemes boxes the AccountThemesClass providing a helper.

func (*AccountThemesBox) Decode

func (b *AccountThemesBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for AccountThemesBox.

func (*AccountThemesBox) Encode

func (b *AccountThemesBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for AccountThemesBox.

type AccountThemesClass

type AccountThemesClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder

	// TypeID returns type id in TL schema.
	//
	// See https://core.telegram.org/mtproto/TL-tl#remarks.
	TypeID() uint32
	// TypeName returns name of type in TL schema.
	TypeName() string
	// String implements fmt.Stringer.
	String() string
	// Zero returns true if current object has a zero value.
	Zero() bool
	// contains filtered or unexported methods
}

AccountThemesClass represents account.Themes generic type.

See https://localhost:80/doc/type/account.Themes for reference.

Example:

g, err := td.DecodeAccountThemes(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *td.AccountThemesNotModified: // account.themesNotModified#f41eb622
case *td.AccountThemes: // account.themes#7f676421
default: panic(v)
}

func DecodeAccountThemes

func DecodeAccountThemes(buf *bin.Buffer) (AccountThemesClass, error)

DecodeAccountThemes implements binary de-serialization for AccountThemesClass.

type AccountThemesNotModified

type AccountThemesNotModified struct {
}

AccountThemesNotModified represents TL type `account.themesNotModified#f41eb622`.

See https://localhost:80/doc/constructor/account.themesNotModified for reference.

func (*AccountThemesNotModified) Decode

func (t *AccountThemesNotModified) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountThemesNotModified) DecodeBare

func (t *AccountThemesNotModified) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*AccountThemesNotModified) Encode

func (t *AccountThemesNotModified) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountThemesNotModified) EncodeBare

func (t *AccountThemesNotModified) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*AccountThemesNotModified) String

func (t *AccountThemesNotModified) String() string

String implements fmt.Stringer.

func (*AccountThemesNotModified) TypeID

func (*AccountThemesNotModified) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*AccountThemesNotModified) TypeInfo

func (t *AccountThemesNotModified) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*AccountThemesNotModified) TypeName

func (*AccountThemesNotModified) TypeName() string

TypeName returns name of type in TL schema.

func (*AccountThemesNotModified) Zero

func (t *AccountThemesNotModified) Zero() bool

type Auth

type Auth struct {
	// Name field of Auth.
	Name string
}

Auth represents TL type `auth#f8bb4a38`.

See https://localhost:80/doc/constructor/auth for reference.

func (*Auth) Decode

func (a *Auth) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Auth) DecodeBare

func (a *Auth) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*Auth) Encode

func (a *Auth) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Auth) EncodeBare

func (a *Auth) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*Auth) GetName

func (a *Auth) GetName() (value string)

GetName returns value of Name field.

func (*Auth) String

func (a *Auth) String() string

String implements fmt.Stringer.

func (*Auth) TypeID

func (*Auth) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*Auth) TypeInfo

func (a *Auth) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*Auth) TypeName

func (*Auth) TypeName() string

TypeName returns name of type in TL schema.

func (*Auth) Zero

func (a *Auth) Zero() bool

type AuthBox

type AuthBox struct {
	Auth AuthClass
}

Auth boxes the AuthClass providing a helper.

func (*AuthBox) Decode

func (b *AuthBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for AuthBox.

func (*AuthBox) Encode

func (b *AuthBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for AuthBox.

type AuthClass

type AuthClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder

	// TypeID returns type id in TL schema.
	//
	// See https://core.telegram.org/mtproto/TL-tl#remarks.
	TypeID() uint32
	// TypeName returns name of type in TL schema.
	TypeName() string
	// String implements fmt.Stringer.
	String() string
	// Zero returns true if current object has a zero value.
	Zero() bool

	// Name field of Auth.
	GetName() (value string)
	// contains filtered or unexported methods
}

AuthClass represents Auth generic type.

See https://localhost:80/doc/type/Auth for reference.

Example:

g, err := td.DecodeAuth(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *td.Auth: // auth#f8bb4a38
case *td.AuthPassword: // authPassword#29bacabb
default: panic(v)
}

func DecodeAuth

func DecodeAuth(buf *bin.Buffer) (AuthClass, error)

DecodeAuth implements binary de-serialization for AuthClass.

type AuthPassword

type AuthPassword struct {
	// Name field of AuthPassword.
	Name string
	// Password field of AuthPassword.
	Password string
}

AuthPassword represents TL type `authPassword#29bacabb`.

See https://localhost:80/doc/constructor/authPassword for reference.

func (*AuthPassword) Decode

func (a *AuthPassword) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthPassword) DecodeBare

func (a *AuthPassword) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*AuthPassword) Encode

func (a *AuthPassword) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthPassword) EncodeBare

func (a *AuthPassword) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*AuthPassword) GetName

func (a *AuthPassword) GetName() (value string)

GetName returns value of Name field.

func (*AuthPassword) GetPassword

func (a *AuthPassword) GetPassword() (value string)

GetPassword returns value of Password field.

func (*AuthPassword) String

func (a *AuthPassword) String() string

String implements fmt.Stringer.

func (*AuthPassword) TypeID

func (*AuthPassword) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*AuthPassword) TypeInfo

func (a *AuthPassword) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*AuthPassword) TypeName

func (*AuthPassword) TypeName() string

TypeName returns name of type in TL schema.

func (*AuthPassword) Zero

func (a *AuthPassword) Zero() bool

type BigMessage

type BigMessage struct {
	// ID field of BigMessage.
	ID int32
	// Count field of BigMessage.
	Count int32
	// TargetID field of BigMessage.
	TargetID int32
	// Escape field of BigMessage.
	Escape bool
	// Summary field of BigMessage.
	Summary bool
}

BigMessage represents TL type `bigMessage#7490dcc5`.

See https://localhost:80/doc/constructor/bigMessage for reference.

func (*BigMessage) Decode

func (b *BigMessage) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BigMessage) DecodeBare

func (b *BigMessage) DecodeBare(buf *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*BigMessage) Encode

func (b *BigMessage) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BigMessage) EncodeBare

func (b *BigMessage) EncodeBare(buf *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*BigMessage) GetCount

func (b *BigMessage) GetCount() (value int32)

GetCount returns value of Count field.

func (*BigMessage) GetEscape

func (b *BigMessage) GetEscape() (value bool)

GetEscape returns value of Escape field.

func (*BigMessage) GetID

func (b *BigMessage) GetID() (value int32)

GetID returns value of ID field.

func (*BigMessage) GetSummary

func (b *BigMessage) GetSummary() (value bool)

GetSummary returns value of Summary field.

func (*BigMessage) GetTargetID

func (b *BigMessage) GetTargetID() (value int32)

GetTargetID returns value of TargetID field.

func (*BigMessage) String

func (b *BigMessage) String() string

String implements fmt.Stringer.

func (*BigMessage) TypeID

func (*BigMessage) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*BigMessage) TypeInfo

func (b *BigMessage) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*BigMessage) TypeName

func (*BigMessage) TypeName() string

TypeName returns name of type in TL schema.

func (*BigMessage) Zero

func (b *BigMessage) Zero() bool

type BoolBox

type BoolBox struct {
	Bool BoolClass
}

Bool boxes the BoolClass providing a helper.

func (*BoolBox) Decode

func (b *BoolBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for BoolBox.

func (*BoolBox) Encode

func (b *BoolBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for BoolBox.

type BoolClass

type BoolClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder

	// TypeID returns type id in TL schema.
	//
	// See https://core.telegram.org/mtproto/TL-tl#remarks.
	TypeID() uint32
	// TypeName returns name of type in TL schema.
	TypeName() string
	// String implements fmt.Stringer.
	String() string
	// Zero returns true if current object has a zero value.
	Zero() bool
	// contains filtered or unexported methods
}

BoolClass represents Bool generic type.

See https://localhost:80/doc/type/Bool for reference.

Example:

g, err := td.DecodeBool(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *td.False: // false#bc799737
case *td.True: // true#997275b5
default: panic(v)
}

func DecodeBool

func DecodeBool(buf *bin.Buffer) (BoolClass, error)

DecodeBool implements binary de-serialization for BoolClass.

type Bytes

type Bytes struct {
}

Bytes represents TL type `bytes#e937bb82`.

See https://localhost:80/doc/constructor/bytes for reference.

func (*Bytes) Decode

func (b *Bytes) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*Bytes) DecodeBare

func (b *Bytes) DecodeBare(buf *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*Bytes) Encode

func (b *Bytes) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*Bytes) EncodeBare

func (b *Bytes) EncodeBare(buf *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*Bytes) String

func (b *Bytes) String() string

String implements fmt.Stringer.

func (*Bytes) TypeID

func (*Bytes) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*Bytes) TypeInfo

func (b *Bytes) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*Bytes) TypeName

func (*Bytes) TypeName() string

TypeName returns name of type in TL schema.

func (*Bytes) Zero

func (b *Bytes) Zero() bool

type BytesMessage

type BytesMessage struct {
	// Data field of BytesMessage.
	Data []byte
}

BytesMessage represents TL type `bytesMessage#f990a67d`.

See https://localhost:80/doc/constructor/bytesMessage for reference.

func (*BytesMessage) Decode

func (b *BytesMessage) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BytesMessage) DecodeBare

func (b *BytesMessage) DecodeBare(buf *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*BytesMessage) Encode

func (b *BytesMessage) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BytesMessage) EncodeBare

func (b *BytesMessage) EncodeBare(buf *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*BytesMessage) GetData

func (b *BytesMessage) GetData() (value []byte)

GetData returns value of Data field.

func (*BytesMessage) String

func (b *BytesMessage) String() string

String implements fmt.Stringer.

func (*BytesMessage) TypeID

func (*BytesMessage) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*BytesMessage) TypeInfo

func (b *BytesMessage) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*BytesMessage) TypeName

func (*BytesMessage) TypeName() string

TypeName returns name of type in TL schema.

func (*BytesMessage) Zero

func (b *BytesMessage) Zero() bool

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implement methods for calling functions from TL schema via Invoker.

func NewClient

func NewClient(invoker Invoker) *Client

NewClient creates new Client.

func (*Client) DoAuth

func (c *Client) DoAuth(ctx context.Context) (AuthClass, error)

DoAuth invokes method doAuth#fd2f6687 returning error if any.

See https://localhost:80/doc/method/doAuth for reference.

func (*Client) EchoVector

func (c *Client) EchoVector(ctx context.Context, ids []int) ([]int, error)

EchoVector invokes method echoVector#d4785939 returning error if any.

See https://localhost:80/doc/method/echoVector for reference.

func (*Client) Invoker

func (c *Client) Invoker() Invoker

Invoker returns Invoker used by this client.

func (*Client) Ping

func (c *Client) Ping(ctx context.Context, id int32) error

Ping invokes method ping#ce73048f returning error if any.

See https://localhost:80/doc/constructor/ping for reference.

func (*Client) Send

func (c *Client) Send(ctx context.Context, msg SMS) (*SMS, error)

Send invokes method send#f74488a returning error if any.

See https://localhost:80/doc/method/send for reference.

func (*Client) SendMultipleSMS

func (c *Client) SendMultipleSMS(ctx context.Context, messages []SMS) error

SendMultipleSMS invokes method sendMultipleSMS#df18e5ca returning error if any.

See https://localhost:80/doc/constructor/sendMultipleSMS for reference.

type ClientDHInnerData

type ClientDHInnerData struct {
	// Nonce field of ClientDHInnerData.
	Nonce bin.Int128
	// ServerNonce field of ClientDHInnerData.
	ServerNonce bin.Int128
	// RetryID field of ClientDHInnerData.
	RetryID int64
	// GB field of ClientDHInnerData.
	GB string
}

ClientDHInnerData represents TL type `client_DH_inner_data#6643b654`.

See https://localhost:80/doc/constructor/client_DH_inner_data for reference.

func (*ClientDHInnerData) Decode

func (c *ClientDHInnerData) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ClientDHInnerData) DecodeBare

func (c *ClientDHInnerData) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*ClientDHInnerData) Encode

func (c *ClientDHInnerData) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ClientDHInnerData) EncodeBare

func (c *ClientDHInnerData) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*ClientDHInnerData) GetGB

func (c *ClientDHInnerData) GetGB() (value string)

GetGB returns value of GB field.

func (*ClientDHInnerData) GetNonce

func (c *ClientDHInnerData) GetNonce() (value bin.Int128)

GetNonce returns value of Nonce field.

func (*ClientDHInnerData) GetRetryID

func (c *ClientDHInnerData) GetRetryID() (value int64)

GetRetryID returns value of RetryID field.

func (*ClientDHInnerData) GetServerNonce

func (c *ClientDHInnerData) GetServerNonce() (value bin.Int128)

GetServerNonce returns value of ServerNonce field.

func (*ClientDHInnerData) String

func (c *ClientDHInnerData) String() string

String implements fmt.Stringer.

func (*ClientDHInnerData) TypeID

func (*ClientDHInnerData) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*ClientDHInnerData) TypeInfo

func (c *ClientDHInnerData) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*ClientDHInnerData) TypeName

func (*ClientDHInnerData) TypeName() string

TypeName returns name of type in TL schema.

func (*ClientDHInnerData) Zero

func (c *ClientDHInnerData) Zero() bool

type Config

type Config struct {
	// Flags field of Config.
	Flags bin.Fields
	// PhonecallsEnabled field of Config.
	PhonecallsEnabled bool
	// DefaultP2PContacts field of Config.
	DefaultP2PContacts bool
	// PreloadFeaturedStickers field of Config.
	PreloadFeaturedStickers bool
	// IgnorePhoneEntities field of Config.
	IgnorePhoneEntities bool
	// RevokePmInbox field of Config.
	RevokePmInbox bool
	// BlockedMode field of Config.
	BlockedMode bool
	// PFSEnabled field of Config.
	PFSEnabled bool
	// Date field of Config.
	Date int
	// Expires field of Config.
	Expires int
	// TestMode field of Config.
	TestMode bool
	// ThisDC field of Config.
	ThisDC int
	// DCOptions field of Config.
	DCOptions []DCOption
	// DCTxtDomainName field of Config.
	DCTxtDomainName string
	// ChatSizeMax field of Config.
	ChatSizeMax int
	// MegagroupSizeMax field of Config.
	MegagroupSizeMax int
	// ForwardedCountMax field of Config.
	ForwardedCountMax int
	// OnlineUpdatePeriodMs field of Config.
	OnlineUpdatePeriodMs int
	// OfflineBlurTimeoutMs field of Config.
	OfflineBlurTimeoutMs int
	// OfflineIdleTimeoutMs field of Config.
	OfflineIdleTimeoutMs int
	// OnlineCloudTimeoutMs field of Config.
	OnlineCloudTimeoutMs int
	// NotifyCloudDelayMs field of Config.
	NotifyCloudDelayMs int
	// NotifyDefaultDelayMs field of Config.
	NotifyDefaultDelayMs int
	// PushChatPeriodMs field of Config.
	PushChatPeriodMs int
	// PushChatLimit field of Config.
	PushChatLimit int
	// SavedGifsLimit field of Config.
	SavedGifsLimit int
	// EditTimeLimit field of Config.
	EditTimeLimit int
	// RevokeTimeLimit field of Config.
	RevokeTimeLimit int
	// RevokePmTimeLimit field of Config.
	RevokePmTimeLimit int
	// RatingEDecay field of Config.
	RatingEDecay int
	// StickersRecentLimit field of Config.
	StickersRecentLimit int
	// StickersFavedLimit field of Config.
	StickersFavedLimit int
	// ChannelsReadMediaPeriod field of Config.
	ChannelsReadMediaPeriod int
	// TmpSessions field of Config.
	//
	// Use SetTmpSessions and GetTmpSessions helpers.
	TmpSessions int
	// PinnedDialogsCountMax field of Config.
	PinnedDialogsCountMax int
	// PinnedInfolderCountMax field of Config.
	PinnedInfolderCountMax int
	// CallReceiveTimeoutMs field of Config.
	CallReceiveTimeoutMs int
	// CallRingTimeoutMs field of Config.
	CallRingTimeoutMs int
	// CallConnectTimeoutMs field of Config.
	CallConnectTimeoutMs int
	// CallPacketTimeoutMs field of Config.
	CallPacketTimeoutMs int
	// MeURLPrefix field of Config.
	MeURLPrefix string
	// AutoupdateURLPrefix field of Config.
	//
	// Use SetAutoupdateURLPrefix and GetAutoupdateURLPrefix helpers.
	AutoupdateURLPrefix string
	// GifSearchUsername field of Config.
	//
	// Use SetGifSearchUsername and GetGifSearchUsername helpers.
	GifSearchUsername string
	// VenueSearchUsername field of Config.
	//
	// Use SetVenueSearchUsername and GetVenueSearchUsername helpers.
	VenueSearchUsername string
	// ImgSearchUsername field of Config.
	//
	// Use SetImgSearchUsername and GetImgSearchUsername helpers.
	ImgSearchUsername string
	// StaticMapsProvider field of Config.
	//
	// Use SetStaticMapsProvider and GetStaticMapsProvider helpers.
	StaticMapsProvider string
	// CaptionLengthMax field of Config.
	CaptionLengthMax int
	// MessageLengthMax field of Config.
	MessageLengthMax int
	// WebfileDCID field of Config.
	WebfileDCID int
	// SuggestedLangCode field of Config.
	//
	// Use SetSuggestedLangCode and GetSuggestedLangCode helpers.
	SuggestedLangCode string
	// LangPackVersion field of Config.
	//
	// Use SetLangPackVersion and GetLangPackVersion helpers.
	LangPackVersion int
	// BaseLangPackVersion field of Config.
	//
	// Use SetBaseLangPackVersion and GetBaseLangPackVersion helpers.
	BaseLangPackVersion int
}

Config represents TL type `config#330b4067`.

See https://localhost:80/doc/constructor/config for reference.

func (*Config) Decode

func (c *Config) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Config) DecodeBare

func (c *Config) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*Config) Encode

func (c *Config) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Config) EncodeBare

func (c *Config) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*Config) GetAutoupdateURLPrefix

func (c *Config) GetAutoupdateURLPrefix() (value string, ok bool)

GetAutoupdateURLPrefix returns value of AutoupdateURLPrefix conditional field and boolean which is true if field was set.

func (*Config) GetBaseLangPackVersion

func (c *Config) GetBaseLangPackVersion() (value int, ok bool)

GetBaseLangPackVersion returns value of BaseLangPackVersion conditional field and boolean which is true if field was set.

func (*Config) GetBlockedMode

func (c *Config) GetBlockedMode() (value bool)

GetBlockedMode returns value of BlockedMode conditional field.

func (*Config) GetCallConnectTimeoutMs

func (c *Config) GetCallConnectTimeoutMs() (value int)

GetCallConnectTimeoutMs returns value of CallConnectTimeoutMs field.

func (*Config) GetCallPacketTimeoutMs

func (c *Config) GetCallPacketTimeoutMs() (value int)

GetCallPacketTimeoutMs returns value of CallPacketTimeoutMs field.

func (*Config) GetCallReceiveTimeoutMs

func (c *Config) GetCallReceiveTimeoutMs() (value int)

GetCallReceiveTimeoutMs returns value of CallReceiveTimeoutMs field.

func (*Config) GetCallRingTimeoutMs

func (c *Config) GetCallRingTimeoutMs() (value int)

GetCallRingTimeoutMs returns value of CallRingTimeoutMs field.

func (*Config) GetCaptionLengthMax

func (c *Config) GetCaptionLengthMax() (value int)

GetCaptionLengthMax returns value of CaptionLengthMax field.

func (*Config) GetChannelsReadMediaPeriod

func (c *Config) GetChannelsReadMediaPeriod() (value int)

GetChannelsReadMediaPeriod returns value of ChannelsReadMediaPeriod field.

func (*Config) GetChatSizeMax

func (c *Config) GetChatSizeMax() (value int)

GetChatSizeMax returns value of ChatSizeMax field.

func (*Config) GetDCOptions

func (c *Config) GetDCOptions() (value []DCOption)

GetDCOptions returns value of DCOptions field.

func (*Config) GetDCTxtDomainName

func (c *Config) GetDCTxtDomainName() (value string)

GetDCTxtDomainName returns value of DCTxtDomainName field.

func (*Config) GetDate

func (c *Config) GetDate() (value int)

GetDate returns value of Date field.

func (*Config) GetDefaultP2PContacts

func (c *Config) GetDefaultP2PContacts() (value bool)

GetDefaultP2PContacts returns value of DefaultP2PContacts conditional field.

func (*Config) GetEditTimeLimit

func (c *Config) GetEditTimeLimit() (value int)

GetEditTimeLimit returns value of EditTimeLimit field.

func (*Config) GetExpires

func (c *Config) GetExpires() (value int)

GetExpires returns value of Expires field.

func (*Config) GetForwardedCountMax

func (c *Config) GetForwardedCountMax() (value int)

GetForwardedCountMax returns value of ForwardedCountMax field.

func (*Config) GetGifSearchUsername

func (c *Config) GetGifSearchUsername() (value string, ok bool)

GetGifSearchUsername returns value of GifSearchUsername conditional field and boolean which is true if field was set.

func (*Config) GetIgnorePhoneEntities

func (c *Config) GetIgnorePhoneEntities() (value bool)

GetIgnorePhoneEntities returns value of IgnorePhoneEntities conditional field.

func (*Config) GetImgSearchUsername

func (c *Config) GetImgSearchUsername() (value string, ok bool)

GetImgSearchUsername returns value of ImgSearchUsername conditional field and boolean which is true if field was set.

func (*Config) GetLangPackVersion

func (c *Config) GetLangPackVersion() (value int, ok bool)

GetLangPackVersion returns value of LangPackVersion conditional field and boolean which is true if field was set.

func (*Config) GetMeURLPrefix

func (c *Config) GetMeURLPrefix() (value string)

GetMeURLPrefix returns value of MeURLPrefix field.

func (*Config) GetMegagroupSizeMax

func (c *Config) GetMegagroupSizeMax() (value int)

GetMegagroupSizeMax returns value of MegagroupSizeMax field.

func (*Config) GetMessageLengthMax

func (c *Config) GetMessageLengthMax() (value int)

GetMessageLengthMax returns value of MessageLengthMax field.

func (*Config) GetNotifyCloudDelayMs

func (c *Config) GetNotifyCloudDelayMs() (value int)

GetNotifyCloudDelayMs returns value of NotifyCloudDelayMs field.

func (*Config) GetNotifyDefaultDelayMs

func (c *Config) GetNotifyDefaultDelayMs() (value int)

GetNotifyDefaultDelayMs returns value of NotifyDefaultDelayMs field.

func (*Config) GetOfflineBlurTimeoutMs

func (c *Config) GetOfflineBlurTimeoutMs() (value int)

GetOfflineBlurTimeoutMs returns value of OfflineBlurTimeoutMs field.

func (*Config) GetOfflineIdleTimeoutMs

func (c *Config) GetOfflineIdleTimeoutMs() (value int)

GetOfflineIdleTimeoutMs returns value of OfflineIdleTimeoutMs field.

func (*Config) GetOnlineCloudTimeoutMs

func (c *Config) GetOnlineCloudTimeoutMs() (value int)

GetOnlineCloudTimeoutMs returns value of OnlineCloudTimeoutMs field.

func (*Config) GetOnlineUpdatePeriodMs

func (c *Config) GetOnlineUpdatePeriodMs() (value int)

GetOnlineUpdatePeriodMs returns value of OnlineUpdatePeriodMs field.

func (*Config) GetPFSEnabled

func (c *Config) GetPFSEnabled() (value bool)

GetPFSEnabled returns value of PFSEnabled conditional field.

func (*Config) GetPhonecallsEnabled

func (c *Config) GetPhonecallsEnabled() (value bool)

GetPhonecallsEnabled returns value of PhonecallsEnabled conditional field.

func (*Config) GetPinnedDialogsCountMax

func (c *Config) GetPinnedDialogsCountMax() (value int)

GetPinnedDialogsCountMax returns value of PinnedDialogsCountMax field.

func (*Config) GetPinnedInfolderCountMax

func (c *Config) GetPinnedInfolderCountMax() (value int)

GetPinnedInfolderCountMax returns value of PinnedInfolderCountMax field.

func (*Config) GetPreloadFeaturedStickers

func (c *Config) GetPreloadFeaturedStickers() (value bool)

GetPreloadFeaturedStickers returns value of PreloadFeaturedStickers conditional field.

func (*Config) GetPushChatLimit

func (c *Config) GetPushChatLimit() (value int)

GetPushChatLimit returns value of PushChatLimit field.

func (*Config) GetPushChatPeriodMs

func (c *Config) GetPushChatPeriodMs() (value int)

GetPushChatPeriodMs returns value of PushChatPeriodMs field.

func (*Config) GetRatingEDecay

func (c *Config) GetRatingEDecay() (value int)

GetRatingEDecay returns value of RatingEDecay field.

func (*Config) GetRevokePmInbox

func (c *Config) GetRevokePmInbox() (value bool)

GetRevokePmInbox returns value of RevokePmInbox conditional field.

func (*Config) GetRevokePmTimeLimit

func (c *Config) GetRevokePmTimeLimit() (value int)

GetRevokePmTimeLimit returns value of RevokePmTimeLimit field.

func (*Config) GetRevokeTimeLimit

func (c *Config) GetRevokeTimeLimit() (value int)

GetRevokeTimeLimit returns value of RevokeTimeLimit field.

func (*Config) GetSavedGifsLimit

func (c *Config) GetSavedGifsLimit() (value int)

GetSavedGifsLimit returns value of SavedGifsLimit field.

func (*Config) GetStaticMapsProvider

func (c *Config) GetStaticMapsProvider() (value string, ok bool)

GetStaticMapsProvider returns value of StaticMapsProvider conditional field and boolean which is true if field was set.

func (*Config) GetStickersFavedLimit

func (c *Config) GetStickersFavedLimit() (value int)

GetStickersFavedLimit returns value of StickersFavedLimit field.

func (*Config) GetStickersRecentLimit

func (c *Config) GetStickersRecentLimit() (value int)

GetStickersRecentLimit returns value of StickersRecentLimit field.

func (*Config) GetSuggestedLangCode

func (c *Config) GetSuggestedLangCode() (value string, ok bool)

GetSuggestedLangCode returns value of SuggestedLangCode conditional field and boolean which is true if field was set.

func (*Config) GetTestMode

func (c *Config) GetTestMode() (value bool)

GetTestMode returns value of TestMode field.

func (*Config) GetThisDC

func (c *Config) GetThisDC() (value int)

GetThisDC returns value of ThisDC field.

func (*Config) GetTmpSessions

func (c *Config) GetTmpSessions() (value int, ok bool)

GetTmpSessions returns value of TmpSessions conditional field and boolean which is true if field was set.

func (*Config) GetVenueSearchUsername

func (c *Config) GetVenueSearchUsername() (value string, ok bool)

GetVenueSearchUsername returns value of VenueSearchUsername conditional field and boolean which is true if field was set.

func (*Config) GetWebfileDCID

func (c *Config) GetWebfileDCID() (value int)

GetWebfileDCID returns value of WebfileDCID field.

func (*Config) SetAutoupdateURLPrefix

func (c *Config) SetAutoupdateURLPrefix(value string)

SetAutoupdateURLPrefix sets value of AutoupdateURLPrefix conditional field.

func (*Config) SetBaseLangPackVersion

func (c *Config) SetBaseLangPackVersion(value int)

SetBaseLangPackVersion sets value of BaseLangPackVersion conditional field.

func (*Config) SetBlockedMode

func (c *Config) SetBlockedMode(value bool)

SetBlockedMode sets value of BlockedMode conditional field.

func (*Config) SetDefaultP2PContacts

func (c *Config) SetDefaultP2PContacts(value bool)

SetDefaultP2PContacts sets value of DefaultP2PContacts conditional field.

func (*Config) SetFlags

func (c *Config) SetFlags()

SetFlags sets flags for non-zero fields.

func (*Config) SetGifSearchUsername

func (c *Config) SetGifSearchUsername(value string)

SetGifSearchUsername sets value of GifSearchUsername conditional field.

func (*Config) SetIgnorePhoneEntities

func (c *Config) SetIgnorePhoneEntities(value bool)

SetIgnorePhoneEntities sets value of IgnorePhoneEntities conditional field.

func (*Config) SetImgSearchUsername

func (c *Config) SetImgSearchUsername(value string)

SetImgSearchUsername sets value of ImgSearchUsername conditional field.

func (*Config) SetLangPackVersion

func (c *Config) SetLangPackVersion(value int)

SetLangPackVersion sets value of LangPackVersion conditional field.

func (*Config) SetPFSEnabled

func (c *Config) SetPFSEnabled(value bool)

SetPFSEnabled sets value of PFSEnabled conditional field.

func (*Config) SetPhonecallsEnabled

func (c *Config) SetPhonecallsEnabled(value bool)

SetPhonecallsEnabled sets value of PhonecallsEnabled conditional field.

func (*Config) SetPreloadFeaturedStickers

func (c *Config) SetPreloadFeaturedStickers(value bool)

SetPreloadFeaturedStickers sets value of PreloadFeaturedStickers conditional field.

func (*Config) SetRevokePmInbox

func (c *Config) SetRevokePmInbox(value bool)

SetRevokePmInbox sets value of RevokePmInbox conditional field.

func (*Config) SetStaticMapsProvider

func (c *Config) SetStaticMapsProvider(value string)

SetStaticMapsProvider sets value of StaticMapsProvider conditional field.

func (*Config) SetSuggestedLangCode

func (c *Config) SetSuggestedLangCode(value string)

SetSuggestedLangCode sets value of SuggestedLangCode conditional field.

func (*Config) SetTmpSessions

func (c *Config) SetTmpSessions(value int)

SetTmpSessions sets value of TmpSessions conditional field.

func (*Config) SetVenueSearchUsername

func (c *Config) SetVenueSearchUsername(value string)

SetVenueSearchUsername sets value of VenueSearchUsername conditional field.

func (*Config) String

func (c *Config) String() string

String implements fmt.Stringer.

func (*Config) TypeID

func (*Config) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*Config) TypeInfo

func (c *Config) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*Config) TypeName

func (*Config) TypeName() string

TypeName returns name of type in TL schema.

func (*Config) Zero

func (c *Config) Zero() bool

type DCOption

type DCOption struct {
	// Flags field of DCOption.
	Flags bin.Fields
	// Ipv6 field of DCOption.
	Ipv6 bool
	// MediaOnly field of DCOption.
	MediaOnly bool
	// TCPObfuscatedOnly field of DCOption.
	TCPObfuscatedOnly bool
	// CDN field of DCOption.
	CDN bool
	// Static field of DCOption.
	Static bool
	// ID field of DCOption.
	ID int
	// IPAddress field of DCOption.
	IPAddress string
	// Port field of DCOption.
	Port int
	// Secret field of DCOption.
	//
	// Use SetSecret and GetSecret helpers.
	Secret []byte
}

DCOption represents TL type `dcOption#18b7a10d`.

See https://localhost:80/doc/constructor/dcOption for reference.

func (*DCOption) Decode

func (d *DCOption) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DCOption) DecodeBare

func (d *DCOption) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*DCOption) Encode

func (d *DCOption) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DCOption) EncodeBare

func (d *DCOption) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*DCOption) GetCDN

func (d *DCOption) GetCDN() (value bool)

GetCDN returns value of CDN conditional field.

func (*DCOption) GetID

func (d *DCOption) GetID() (value int)

GetID returns value of ID field.

func (*DCOption) GetIPAddress

func (d *DCOption) GetIPAddress() (value string)

GetIPAddress returns value of IPAddress field.

func (*DCOption) GetIpv6

func (d *DCOption) GetIpv6() (value bool)

GetIpv6 returns value of Ipv6 conditional field.

func (*DCOption) GetMediaOnly

func (d *DCOption) GetMediaOnly() (value bool)

GetMediaOnly returns value of MediaOnly conditional field.

func (*DCOption) GetPort

func (d *DCOption) GetPort() (value int)

GetPort returns value of Port field.

func (*DCOption) GetSecret

func (d *DCOption) GetSecret() (value []byte, ok bool)

GetSecret returns value of Secret conditional field and boolean which is true if field was set.

func (*DCOption) GetStatic

func (d *DCOption) GetStatic() (value bool)

GetStatic returns value of Static conditional field.

func (*DCOption) GetTCPObfuscatedOnly

func (d *DCOption) GetTCPObfuscatedOnly() (value bool)

GetTCPObfuscatedOnly returns value of TCPObfuscatedOnly conditional field.

func (*DCOption) SetCDN

func (d *DCOption) SetCDN(value bool)

SetCDN sets value of CDN conditional field.

func (*DCOption) SetFlags

func (d *DCOption) SetFlags()

SetFlags sets flags for non-zero fields.

func (*DCOption) SetIpv6

func (d *DCOption) SetIpv6(value bool)

SetIpv6 sets value of Ipv6 conditional field.

func (*DCOption) SetMediaOnly

func (d *DCOption) SetMediaOnly(value bool)

SetMediaOnly sets value of MediaOnly conditional field.

func (*DCOption) SetSecret

func (d *DCOption) SetSecret(value []byte)

SetSecret sets value of Secret conditional field.

func (*DCOption) SetStatic

func (d *DCOption) SetStatic(value bool)

SetStatic sets value of Static conditional field.

func (*DCOption) SetTCPObfuscatedOnly

func (d *DCOption) SetTCPObfuscatedOnly(value bool)

SetTCPObfuscatedOnly sets value of TCPObfuscatedOnly conditional field.

func (*DCOption) String

func (d *DCOption) String() string

String implements fmt.Stringer.

func (*DCOption) TypeID

func (*DCOption) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*DCOption) TypeInfo

func (d *DCOption) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*DCOption) TypeName

func (*DCOption) TypeName() string

TypeName returns name of type in TL schema.

func (*DCOption) Zero

func (d *DCOption) Zero() bool

type DoAuthRequest

type DoAuthRequest struct {
}

DoAuthRequest represents TL type `doAuth#fd2f6687`.

See https://localhost:80/doc/method/doAuth for reference.

func (*DoAuthRequest) Decode

func (d *DoAuthRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DoAuthRequest) DecodeBare

func (d *DoAuthRequest) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*DoAuthRequest) Encode

func (d *DoAuthRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DoAuthRequest) EncodeBare

func (d *DoAuthRequest) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*DoAuthRequest) String

func (d *DoAuthRequest) String() string

String implements fmt.Stringer.

func (*DoAuthRequest) TypeID

func (*DoAuthRequest) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*DoAuthRequest) TypeInfo

func (d *DoAuthRequest) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*DoAuthRequest) TypeName

func (*DoAuthRequest) TypeName() string

TypeName returns name of type in TL schema.

func (*DoAuthRequest) Zero

func (d *DoAuthRequest) Zero() bool

type EchoVectorRequest

type EchoVectorRequest struct {
	// IDs field of EchoVectorRequest.
	IDs []int
}

EchoVectorRequest represents TL type `echoVector#d4785939`.

See https://localhost:80/doc/method/echoVector for reference.

func (*EchoVectorRequest) Decode

func (e *EchoVectorRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EchoVectorRequest) DecodeBare

func (e *EchoVectorRequest) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*EchoVectorRequest) Encode

func (e *EchoVectorRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EchoVectorRequest) EncodeBare

func (e *EchoVectorRequest) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*EchoVectorRequest) GetIDs

func (e *EchoVectorRequest) GetIDs() (value []int)

GetIDs returns value of IDs field.

func (*EchoVectorRequest) String

func (e *EchoVectorRequest) String() string

String implements fmt.Stringer.

func (*EchoVectorRequest) TypeID

func (*EchoVectorRequest) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*EchoVectorRequest) TypeInfo

func (e *EchoVectorRequest) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*EchoVectorRequest) TypeName

func (*EchoVectorRequest) TypeName() string

TypeName returns name of type in TL schema.

func (*EchoVectorRequest) Zero

func (e *EchoVectorRequest) Zero() bool

type Error

type Error struct {
	// Error code; subject to future changes. If the error code is 406, the error message
	// must not be processed in any way and must not be displayed to the user
	Code int32
	// Error message; subject to future changes
	Message string
	// Temporary field of Error.
	Temporary bool
}

Error represents TL type `error#14feebbc`.

See https://localhost:80/doc/constructor/error for reference.

func (*Error) Decode

func (e *Error) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Error) DecodeBare

func (e *Error) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*Error) Encode

func (e *Error) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Error) EncodeBare

func (e *Error) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*Error) GetCode

func (e *Error) GetCode() (value int32)

GetCode returns value of Code field.

func (*Error) GetMessage

func (e *Error) GetMessage() (value string)

GetMessage returns value of Message field.

func (*Error) GetTemporary

func (e *Error) GetTemporary() (value bool)

GetTemporary returns value of Temporary field.

func (*Error) String

func (e *Error) String() string

String implements fmt.Stringer.

func (*Error) TypeID

func (*Error) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*Error) TypeInfo

func (e *Error) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*Error) TypeName

func (*Error) TypeName() string

TypeName returns name of type in TL schema.

func (*Error) Zero

func (e *Error) Zero() bool

type False

type False struct {
}

False represents TL type `false#bc799737`.

See https://localhost:80/doc/constructor/false for reference.

func (*False) Decode

func (f *False) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*False) DecodeBare

func (f *False) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*False) Encode

func (f *False) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*False) EncodeBare

func (f *False) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*False) String

func (f *False) String() string

String implements fmt.Stringer.

func (*False) TypeID

func (*False) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*False) TypeInfo

func (f *False) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*False) TypeName

func (*False) TypeName() string

TypeName returns name of type in TL schema.

func (*False) Zero

func (f *False) Zero() bool

type FieldsMessage

type FieldsMessage struct {
	// Flags field of FieldsMessage.
	Flags bin.Fields
	// Escape field of FieldsMessage.
	//
	// Use SetEscape and GetEscape helpers.
	Escape bool
	// TTLSeconds field of FieldsMessage.
	//
	// Use SetTTLSeconds and GetTTLSeconds helpers.
	TTLSeconds int
}

FieldsMessage represents TL type `fieldsMessage#947225b5`.

See https://localhost:80/doc/constructor/fieldsMessage for reference.

func (*FieldsMessage) Decode

func (f *FieldsMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*FieldsMessage) DecodeBare

func (f *FieldsMessage) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*FieldsMessage) Encode

func (f *FieldsMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*FieldsMessage) EncodeBare

func (f *FieldsMessage) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*FieldsMessage) GetEscape

func (f *FieldsMessage) GetEscape() (value bool, ok bool)

GetEscape returns value of Escape conditional field and boolean which is true if field was set.

func (*FieldsMessage) GetTTLSeconds

func (f *FieldsMessage) GetTTLSeconds() (value int, ok bool)

GetTTLSeconds returns value of TTLSeconds conditional field and boolean which is true if field was set.

func (*FieldsMessage) SetEscape

func (f *FieldsMessage) SetEscape(value bool)

SetEscape sets value of Escape conditional field.

func (*FieldsMessage) SetFlags

func (f *FieldsMessage) SetFlags()

SetFlags sets flags for non-zero fields.

func (*FieldsMessage) SetTTLSeconds

func (f *FieldsMessage) SetTTLSeconds(value int)

SetTTLSeconds sets value of TTLSeconds conditional field.

func (*FieldsMessage) String

func (f *FieldsMessage) String() string

String implements fmt.Stringer.

func (*FieldsMessage) TypeID

func (*FieldsMessage) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*FieldsMessage) TypeInfo

func (f *FieldsMessage) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*FieldsMessage) TypeName

func (*FieldsMessage) TypeName() string

TypeName returns name of type in TL schema.

func (*FieldsMessage) Zero

func (f *FieldsMessage) Zero() bool

type GetUpdatesResp

type GetUpdatesResp struct {
	// Updates field of GetUpdatesResp.
	Updates []AbstractMessageClass
}

GetUpdatesResp represents TL type `getUpdatesResp#300bb5e1`.

See https://localhost:80/doc/constructor/getUpdatesResp for reference.

func (*GetUpdatesResp) Decode

func (g *GetUpdatesResp) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*GetUpdatesResp) DecodeBare

func (g *GetUpdatesResp) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*GetUpdatesResp) Encode

func (g *GetUpdatesResp) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*GetUpdatesResp) EncodeBare

func (g *GetUpdatesResp) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*GetUpdatesResp) GetUpdates

func (g *GetUpdatesResp) GetUpdates() (value []AbstractMessageClass)

GetUpdates returns value of Updates field.

func (*GetUpdatesResp) String

func (g *GetUpdatesResp) String() string

String implements fmt.Stringer.

func (*GetUpdatesResp) TypeID

func (*GetUpdatesResp) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*GetUpdatesResp) TypeInfo

func (g *GetUpdatesResp) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*GetUpdatesResp) TypeName

func (*GetUpdatesResp) TypeName() string

TypeName returns name of type in TL schema.

func (*GetUpdatesResp) Zero

func (g *GetUpdatesResp) Zero() bool

type Int32

type Int32 struct {
}

Int32 represents TL type `int32#5cb934fa`.

See https://localhost:80/doc/constructor/int32 for reference.

func (*Int32) Decode

func (i *Int32) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Int32) DecodeBare

func (i *Int32) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*Int32) Encode

func (i *Int32) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Int32) EncodeBare

func (i *Int32) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*Int32) String

func (i *Int32) String() string

String implements fmt.Stringer.

func (*Int32) TypeID

func (*Int32) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*Int32) TypeInfo

func (i *Int32) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*Int32) TypeName

func (*Int32) TypeName() string

TypeName returns name of type in TL schema.

func (*Int32) Zero

func (i *Int32) Zero() bool

type IntVector

type IntVector struct {
	// Elements of Vector<int>
	Elems []int
}

IntVector is a box for Vector<int>

func (*IntVector) Decode

func (vec *IntVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*IntVector) DecodeBare

func (vec *IntVector) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*IntVector) Encode

func (vec *IntVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*IntVector) EncodeBare

func (vec *IntVector) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*IntVector) GetElems

func (vec *IntVector) GetElems() (value []int)

GetElems returns value of Elems field.

func (*IntVector) String

func (vec *IntVector) String() string

String implements fmt.Stringer.

func (*IntVector) TypeID

func (*IntVector) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*IntVector) TypeInfo

func (vec *IntVector) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*IntVector) TypeName

func (*IntVector) TypeName() string

TypeName returns name of type in TL schema.

func (*IntVector) Zero

func (vec *IntVector) Zero() bool

type InvokeWithLayer

type InvokeWithLayer struct {
	// Layer field of InvokeWithLayer.
	Layer int
	// Query field of InvokeWithLayer.
	Query bin.Object
}

InvokeWithLayer represents TL type `invokeWithLayer#da9b0d0d`.

See https://localhost:80/doc/constructor/invokeWithLayer for reference.

func (*InvokeWithLayer) Decode

func (i *InvokeWithLayer) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InvokeWithLayer) DecodeBare

func (i *InvokeWithLayer) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*InvokeWithLayer) Encode

func (i *InvokeWithLayer) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InvokeWithLayer) EncodeBare

func (i *InvokeWithLayer) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*InvokeWithLayer) GetLayer

func (i *InvokeWithLayer) GetLayer() (value int)

GetLayer returns value of Layer field.

func (*InvokeWithLayer) GetQuery

func (i *InvokeWithLayer) GetQuery() (value bin.Object)

GetQuery returns value of Query field.

func (*InvokeWithLayer) String

func (i *InvokeWithLayer) String() string

String implements fmt.Stringer.

func (*InvokeWithLayer) TypeID

func (*InvokeWithLayer) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*InvokeWithLayer) TypeInfo

func (i *InvokeWithLayer) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*InvokeWithLayer) TypeName

func (*InvokeWithLayer) TypeName() string

TypeName returns name of type in TL schema.

func (*InvokeWithLayer) Zero

func (i *InvokeWithLayer) Zero() bool

type Invoker

type Invoker interface {
	Invoke(ctx context.Context, input bin.Encoder, output bin.Decoder) error
}

Invoker can invoke raw MTProto rpc calls.

type Message

type Message struct {
	// Err field of Message.
	Err Error
}

Message represents TL type `message#ec200d96`.

See https://localhost:80/doc/constructor/message for reference.

func (*Message) Decode

func (m *Message) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Message) DecodeBare

func (m *Message) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*Message) Encode

func (m *Message) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Message) EncodeBare

func (m *Message) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*Message) GetErr

func (m *Message) GetErr() (value Error)

GetErr returns value of Err field.

func (*Message) String

func (m *Message) String() string

String implements fmt.Stringer.

func (*Message) TypeID

func (*Message) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*Message) TypeInfo

func (m *Message) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*Message) TypeName

func (*Message) TypeName() string

TypeName returns name of type in TL schema.

func (*Message) Zero

func (m *Message) Zero() bool

type NoMessage

type NoMessage struct {
}

NoMessage represents TL type `noMessage#ee6324c4`.

See https://localhost:80/doc/constructor/noMessage for reference.

func (*NoMessage) Decode

func (n *NoMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*NoMessage) DecodeBare

func (n *NoMessage) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*NoMessage) Encode

func (n *NoMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*NoMessage) EncodeBare

func (n *NoMessage) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*NoMessage) String

func (n *NoMessage) String() string

String implements fmt.Stringer.

func (*NoMessage) TypeID

func (*NoMessage) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*NoMessage) TypeInfo

func (n *NoMessage) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*NoMessage) TypeName

func (*NoMessage) TypeName() string

TypeName returns name of type in TL schema.

func (*NoMessage) Zero

func (n *NoMessage) Zero() bool

type Ok

type Ok struct {
}

Ok represents TL type `ok#d4edbe69`.

See https://localhost:80/doc/constructor/ok for reference.

func (*Ok) Decode

func (o *Ok) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Ok) DecodeBare

func (o *Ok) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*Ok) Encode

func (o *Ok) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Ok) EncodeBare

func (o *Ok) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*Ok) String

func (o *Ok) String() string

String implements fmt.Stringer.

func (*Ok) TypeID

func (*Ok) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*Ok) TypeInfo

func (o *Ok) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*Ok) TypeName

func (*Ok) TypeName() string

TypeName returns name of type in TL schema.

func (*Ok) Zero

func (o *Ok) Zero() bool

type PingRequest

type PingRequest struct {
	// ID field of PingRequest.
	ID int32
}

PingRequest represents TL type `ping#ce73048f`.

See https://localhost:80/doc/constructor/ping for reference.

func (*PingRequest) Decode

func (p *PingRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PingRequest) DecodeBare

func (p *PingRequest) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*PingRequest) Encode

func (p *PingRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PingRequest) EncodeBare

func (p *PingRequest) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*PingRequest) GetID

func (p *PingRequest) GetID() (value int32)

GetID returns value of ID field.

func (*PingRequest) String

func (p *PingRequest) String() string

String implements fmt.Stringer.

func (*PingRequest) TypeID

func (*PingRequest) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*PingRequest) TypeInfo

func (p *PingRequest) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*PingRequest) TypeName

func (*PingRequest) TypeName() string

TypeName returns name of type in TL schema.

func (*PingRequest) Zero

func (p *PingRequest) Zero() bool

type ResponseBox

type ResponseBox struct {
	Response ResponseClass
}

Response boxes the ResponseClass providing a helper.

func (*ResponseBox) Decode

func (b *ResponseBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ResponseBox.

func (*ResponseBox) Encode

func (b *ResponseBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ResponseBox.

type ResponseClass

type ResponseClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder

	// TypeID returns type id in TL schema.
	//
	// See https://core.telegram.org/mtproto/TL-tl#remarks.
	TypeID() uint32
	// TypeName returns name of type in TL schema.
	TypeName() string
	// String implements fmt.Stringer.
	String() string
	// Zero returns true if current object has a zero value.
	Zero() bool
	// contains filtered or unexported methods
}

ResponseClass represents Response generic type.

See https://localhost:80/doc/type/Response for reference.

Example:

g, err := td.DecodeResponse(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *td.ResponseID: // responseID#85d7fd8b
case *td.ResponseText: // responseText#cb0244f2
default: panic(v)
}

func DecodeResponse

func DecodeResponse(buf *bin.Buffer) (ResponseClass, error)

DecodeResponse implements binary de-serialization for ResponseClass.

type ResponseID

type ResponseID struct {
	// ID field of ResponseID.
	ID int32
}

ResponseID represents TL type `responseID#85d7fd8b`.

See https://localhost:80/doc/constructor/responseID for reference.

func (*ResponseID) Decode

func (r *ResponseID) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ResponseID) DecodeBare

func (r *ResponseID) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*ResponseID) Encode

func (r *ResponseID) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ResponseID) EncodeBare

func (r *ResponseID) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*ResponseID) GetID

func (r *ResponseID) GetID() (value int32)

GetID returns value of ID field.

func (*ResponseID) String

func (r *ResponseID) String() string

String implements fmt.Stringer.

func (*ResponseID) TypeID

func (*ResponseID) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*ResponseID) TypeInfo

func (r *ResponseID) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*ResponseID) TypeName

func (*ResponseID) TypeName() string

TypeName returns name of type in TL schema.

func (*ResponseID) Zero

func (r *ResponseID) Zero() bool

type ResponseText

type ResponseText struct {
	// Text field of ResponseText.
	Text string
}

ResponseText represents TL type `responseText#cb0244f2`.

See https://localhost:80/doc/constructor/responseText for reference.

func (*ResponseText) Decode

func (r *ResponseText) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ResponseText) DecodeBare

func (r *ResponseText) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*ResponseText) Encode

func (r *ResponseText) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ResponseText) EncodeBare

func (r *ResponseText) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*ResponseText) GetText

func (r *ResponseText) GetText() (value string)

GetText returns value of Text field.

func (*ResponseText) String

func (r *ResponseText) String() string

String implements fmt.Stringer.

func (*ResponseText) TypeID

func (*ResponseText) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*ResponseText) TypeInfo

func (r *ResponseText) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*ResponseText) TypeName

func (*ResponseText) TypeName() string

TypeName returns name of type in TL schema.

func (*ResponseText) Zero

func (r *ResponseText) Zero() bool

type SMS

type SMS struct {
	// Text field of SMS.
	Text string
}

SMS represents TL type `sms#ed8bebfe`.

See https://localhost:80/doc/constructor/sms for reference.

func (*SMS) Decode

func (s *SMS) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SMS) DecodeBare

func (s *SMS) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*SMS) Encode

func (s *SMS) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SMS) EncodeBare

func (s *SMS) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*SMS) GetText

func (s *SMS) GetText() (value string)

GetText returns value of Text field.

func (*SMS) String

func (s *SMS) String() string

String implements fmt.Stringer.

func (*SMS) TypeID

func (*SMS) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*SMS) TypeInfo

func (s *SMS) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*SMS) TypeName

func (*SMS) TypeName() string

TypeName returns name of type in TL schema.

func (*SMS) Zero

func (s *SMS) Zero() bool

type SendMultipleSMSRequest

type SendMultipleSMSRequest struct {
	// Messages field of SendMultipleSMSRequest.
	Messages []SMS
}

SendMultipleSMSRequest represents TL type `sendMultipleSMS#df18e5ca`.

See https://localhost:80/doc/constructor/sendMultipleSMS for reference.

func (*SendMultipleSMSRequest) Decode

func (s *SendMultipleSMSRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SendMultipleSMSRequest) DecodeBare

func (s *SendMultipleSMSRequest) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*SendMultipleSMSRequest) Encode

func (s *SendMultipleSMSRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SendMultipleSMSRequest) EncodeBare

func (s *SendMultipleSMSRequest) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*SendMultipleSMSRequest) GetMessages

func (s *SendMultipleSMSRequest) GetMessages() (value []SMS)

GetMessages returns value of Messages field.

func (*SendMultipleSMSRequest) String

func (s *SendMultipleSMSRequest) String() string

String implements fmt.Stringer.

func (*SendMultipleSMSRequest) TypeID

func (*SendMultipleSMSRequest) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*SendMultipleSMSRequest) TypeInfo

func (s *SendMultipleSMSRequest) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*SendMultipleSMSRequest) TypeName

func (*SendMultipleSMSRequest) TypeName() string

TypeName returns name of type in TL schema.

func (*SendMultipleSMSRequest) Zero

func (s *SendMultipleSMSRequest) Zero() bool

type SendRequest

type SendRequest struct {
	// Msg field of SendRequest.
	Msg SMS
}

SendRequest represents TL type `send#f74488a`.

See https://localhost:80/doc/method/send for reference.

func (*SendRequest) Decode

func (s *SendRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SendRequest) DecodeBare

func (s *SendRequest) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*SendRequest) Encode

func (s *SendRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SendRequest) EncodeBare

func (s *SendRequest) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*SendRequest) GetMsg

func (s *SendRequest) GetMsg() (value SMS)

GetMsg returns value of Msg field.

func (*SendRequest) String

func (s *SendRequest) String() string

String implements fmt.Stringer.

func (*SendRequest) TypeID

func (*SendRequest) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*SendRequest) TypeInfo

func (s *SendRequest) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*SendRequest) TypeName

func (*SendRequest) TypeName() string

TypeName returns name of type in TL schema.

func (*SendRequest) Zero

func (s *SendRequest) Zero() bool

type ServerDispatcher

type ServerDispatcher struct {
	// contains filtered or unexported fields
}

func NewServerDispatcher

func NewServerDispatcher(fallback func(ctx context.Context, b *bin.Buffer) (bin.Encoder, error)) *ServerDispatcher

func (*ServerDispatcher) Handle

func (s *ServerDispatcher) Handle(ctx context.Context, b *bin.Buffer) (bin.Encoder, error)

func (*ServerDispatcher) OnDoAuth

func (s *ServerDispatcher) OnDoAuth(f func(ctx context.Context) (AuthClass, error))

func (*ServerDispatcher) OnEchoVector

func (s *ServerDispatcher) OnEchoVector(f func(ctx context.Context, ids []int) ([]int, error))

func (*ServerDispatcher) OnPing

func (s *ServerDispatcher) OnPing(f func(ctx context.Context, id int32) error)

func (*ServerDispatcher) OnSend

func (s *ServerDispatcher) OnSend(f func(ctx context.Context, msg SMS) (*SMS, error))

func (*ServerDispatcher) OnSendMultipleSMS

func (s *ServerDispatcher) OnSendMultipleSMS(f func(ctx context.Context, messages []SMS) error)

type String

type String struct {
}

String represents TL type `string#b5286e24`.

See https://localhost:80/doc/constructor/string for reference.

func (*String) Decode

func (s *String) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*String) DecodeBare

func (s *String) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*String) Encode

func (s *String) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*String) EncodeBare

func (s *String) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*String) String

func (s *String) String() string

String implements fmt.Stringer.

func (*String) TypeID

func (*String) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*String) TypeInfo

func (s *String) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*String) TypeName

func (*String) TypeName() string

TypeName returns name of type in TL schema.

func (*String) Zero

func (s *String) Zero() bool

type TargetsMessage

type TargetsMessage struct {
	// Targets field of TargetsMessage.
	Targets []int32
}

TargetsMessage represents TL type `targetsMessage#cc6136f1`.

See https://localhost:80/doc/constructor/targetsMessage for reference.

func (*TargetsMessage) Decode

func (t *TargetsMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TargetsMessage) DecodeBare

func (t *TargetsMessage) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TargetsMessage) Encode

func (t *TargetsMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TargetsMessage) EncodeBare

func (t *TargetsMessage) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TargetsMessage) GetTargets

func (t *TargetsMessage) GetTargets() (value []int32)

GetTargets returns value of Targets field.

func (*TargetsMessage) String

func (t *TargetsMessage) String() string

String implements fmt.Stringer.

func (*TargetsMessage) TypeID

func (*TargetsMessage) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TargetsMessage) TypeInfo

func (t *TargetsMessage) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TargetsMessage) TypeName

func (*TargetsMessage) TypeName() string

TypeName returns name of type in TL schema.

func (*TargetsMessage) Zero

func (t *TargetsMessage) Zero() bool

type TestBytes

type TestBytes struct {
	// Bytes
	Value []byte
}

TestBytes represents TL type `testBytes#a422c4de`.

See https://localhost:80/doc/constructor/testBytes for reference.

func (*TestBytes) Decode

func (t *TestBytes) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TestBytes) DecodeBare

func (t *TestBytes) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TestBytes) Encode

func (t *TestBytes) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TestBytes) EncodeBare

func (t *TestBytes) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TestBytes) GetValue

func (t *TestBytes) GetValue() (value []byte)

GetValue returns value of Value field.

func (*TestBytes) String

func (t *TestBytes) String() string

String implements fmt.Stringer.

func (*TestBytes) TypeID

func (*TestBytes) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TestBytes) TypeInfo

func (t *TestBytes) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TestBytes) TypeName

func (*TestBytes) TypeName() string

TypeName returns name of type in TL schema.

func (*TestBytes) Zero

func (t *TestBytes) Zero() bool

type TestInt

type TestInt struct {
	// Number
	Value int32
}

TestInt represents TL type `testInt#ddbd2c09`.

See https://localhost:80/doc/constructor/testInt for reference.

func (*TestInt) Decode

func (t *TestInt) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TestInt) DecodeBare

func (t *TestInt) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TestInt) Encode

func (t *TestInt) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TestInt) EncodeBare

func (t *TestInt) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TestInt) GetValue

func (t *TestInt) GetValue() (value int32)

GetValue returns value of Value field.

func (*TestInt) String

func (t *TestInt) String() string

String implements fmt.Stringer.

func (*TestInt) TypeID

func (*TestInt) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TestInt) TypeInfo

func (t *TestInt) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TestInt) TypeName

func (*TestInt) TypeName() string

TypeName returns name of type in TL schema.

func (*TestInt) Zero

func (t *TestInt) Zero() bool

type TestString

type TestString struct {
	// String
	Value string
}

TestString represents TL type `testString#fe56688c`.

See https://localhost:80/doc/constructor/testString for reference.

func (*TestString) Decode

func (t *TestString) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TestString) DecodeBare

func (t *TestString) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TestString) Encode

func (t *TestString) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TestString) EncodeBare

func (t *TestString) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TestString) GetValue

func (t *TestString) GetValue() (value string)

GetValue returns value of Value field.

func (*TestString) String

func (t *TestString) String() string

String implements fmt.Stringer.

func (*TestString) TypeID

func (*TestString) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TestString) TypeInfo

func (t *TestString) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TestString) TypeName

func (*TestString) TypeName() string

TypeName returns name of type in TL schema.

func (*TestString) Zero

func (t *TestString) Zero() bool

type TestVectorBytes

type TestVectorBytes struct {
	// Value field of TestVectorBytes.
	Value [][]byte
}

TestVectorBytes represents TL type `testVectorBytes#a590fb25`.

See https://localhost:80/doc/constructor/testVectorBytes for reference.

func (*TestVectorBytes) Decode

func (t *TestVectorBytes) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TestVectorBytes) DecodeBare

func (t *TestVectorBytes) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TestVectorBytes) Encode

func (t *TestVectorBytes) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TestVectorBytes) EncodeBare

func (t *TestVectorBytes) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TestVectorBytes) GetValue

func (t *TestVectorBytes) GetValue() (value [][]byte)

GetValue returns value of Value field.

func (*TestVectorBytes) String

func (t *TestVectorBytes) String() string

String implements fmt.Stringer.

func (*TestVectorBytes) TypeID

func (*TestVectorBytes) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TestVectorBytes) TypeInfo

func (t *TestVectorBytes) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TestVectorBytes) TypeName

func (*TestVectorBytes) TypeName() string

TypeName returns name of type in TL schema.

func (*TestVectorBytes) Zero

func (t *TestVectorBytes) Zero() bool

type TestVectorInt

type TestVectorInt struct {
	// Vector of numbers
	Value []int32
}

TestVectorInt represents TL type `testVectorInt#df9eb113`.

See https://localhost:80/doc/constructor/testVectorInt for reference.

func (*TestVectorInt) Decode

func (t *TestVectorInt) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TestVectorInt) DecodeBare

func (t *TestVectorInt) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TestVectorInt) Encode

func (t *TestVectorInt) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TestVectorInt) EncodeBare

func (t *TestVectorInt) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TestVectorInt) GetValue

func (t *TestVectorInt) GetValue() (value []int32)

GetValue returns value of Value field.

func (*TestVectorInt) String

func (t *TestVectorInt) String() string

String implements fmt.Stringer.

func (*TestVectorInt) TypeID

func (*TestVectorInt) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TestVectorInt) TypeInfo

func (t *TestVectorInt) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TestVectorInt) TypeName

func (*TestVectorInt) TypeName() string

TypeName returns name of type in TL schema.

func (*TestVectorInt) Zero

func (t *TestVectorInt) Zero() bool

type TestVectorIntObject

type TestVectorIntObject struct {
	// Vector of objects
	Value []TestInt
}

TestVectorIntObject represents TL type `testVectorIntObject#f152999b`.

See https://localhost:80/doc/constructor/testVectorIntObject for reference.

func (*TestVectorIntObject) Decode

func (t *TestVectorIntObject) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TestVectorIntObject) DecodeBare

func (t *TestVectorIntObject) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TestVectorIntObject) Encode

func (t *TestVectorIntObject) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TestVectorIntObject) EncodeBare

func (t *TestVectorIntObject) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TestVectorIntObject) GetValue

func (t *TestVectorIntObject) GetValue() (value []TestInt)

GetValue returns value of Value field.

func (*TestVectorIntObject) String

func (t *TestVectorIntObject) String() string

String implements fmt.Stringer.

func (*TestVectorIntObject) TypeID

func (*TestVectorIntObject) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TestVectorIntObject) TypeInfo

func (t *TestVectorIntObject) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TestVectorIntObject) TypeName

func (*TestVectorIntObject) TypeName() string

TypeName returns name of type in TL schema.

func (*TestVectorIntObject) Zero

func (t *TestVectorIntObject) Zero() bool

type TestVectorString

type TestVectorString struct {
	// Vector of strings
	Value []string
}

TestVectorString represents TL type `testVectorString#5d6f85bc`.

See https://localhost:80/doc/constructor/testVectorString for reference.

func (*TestVectorString) Decode

func (t *TestVectorString) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TestVectorString) DecodeBare

func (t *TestVectorString) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TestVectorString) Encode

func (t *TestVectorString) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TestVectorString) EncodeBare

func (t *TestVectorString) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TestVectorString) GetValue

func (t *TestVectorString) GetValue() (value []string)

GetValue returns value of Value field.

func (*TestVectorString) String

func (t *TestVectorString) String() string

String implements fmt.Stringer.

func (*TestVectorString) TypeID

func (*TestVectorString) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TestVectorString) TypeInfo

func (t *TestVectorString) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TestVectorString) TypeName

func (*TestVectorString) TypeName() string

TypeName returns name of type in TL schema.

func (*TestVectorString) Zero

func (t *TestVectorString) Zero() bool

type TestVectorStringObject

type TestVectorStringObject struct {
	// Vector of objects
	Value []TestString
}

TestVectorStringObject represents TL type `testVectorStringObject#e5ecc0d`.

See https://localhost:80/doc/constructor/testVectorStringObject for reference.

func (*TestVectorStringObject) Decode

func (t *TestVectorStringObject) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TestVectorStringObject) DecodeBare

func (t *TestVectorStringObject) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TestVectorStringObject) Encode

func (t *TestVectorStringObject) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TestVectorStringObject) EncodeBare

func (t *TestVectorStringObject) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TestVectorStringObject) GetValue

func (t *TestVectorStringObject) GetValue() (value []TestString)

GetValue returns value of Value field.

func (*TestVectorStringObject) String

func (t *TestVectorStringObject) String() string

String implements fmt.Stringer.

func (*TestVectorStringObject) TypeID

func (*TestVectorStringObject) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TestVectorStringObject) TypeInfo

func (t *TestVectorStringObject) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TestVectorStringObject) TypeName

func (*TestVectorStringObject) TypeName() string

TypeName returns name of type in TL schema.

func (*TestVectorStringObject) Zero

func (t *TestVectorStringObject) Zero() bool

type TestVectorVector

type TestVectorVector struct {
	// Value field of TestVectorVector.
	Value [][]string
}

TestVectorVector represents TL type `testVectorVector#69e8846c`.

See https://localhost:80/doc/constructor/testVectorVector for reference.

func (*TestVectorVector) Decode

func (t *TestVectorVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TestVectorVector) DecodeBare

func (t *TestVectorVector) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TestVectorVector) Encode

func (t *TestVectorVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TestVectorVector) EncodeBare

func (t *TestVectorVector) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TestVectorVector) GetValue

func (t *TestVectorVector) GetValue() (value [][]string)

GetValue returns value of Value field.

func (*TestVectorVector) String

func (t *TestVectorVector) String() string

String implements fmt.Stringer.

func (*TestVectorVector) TypeID

func (*TestVectorVector) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TestVectorVector) TypeInfo

func (t *TestVectorVector) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TestVectorVector) TypeName

func (*TestVectorVector) TypeName() string

TypeName returns name of type in TL schema.

func (*TestVectorVector) Zero

func (t *TestVectorVector) Zero() bool

type TextEntities

type TextEntities struct {
	// List of text entities
	Entities []TextEntity
}

TextEntities represents TL type `textEntities#cf89c258`.

See https://localhost:80/doc/constructor/textEntities for reference.

func (*TextEntities) Decode

func (t *TextEntities) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntities) DecodeBare

func (t *TextEntities) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntities) Encode

func (t *TextEntities) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntities) EncodeBare

func (t *TextEntities) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntities) GetEntities

func (t *TextEntities) GetEntities() (value []TextEntity)

GetEntities returns value of Entities field.

func (*TextEntities) String

func (t *TextEntities) String() string

String implements fmt.Stringer.

func (*TextEntities) TypeID

func (*TextEntities) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntities) TypeInfo

func (t *TextEntities) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntities) TypeName

func (*TextEntities) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntities) Zero

func (t *TextEntities) Zero() bool

type TextEntity

type TextEntity struct {
	// Offset of the entity, in UTF-16 code units
	Offset int32
	// Length of the entity, in UTF-16 code units
	Length int32
	// Type of the entity
	Type TextEntityTypeClass
}

TextEntity represents TL type `textEntity#8bab99a8`.

See https://localhost:80/doc/constructor/textEntity for reference.

func (*TextEntity) Decode

func (t *TextEntity) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntity) DecodeBare

func (t *TextEntity) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntity) Encode

func (t *TextEntity) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntity) EncodeBare

func (t *TextEntity) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntity) GetLength

func (t *TextEntity) GetLength() (value int32)

GetLength returns value of Length field.

func (*TextEntity) GetOffset

func (t *TextEntity) GetOffset() (value int32)

GetOffset returns value of Offset field.

func (*TextEntity) GetType

func (t *TextEntity) GetType() (value TextEntityTypeClass)

GetType returns value of Type field.

func (*TextEntity) String

func (t *TextEntity) String() string

String implements fmt.Stringer.

func (*TextEntity) TypeID

func (*TextEntity) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntity) TypeInfo

func (t *TextEntity) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntity) TypeName

func (*TextEntity) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntity) Zero

func (t *TextEntity) Zero() bool

type TextEntityTypeBankCardNumber

type TextEntityTypeBankCardNumber struct {
}

TextEntityTypeBankCardNumber represents TL type `textEntityTypeBankCardNumber#6513910`.

See https://localhost:80/doc/constructor/textEntityTypeBankCardNumber for reference.

func (*TextEntityTypeBankCardNumber) Decode

Decode implements bin.Decoder.

func (*TextEntityTypeBankCardNumber) DecodeBare

func (t *TextEntityTypeBankCardNumber) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeBankCardNumber) Encode

Encode implements bin.Encoder.

func (*TextEntityTypeBankCardNumber) EncodeBare

func (t *TextEntityTypeBankCardNumber) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeBankCardNumber) String

String implements fmt.Stringer.

func (*TextEntityTypeBankCardNumber) TypeID

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeBankCardNumber) TypeInfo

func (t *TextEntityTypeBankCardNumber) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeBankCardNumber) TypeName

TypeName returns name of type in TL schema.

func (*TextEntityTypeBankCardNumber) Zero

type TextEntityTypeBold

type TextEntityTypeBold struct {
}

TextEntityTypeBold represents TL type `textEntityTypeBold#bcc0e1b0`.

See https://localhost:80/doc/constructor/textEntityTypeBold for reference.

func (*TextEntityTypeBold) Decode

func (t *TextEntityTypeBold) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypeBold) DecodeBare

func (t *TextEntityTypeBold) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeBold) Encode

func (t *TextEntityTypeBold) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypeBold) EncodeBare

func (t *TextEntityTypeBold) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeBold) String

func (t *TextEntityTypeBold) String() string

String implements fmt.Stringer.

func (*TextEntityTypeBold) TypeID

func (*TextEntityTypeBold) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeBold) TypeInfo

func (t *TextEntityTypeBold) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeBold) TypeName

func (*TextEntityTypeBold) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypeBold) Zero

func (t *TextEntityTypeBold) Zero() bool

type TextEntityTypeBotCommand

type TextEntityTypeBotCommand struct {
}

TextEntityTypeBotCommand represents TL type `textEntityTypeBotCommand#bb652bb3`.

See https://localhost:80/doc/constructor/textEntityTypeBotCommand for reference.

func (*TextEntityTypeBotCommand) Decode

func (t *TextEntityTypeBotCommand) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypeBotCommand) DecodeBare

func (t *TextEntityTypeBotCommand) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeBotCommand) Encode

func (t *TextEntityTypeBotCommand) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypeBotCommand) EncodeBare

func (t *TextEntityTypeBotCommand) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeBotCommand) String

func (t *TextEntityTypeBotCommand) String() string

String implements fmt.Stringer.

func (*TextEntityTypeBotCommand) TypeID

func (*TextEntityTypeBotCommand) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeBotCommand) TypeInfo

func (t *TextEntityTypeBotCommand) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeBotCommand) TypeName

func (*TextEntityTypeBotCommand) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypeBotCommand) Zero

func (t *TextEntityTypeBotCommand) Zero() bool

type TextEntityTypeBox

type TextEntityTypeBox struct {
	TextEntityType TextEntityTypeClass
}

TextEntityType boxes the TextEntityTypeClass providing a helper.

func (*TextEntityTypeBox) Decode

func (b *TextEntityTypeBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for TextEntityTypeBox.

func (*TextEntityTypeBox) Encode

func (b *TextEntityTypeBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for TextEntityTypeBox.

type TextEntityTypeCashtag

type TextEntityTypeCashtag struct {
}

TextEntityTypeCashtag represents TL type `textEntityTypeCashtag#48e4374b`.

See https://localhost:80/doc/constructor/textEntityTypeCashtag for reference.

func (*TextEntityTypeCashtag) Decode

func (t *TextEntityTypeCashtag) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypeCashtag) DecodeBare

func (t *TextEntityTypeCashtag) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeCashtag) Encode

func (t *TextEntityTypeCashtag) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypeCashtag) EncodeBare

func (t *TextEntityTypeCashtag) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeCashtag) String

func (t *TextEntityTypeCashtag) String() string

String implements fmt.Stringer.

func (*TextEntityTypeCashtag) TypeID

func (*TextEntityTypeCashtag) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeCashtag) TypeInfo

func (t *TextEntityTypeCashtag) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeCashtag) TypeName

func (*TextEntityTypeCashtag) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypeCashtag) Zero

func (t *TextEntityTypeCashtag) Zero() bool

type TextEntityTypeClass

type TextEntityTypeClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder

	// TypeID returns type id in TL schema.
	//
	// See https://core.telegram.org/mtproto/TL-tl#remarks.
	TypeID() uint32
	// TypeName returns name of type in TL schema.
	TypeName() string
	// String implements fmt.Stringer.
	String() string
	// Zero returns true if current object has a zero value.
	Zero() bool
	// contains filtered or unexported methods
}

TextEntityTypeClass represents TextEntityType generic type.

See https://localhost:80/doc/type/TextEntityType for reference.

Example:

g, err := td.DecodeTextEntityType(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *td.TextEntityTypeMention: // textEntityTypeMention#37b3df65
case *td.TextEntityTypeHashtag: // textEntityTypeHashtag#c2f7a2dd
case *td.TextEntityTypeCashtag: // textEntityTypeCashtag#48e4374b
case *td.TextEntityTypeBotCommand: // textEntityTypeBotCommand#bb652bb3
case *td.TextEntityTypeURL: // textEntityTypeUrl#b1c0d47c
case *td.TextEntityTypeEmailAddress: // textEntityTypeEmailAddress#54f81821
case *td.TextEntityTypePhoneNumber: // textEntityTypePhoneNumber#bad9aa2a
case *td.TextEntityTypeBankCardNumber: // textEntityTypeBankCardNumber#6513910
case *td.TextEntityTypeBold: // textEntityTypeBold#bcc0e1b0
case *td.TextEntityTypeItalic: // textEntityTypeItalic#f8f3965d
case *td.TextEntityTypeUnderline: // textEntityTypeUnderline#2f39cf92
case *td.TextEntityTypeStrikethrough: // textEntityTypeStrikethrough#394fc4fa
case *td.TextEntityTypeCode: // textEntityTypeCode#c5e9c94a
case *td.TextEntityTypePre: // textEntityTypePre#62491c8e
case *td.TextEntityTypePreCode: // textEntityTypePreCode#c7a77aab
case *td.TextEntityTypeTextURL: // textEntityTypeTextUrl#1a912463
case *td.TextEntityTypeMentionName: // textEntityTypeMentionName#d0d2685d
default: panic(v)
}

func DecodeTextEntityType

func DecodeTextEntityType(buf *bin.Buffer) (TextEntityTypeClass, error)

DecodeTextEntityType implements binary de-serialization for TextEntityTypeClass.

type TextEntityTypeCode

type TextEntityTypeCode struct {
}

TextEntityTypeCode represents TL type `textEntityTypeCode#c5e9c94a`.

See https://localhost:80/doc/constructor/textEntityTypeCode for reference.

func (*TextEntityTypeCode) Decode

func (t *TextEntityTypeCode) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypeCode) DecodeBare

func (t *TextEntityTypeCode) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeCode) Encode

func (t *TextEntityTypeCode) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypeCode) EncodeBare

func (t *TextEntityTypeCode) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeCode) String

func (t *TextEntityTypeCode) String() string

String implements fmt.Stringer.

func (*TextEntityTypeCode) TypeID

func (*TextEntityTypeCode) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeCode) TypeInfo

func (t *TextEntityTypeCode) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeCode) TypeName

func (*TextEntityTypeCode) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypeCode) Zero

func (t *TextEntityTypeCode) Zero() bool

type TextEntityTypeEmailAddress

type TextEntityTypeEmailAddress struct {
}

TextEntityTypeEmailAddress represents TL type `textEntityTypeEmailAddress#54f81821`.

See https://localhost:80/doc/constructor/textEntityTypeEmailAddress for reference.

func (*TextEntityTypeEmailAddress) Decode

Decode implements bin.Decoder.

func (*TextEntityTypeEmailAddress) DecodeBare

func (t *TextEntityTypeEmailAddress) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeEmailAddress) Encode

Encode implements bin.Encoder.

func (*TextEntityTypeEmailAddress) EncodeBare

func (t *TextEntityTypeEmailAddress) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeEmailAddress) String

func (t *TextEntityTypeEmailAddress) String() string

String implements fmt.Stringer.

func (*TextEntityTypeEmailAddress) TypeID

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeEmailAddress) TypeInfo

func (t *TextEntityTypeEmailAddress) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeEmailAddress) TypeName

func (*TextEntityTypeEmailAddress) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypeEmailAddress) Zero

func (t *TextEntityTypeEmailAddress) Zero() bool

type TextEntityTypeHashtag

type TextEntityTypeHashtag struct {
}

TextEntityTypeHashtag represents TL type `textEntityTypeHashtag#c2f7a2dd`.

See https://localhost:80/doc/constructor/textEntityTypeHashtag for reference.

func (*TextEntityTypeHashtag) Decode

func (t *TextEntityTypeHashtag) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypeHashtag) DecodeBare

func (t *TextEntityTypeHashtag) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeHashtag) Encode

func (t *TextEntityTypeHashtag) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypeHashtag) EncodeBare

func (t *TextEntityTypeHashtag) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeHashtag) String

func (t *TextEntityTypeHashtag) String() string

String implements fmt.Stringer.

func (*TextEntityTypeHashtag) TypeID

func (*TextEntityTypeHashtag) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeHashtag) TypeInfo

func (t *TextEntityTypeHashtag) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeHashtag) TypeName

func (*TextEntityTypeHashtag) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypeHashtag) Zero

func (t *TextEntityTypeHashtag) Zero() bool

type TextEntityTypeItalic

type TextEntityTypeItalic struct {
}

TextEntityTypeItalic represents TL type `textEntityTypeItalic#f8f3965d`.

See https://localhost:80/doc/constructor/textEntityTypeItalic for reference.

func (*TextEntityTypeItalic) Decode

func (t *TextEntityTypeItalic) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypeItalic) DecodeBare

func (t *TextEntityTypeItalic) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeItalic) Encode

func (t *TextEntityTypeItalic) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypeItalic) EncodeBare

func (t *TextEntityTypeItalic) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeItalic) String

func (t *TextEntityTypeItalic) String() string

String implements fmt.Stringer.

func (*TextEntityTypeItalic) TypeID

func (*TextEntityTypeItalic) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeItalic) TypeInfo

func (t *TextEntityTypeItalic) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeItalic) TypeName

func (*TextEntityTypeItalic) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypeItalic) Zero

func (t *TextEntityTypeItalic) Zero() bool

type TextEntityTypeMention

type TextEntityTypeMention struct {
}

TextEntityTypeMention represents TL type `textEntityTypeMention#37b3df65`.

See https://localhost:80/doc/constructor/textEntityTypeMention for reference.

func (*TextEntityTypeMention) Decode

func (t *TextEntityTypeMention) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypeMention) DecodeBare

func (t *TextEntityTypeMention) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeMention) Encode

func (t *TextEntityTypeMention) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypeMention) EncodeBare

func (t *TextEntityTypeMention) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeMention) String

func (t *TextEntityTypeMention) String() string

String implements fmt.Stringer.

func (*TextEntityTypeMention) TypeID

func (*TextEntityTypeMention) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeMention) TypeInfo

func (t *TextEntityTypeMention) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeMention) TypeName

func (*TextEntityTypeMention) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypeMention) Zero

func (t *TextEntityTypeMention) Zero() bool

type TextEntityTypeMentionName

type TextEntityTypeMentionName struct {
	// Identifier of the mentioned user
	UserID int32
}

TextEntityTypeMentionName represents TL type `textEntityTypeMentionName#d0d2685d`.

See https://localhost:80/doc/constructor/textEntityTypeMentionName for reference.

func (*TextEntityTypeMentionName) Decode

func (t *TextEntityTypeMentionName) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypeMentionName) DecodeBare

func (t *TextEntityTypeMentionName) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeMentionName) Encode

func (t *TextEntityTypeMentionName) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypeMentionName) EncodeBare

func (t *TextEntityTypeMentionName) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeMentionName) GetUserID

func (t *TextEntityTypeMentionName) GetUserID() (value int32)

GetUserID returns value of UserID field.

func (*TextEntityTypeMentionName) String

func (t *TextEntityTypeMentionName) String() string

String implements fmt.Stringer.

func (*TextEntityTypeMentionName) TypeID

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeMentionName) TypeInfo

func (t *TextEntityTypeMentionName) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeMentionName) TypeName

func (*TextEntityTypeMentionName) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypeMentionName) Zero

func (t *TextEntityTypeMentionName) Zero() bool

type TextEntityTypePhoneNumber

type TextEntityTypePhoneNumber struct {
}

TextEntityTypePhoneNumber represents TL type `textEntityTypePhoneNumber#bad9aa2a`.

See https://localhost:80/doc/constructor/textEntityTypePhoneNumber for reference.

func (*TextEntityTypePhoneNumber) Decode

func (t *TextEntityTypePhoneNumber) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypePhoneNumber) DecodeBare

func (t *TextEntityTypePhoneNumber) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypePhoneNumber) Encode

func (t *TextEntityTypePhoneNumber) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypePhoneNumber) EncodeBare

func (t *TextEntityTypePhoneNumber) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypePhoneNumber) String

func (t *TextEntityTypePhoneNumber) String() string

String implements fmt.Stringer.

func (*TextEntityTypePhoneNumber) TypeID

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypePhoneNumber) TypeInfo

func (t *TextEntityTypePhoneNumber) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypePhoneNumber) TypeName

func (*TextEntityTypePhoneNumber) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypePhoneNumber) Zero

func (t *TextEntityTypePhoneNumber) Zero() bool

type TextEntityTypePre

type TextEntityTypePre struct {
}

TextEntityTypePre represents TL type `textEntityTypePre#62491c8e`.

See https://localhost:80/doc/constructor/textEntityTypePre for reference.

func (*TextEntityTypePre) Decode

func (t *TextEntityTypePre) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypePre) DecodeBare

func (t *TextEntityTypePre) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypePre) Encode

func (t *TextEntityTypePre) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypePre) EncodeBare

func (t *TextEntityTypePre) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypePre) String

func (t *TextEntityTypePre) String() string

String implements fmt.Stringer.

func (*TextEntityTypePre) TypeID

func (*TextEntityTypePre) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypePre) TypeInfo

func (t *TextEntityTypePre) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypePre) TypeName

func (*TextEntityTypePre) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypePre) Zero

func (t *TextEntityTypePre) Zero() bool

type TextEntityTypePreCode

type TextEntityTypePreCode struct {
	// Programming language of the code; as defined by the sender
	Language string
}

TextEntityTypePreCode represents TL type `textEntityTypePreCode#c7a77aab`.

See https://localhost:80/doc/constructor/textEntityTypePreCode for reference.

func (*TextEntityTypePreCode) Decode

func (t *TextEntityTypePreCode) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypePreCode) DecodeBare

func (t *TextEntityTypePreCode) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypePreCode) Encode

func (t *TextEntityTypePreCode) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypePreCode) EncodeBare

func (t *TextEntityTypePreCode) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypePreCode) GetLanguage

func (t *TextEntityTypePreCode) GetLanguage() (value string)

GetLanguage returns value of Language field.

func (*TextEntityTypePreCode) String

func (t *TextEntityTypePreCode) String() string

String implements fmt.Stringer.

func (*TextEntityTypePreCode) TypeID

func (*TextEntityTypePreCode) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypePreCode) TypeInfo

func (t *TextEntityTypePreCode) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypePreCode) TypeName

func (*TextEntityTypePreCode) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypePreCode) Zero

func (t *TextEntityTypePreCode) Zero() bool

type TextEntityTypeStrikethrough

type TextEntityTypeStrikethrough struct {
}

TextEntityTypeStrikethrough represents TL type `textEntityTypeStrikethrough#394fc4fa`.

See https://localhost:80/doc/constructor/textEntityTypeStrikethrough for reference.

func (*TextEntityTypeStrikethrough) Decode

Decode implements bin.Decoder.

func (*TextEntityTypeStrikethrough) DecodeBare

func (t *TextEntityTypeStrikethrough) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeStrikethrough) Encode

Encode implements bin.Encoder.

func (*TextEntityTypeStrikethrough) EncodeBare

func (t *TextEntityTypeStrikethrough) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeStrikethrough) String

func (t *TextEntityTypeStrikethrough) String() string

String implements fmt.Stringer.

func (*TextEntityTypeStrikethrough) TypeID

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeStrikethrough) TypeInfo

func (t *TextEntityTypeStrikethrough) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeStrikethrough) TypeName

func (*TextEntityTypeStrikethrough) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypeStrikethrough) Zero

type TextEntityTypeTextURL

type TextEntityTypeTextURL struct {
	// HTTP or tg:// URL to be opened when the link is clicked
	URL string
}

TextEntityTypeTextURL represents TL type `textEntityTypeTextUrl#1a912463`.

See https://localhost:80/doc/constructor/textEntityTypeTextUrl for reference.

func (*TextEntityTypeTextURL) Decode

func (t *TextEntityTypeTextURL) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypeTextURL) DecodeBare

func (t *TextEntityTypeTextURL) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeTextURL) Encode

func (t *TextEntityTypeTextURL) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypeTextURL) EncodeBare

func (t *TextEntityTypeTextURL) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeTextURL) GetURL

func (t *TextEntityTypeTextURL) GetURL() (value string)

GetURL returns value of URL field.

func (*TextEntityTypeTextURL) String

func (t *TextEntityTypeTextURL) String() string

String implements fmt.Stringer.

func (*TextEntityTypeTextURL) TypeID

func (*TextEntityTypeTextURL) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeTextURL) TypeInfo

func (t *TextEntityTypeTextURL) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeTextURL) TypeName

func (*TextEntityTypeTextURL) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypeTextURL) Zero

func (t *TextEntityTypeTextURL) Zero() bool

type TextEntityTypeURL

type TextEntityTypeURL struct {
}

TextEntityTypeURL represents TL type `textEntityTypeUrl#b1c0d47c`.

See https://localhost:80/doc/constructor/textEntityTypeUrl for reference.

func (*TextEntityTypeURL) Decode

func (t *TextEntityTypeURL) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypeURL) DecodeBare

func (t *TextEntityTypeURL) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeURL) Encode

func (t *TextEntityTypeURL) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypeURL) EncodeBare

func (t *TextEntityTypeURL) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeURL) String

func (t *TextEntityTypeURL) String() string

String implements fmt.Stringer.

func (*TextEntityTypeURL) TypeID

func (*TextEntityTypeURL) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeURL) TypeInfo

func (t *TextEntityTypeURL) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeURL) TypeName

func (*TextEntityTypeURL) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypeURL) Zero

func (t *TextEntityTypeURL) Zero() bool

type TextEntityTypeUnderline

type TextEntityTypeUnderline struct {
}

TextEntityTypeUnderline represents TL type `textEntityTypeUnderline#2f39cf92`.

See https://localhost:80/doc/constructor/textEntityTypeUnderline for reference.

func (*TextEntityTypeUnderline) Decode

func (t *TextEntityTypeUnderline) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEntityTypeUnderline) DecodeBare

func (t *TextEntityTypeUnderline) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*TextEntityTypeUnderline) Encode

func (t *TextEntityTypeUnderline) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEntityTypeUnderline) EncodeBare

func (t *TextEntityTypeUnderline) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*TextEntityTypeUnderline) String

func (t *TextEntityTypeUnderline) String() string

String implements fmt.Stringer.

func (*TextEntityTypeUnderline) TypeID

func (*TextEntityTypeUnderline) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*TextEntityTypeUnderline) TypeInfo

func (t *TextEntityTypeUnderline) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*TextEntityTypeUnderline) TypeName

func (*TextEntityTypeUnderline) TypeName() string

TypeName returns name of type in TL schema.

func (*TextEntityTypeUnderline) Zero

func (t *TextEntityTypeUnderline) Zero() bool

type Theme

type Theme struct {
	// Name field of Theme.
	Name string
}

Theme represents TL type `theme#28f1114`.

See https://localhost:80/doc/constructor/theme for reference.

func (*Theme) Decode

func (t *Theme) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Theme) DecodeBare

func (t *Theme) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*Theme) Encode

func (t *Theme) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Theme) EncodeBare

func (t *Theme) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*Theme) GetName

func (t *Theme) GetName() (value string)

GetName returns value of Name field.

func (*Theme) String

func (t *Theme) String() string

String implements fmt.Stringer.

func (*Theme) TypeID

func (*Theme) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*Theme) TypeInfo

func (t *Theme) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*Theme) TypeName

func (*Theme) TypeName() string

TypeName returns name of type in TL schema.

func (*Theme) Zero

func (t *Theme) Zero() bool

type True

type True struct {
}

True represents TL type `true#997275b5`.

See https://localhost:80/doc/constructor/true for reference.

func (*True) Decode

func (t *True) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*True) DecodeBare

func (t *True) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*True) Encode

func (t *True) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*True) EncodeBare

func (t *True) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*True) String

func (t *True) String() string

String implements fmt.Stringer.

func (*True) TypeID

func (*True) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*True) TypeInfo

func (t *True) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*True) TypeName

func (*True) TypeName() string

TypeName returns name of type in TL schema.

func (*True) Zero

func (t *True) Zero() bool

type Update

type Update struct {
	// Msg field of Update.
	Msg AbstractMessageClass
	// Delay field of Update.
	Delay int32
}

Update represents TL type `update#b03e2ef8`.

See https://localhost:80/doc/constructor/update for reference.

func (*Update) Decode

func (u *Update) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Update) DecodeBare

func (u *Update) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*Update) Encode

func (u *Update) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Update) EncodeBare

func (u *Update) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*Update) GetDelay

func (u *Update) GetDelay() (value int32)

GetDelay returns value of Delay field.

func (*Update) GetMsg

func (u *Update) GetMsg() (value AbstractMessageClass)

GetMsg returns value of Msg field.

func (*Update) String

func (u *Update) String() string

String implements fmt.Stringer.

func (*Update) TypeID

func (*Update) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*Update) TypeInfo

func (u *Update) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*Update) TypeName

func (*Update) TypeName() string

TypeName returns name of type in TL schema.

func (*Update) Zero

func (u *Update) Zero() bool

type UserAuth

type UserAuth struct {
	// Foo field of UserAuth.
	Foo string
}

UserAuth represents TL type `user.auth#f4815592`.

See https://localhost:80/doc/constructor/user.auth for reference.

func (*UserAuth) Decode

func (a *UserAuth) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UserAuth) DecodeBare

func (a *UserAuth) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*UserAuth) Encode

func (a *UserAuth) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UserAuth) EncodeBare

func (a *UserAuth) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*UserAuth) GetFoo

func (a *UserAuth) GetFoo() (value string)

GetFoo returns value of Foo field.

func (*UserAuth) String

func (a *UserAuth) String() string

String implements fmt.Stringer.

func (*UserAuth) TypeID

func (*UserAuth) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*UserAuth) TypeInfo

func (a *UserAuth) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*UserAuth) TypeName

func (*UserAuth) TypeName() string

TypeName returns name of type in TL schema.

func (*UserAuth) Zero

func (a *UserAuth) Zero() bool

type UserAuthBox

type UserAuthBox struct {
	Auth UserAuthClass
}

UserAuth boxes the UserAuthClass providing a helper.

func (*UserAuthBox) Decode

func (b *UserAuthBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for UserAuthBox.

func (*UserAuthBox) Encode

func (b *UserAuthBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for UserAuthBox.

type UserAuthClass

type UserAuthClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder

	// TypeID returns type id in TL schema.
	//
	// See https://core.telegram.org/mtproto/TL-tl#remarks.
	TypeID() uint32
	// TypeName returns name of type in TL schema.
	TypeName() string
	// String implements fmt.Stringer.
	String() string
	// Zero returns true if current object has a zero value.
	Zero() bool
	// contains filtered or unexported methods
}

UserAuthClass represents user.Auth generic type.

See https://localhost:80/doc/type/user.Auth for reference.

Example:

g, err := td.DecodeUserAuth(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *td.UserAuth: // user.auth#f4815592
case *td.UserAuthPassword: // user.authPassword#5981e317
default: panic(v)
}

func DecodeUserAuth

func DecodeUserAuth(buf *bin.Buffer) (UserAuthClass, error)

DecodeUserAuth implements binary de-serialization for UserAuthClass.

type UserAuthPassword

type UserAuthPassword struct {
	// Pwd field of UserAuthPassword.
	Pwd string
}

UserAuthPassword represents TL type `user.authPassword#5981e317`.

See https://localhost:80/doc/constructor/user.authPassword for reference.

func (*UserAuthPassword) Decode

func (a *UserAuthPassword) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UserAuthPassword) DecodeBare

func (a *UserAuthPassword) DecodeBare(b *bin.Buffer) error

DecodeBare implements bin.BareDecoder.

func (*UserAuthPassword) Encode

func (a *UserAuthPassword) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UserAuthPassword) EncodeBare

func (a *UserAuthPassword) EncodeBare(b *bin.Buffer) error

EncodeBare implements bin.BareEncoder.

func (*UserAuthPassword) GetPwd

func (a *UserAuthPassword) GetPwd() (value string)

GetPwd returns value of Pwd field.

func (*UserAuthPassword) String

func (a *UserAuthPassword) String() string

String implements fmt.Stringer.

func (*UserAuthPassword) TypeID

func (*UserAuthPassword) TypeID() uint32

TypeID returns type id in TL schema.

See https://core.telegram.org/mtproto/TL-tl#remarks.

func (*UserAuthPassword) TypeInfo

func (a *UserAuthPassword) TypeInfo() tdp.Type

TypeInfo returns info about TL type.

func (*UserAuthPassword) TypeName

func (*UserAuthPassword) TypeName() string

TypeName returns name of type in TL schema.

func (*UserAuthPassword) Zero

func (a *UserAuthPassword) Zero() bool

Jump to

Keyboard shortcuts

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