Documentation
¶
Overview ¶
Package td contains generated code from example schema and is used for codegen testing.
Index ¶
- Constants
- func TypesConstructorMap() map[uint32]func() bin.Object
- func TypesMap() map[uint32]string
- type AbstractMessageBox
- type AbstractMessageClass
- type AccountThemes
- func (t *AccountThemes) Decode(b *bin.Buffer) error
- func (t *AccountThemes) Encode(b *bin.Buffer) error
- func (t *AccountThemes) GetHash() (value int)
- func (t *AccountThemes) GetThemes() (value []Theme)
- func (t *AccountThemes) String() string
- func (t *AccountThemes) TypeID() uint32
- func (t *AccountThemes) Zero() bool
- type AccountThemesBox
- type AccountThemesClass
- type AccountThemesNotModified
- type Auth
- type AuthBox
- type AuthClass
- type AuthPassword
- func (a *AuthPassword) Decode(b *bin.Buffer) error
- func (a *AuthPassword) Encode(b *bin.Buffer) error
- func (a *AuthPassword) GetName() (value string)
- func (a *AuthPassword) GetPassword() (value string)
- func (a *AuthPassword) String() string
- func (a *AuthPassword) TypeID() uint32
- func (a *AuthPassword) Zero() bool
- type BigMessage
- func (b *BigMessage) Decode(buf *bin.Buffer) error
- func (b *BigMessage) Encode(buf *bin.Buffer) error
- func (b *BigMessage) GetCount() (value int32)
- func (b *BigMessage) GetEscape() (value bool)
- func (b *BigMessage) GetID() (value int32)
- func (b *BigMessage) GetSummary() (value bool)
- func (b *BigMessage) GetTargetId() (value int32)
- func (b *BigMessage) String() string
- func (b *BigMessage) TypeID() uint32
- func (b *BigMessage) Zero() bool
- type BoolBox
- type BoolClass
- type Bytes
- type BytesMessage
- type Client
- func (c *Client) DoAuth(ctx context.Context) (AuthClass, error)
- func (c *Client) EchoVector(ctx context.Context, ids []int) ([]int, error)
- func (c *Client) Ping(ctx context.Context, id int32) error
- func (c *Client) Send(ctx context.Context, msg SMS) (*SMS, error)
- func (c *Client) SendMultipleSMS(ctx context.Context, messages []SMS) error
- type ClientDHInnerData
- func (c *ClientDHInnerData) Decode(b *bin.Buffer) error
- func (c *ClientDHInnerData) Encode(b *bin.Buffer) error
- func (c *ClientDHInnerData) GetGB() (value string)
- func (c *ClientDHInnerData) GetNonce() (value bin.Int128)
- func (c *ClientDHInnerData) GetRetryID() (value int64)
- func (c *ClientDHInnerData) GetServerNonce() (value bin.Int128)
- func (c *ClientDHInnerData) String() string
- func (c *ClientDHInnerData) TypeID() uint32
- func (c *ClientDHInnerData) Zero() bool
- type Config
- func (c *Config) Decode(b *bin.Buffer) error
- func (c *Config) Encode(b *bin.Buffer) error
- func (c *Config) GetAutoupdateURLPrefix() (value string, ok bool)
- func (c *Config) GetBaseLangPackVersion() (value int, ok bool)
- func (c *Config) GetBlockedMode() (value bool)
- func (c *Config) GetCallConnectTimeoutMs() (value int)
- func (c *Config) GetCallPacketTimeoutMs() (value int)
- func (c *Config) GetCallReceiveTimeoutMs() (value int)
- func (c *Config) GetCallRingTimeoutMs() (value int)
- func (c *Config) GetCaptionLengthMax() (value int)
- func (c *Config) GetChannelsReadMediaPeriod() (value int)
- func (c *Config) GetChatSizeMax() (value int)
- func (c *Config) GetDCOptions() (value []DcOption)
- func (c *Config) GetDCTxtDomainName() (value string)
- func (c *Config) GetDate() (value int)
- func (c *Config) GetDefaultP2PContacts() (value bool)
- func (c *Config) GetEditTimeLimit() (value int)
- func (c *Config) GetExpires() (value int)
- func (c *Config) GetForwardedCountMax() (value int)
- func (c *Config) GetGifSearchUsername() (value string, ok bool)
- func (c *Config) GetIgnorePhoneEntities() (value bool)
- func (c *Config) GetImgSearchUsername() (value string, ok bool)
- func (c *Config) GetLangPackVersion() (value int, ok bool)
- func (c *Config) GetMeURLPrefix() (value string)
- func (c *Config) GetMegagroupSizeMax() (value int)
- func (c *Config) GetMessageLengthMax() (value int)
- func (c *Config) GetNotifyCloudDelayMs() (value int)
- func (c *Config) GetNotifyDefaultDelayMs() (value int)
- func (c *Config) GetOfflineBlurTimeoutMs() (value int)
- func (c *Config) GetOfflineIdleTimeoutMs() (value int)
- func (c *Config) GetOnlineCloudTimeoutMs() (value int)
- func (c *Config) GetOnlineUpdatePeriodMs() (value int)
- func (c *Config) GetPFSEnabled() (value bool)
- func (c *Config) GetPhonecallsEnabled() (value bool)
- func (c *Config) GetPinnedDialogsCountMax() (value int)
- func (c *Config) GetPinnedInfolderCountMax() (value int)
- func (c *Config) GetPreloadFeaturedStickers() (value bool)
- func (c *Config) GetPushChatLimit() (value int)
- func (c *Config) GetPushChatPeriodMs() (value int)
- func (c *Config) GetRatingEDecay() (value int)
- func (c *Config) GetRevokePmInbox() (value bool)
- func (c *Config) GetRevokePmTimeLimit() (value int)
- func (c *Config) GetRevokeTimeLimit() (value int)
- func (c *Config) GetSavedGifsLimit() (value int)
- func (c *Config) GetStaticMapsProvider() (value string, ok bool)
- func (c *Config) GetStickersFavedLimit() (value int)
- func (c *Config) GetStickersRecentLimit() (value int)
- func (c *Config) GetSuggestedLangCode() (value string, ok bool)
- func (c *Config) GetTestMode() (value bool)
- func (c *Config) GetThisDC() (value int)
- func (c *Config) GetTmpSessions() (value int, ok bool)
- func (c *Config) GetVenueSearchUsername() (value string, ok bool)
- func (c *Config) GetWebfileDCID() (value int)
- func (c *Config) SetAutoupdateURLPrefix(value string)
- func (c *Config) SetBaseLangPackVersion(value int)
- func (c *Config) SetBlockedMode(value bool)
- func (c *Config) SetDefaultP2PContacts(value bool)
- func (c *Config) SetGifSearchUsername(value string)
- func (c *Config) SetIgnorePhoneEntities(value bool)
- func (c *Config) SetImgSearchUsername(value string)
- func (c *Config) SetLangPackVersion(value int)
- func (c *Config) SetPFSEnabled(value bool)
- func (c *Config) SetPhonecallsEnabled(value bool)
- func (c *Config) SetPreloadFeaturedStickers(value bool)
- func (c *Config) SetRevokePmInbox(value bool)
- func (c *Config) SetStaticMapsProvider(value string)
- func (c *Config) SetSuggestedLangCode(value string)
- func (c *Config) SetTmpSessions(value int)
- func (c *Config) SetVenueSearchUsername(value string)
- func (c *Config) String() string
- func (c *Config) TypeID() uint32
- func (c *Config) Zero() bool
- type DcOption
- func (d *DcOption) Decode(b *bin.Buffer) error
- func (d *DcOption) Encode(b *bin.Buffer) error
- func (d *DcOption) GetCDN() (value bool)
- func (d *DcOption) GetID() (value int)
- func (d *DcOption) GetIPAddress() (value string)
- func (d *DcOption) GetIpv6() (value bool)
- func (d *DcOption) GetMediaOnly() (value bool)
- func (d *DcOption) GetPort() (value int)
- func (d *DcOption) GetSecret() (value []byte, ok bool)
- func (d *DcOption) GetStatic() (value bool)
- func (d *DcOption) GetTcpoOnly() (value bool)
- func (d *DcOption) SetCDN(value bool)
- func (d *DcOption) SetIpv6(value bool)
- func (d *DcOption) SetMediaOnly(value bool)
- func (d *DcOption) SetSecret(value []byte)
- func (d *DcOption) SetStatic(value bool)
- func (d *DcOption) SetTcpoOnly(value bool)
- func (d *DcOption) String() string
- func (d *DcOption) TypeID() uint32
- func (d *DcOption) Zero() bool
- type DoAuthRequest
- type EchoVectorRequest
- type Error
- func (e *Error) Decode(b *bin.Buffer) error
- func (e *Error) Encode(b *bin.Buffer) error
- func (e *Error) GetCode() (value int32)
- func (e *Error) GetMessage() (value string)
- func (e *Error) GetTemporary() (value bool)
- func (e *Error) String() string
- func (e *Error) TypeID() uint32
- func (e *Error) Zero() bool
- type False
- type FieldsMessage
- func (f *FieldsMessage) Decode(b *bin.Buffer) error
- func (f *FieldsMessage) Encode(b *bin.Buffer) error
- func (f *FieldsMessage) GetEscape() (value bool, ok bool)
- func (f *FieldsMessage) GetTTLSeconds() (value int, ok bool)
- func (f *FieldsMessage) SetEscape(value bool)
- func (f *FieldsMessage) SetTTLSeconds(value int)
- func (f *FieldsMessage) String() string
- func (f *FieldsMessage) TypeID() uint32
- func (f *FieldsMessage) Zero() bool
- type GetUpdatesResp
- type Int32
- type IntVector
- type InvokeWithLayer
- func (i *InvokeWithLayer) Decode(b *bin.Buffer) error
- func (i *InvokeWithLayer) Encode(b *bin.Buffer) error
- func (i *InvokeWithLayer) GetLayer() (value int)
- func (i *InvokeWithLayer) GetQuery() (value bin.Object)
- func (i *InvokeWithLayer) String() string
- func (i *InvokeWithLayer) TypeID() uint32
- func (i *InvokeWithLayer) Zero() bool
- type Invoker
- type Message
- type NoMessage
- type Ok
- type PingRequest
- type ResponseBox
- type ResponseClass
- type ResponseID
- type ResponseText
- type SMS
- type SendMultipleSMSRequest
- func (s *SendMultipleSMSRequest) Decode(b *bin.Buffer) error
- func (s *SendMultipleSMSRequest) Encode(b *bin.Buffer) error
- func (s *SendMultipleSMSRequest) GetMessages() (value []SMS)
- func (s *SendMultipleSMSRequest) String() string
- func (s *SendMultipleSMSRequest) TypeID() uint32
- func (s *SendMultipleSMSRequest) Zero() bool
- type SendRequest
- type String
- type TargetsMessage
- type TestBytes
- type TestInt
- type TestString
- type TestVectorBytes
- type TestVectorInt
- type TestVectorIntObject
- func (t *TestVectorIntObject) Decode(b *bin.Buffer) error
- func (t *TestVectorIntObject) Encode(b *bin.Buffer) error
- func (t *TestVectorIntObject) GetValue() (value []TestInt)
- func (t *TestVectorIntObject) String() string
- func (t *TestVectorIntObject) TypeID() uint32
- func (t *TestVectorIntObject) Zero() bool
- type TestVectorString
- type TestVectorStringObject
- func (t *TestVectorStringObject) Decode(b *bin.Buffer) error
- func (t *TestVectorStringObject) Encode(b *bin.Buffer) error
- func (t *TestVectorStringObject) GetValue() (value []TestString)
- func (t *TestVectorStringObject) String() string
- func (t *TestVectorStringObject) TypeID() uint32
- func (t *TestVectorStringObject) Zero() bool
- type TestVectorVector
- type TextEntities
- type TextEntity
- func (t *TextEntity) Decode(b *bin.Buffer) error
- func (t *TextEntity) Encode(b *bin.Buffer) error
- func (t *TextEntity) GetLength() (value int32)
- func (t *TextEntity) GetOffset() (value int32)
- func (t *TextEntity) GetType() (value TextEntityTypeClass)
- func (t *TextEntity) String() string
- func (t *TextEntity) TypeID() uint32
- func (t *TextEntity) Zero() bool
- type TextEntityTypeBankCardNumber
- type TextEntityTypeBold
- type TextEntityTypeBotCommand
- type TextEntityTypeBox
- type TextEntityTypeCashtag
- type TextEntityTypeClass
- type TextEntityTypeCode
- type TextEntityTypeEmailAddress
- type TextEntityTypeHashtag
- type TextEntityTypeItalic
- type TextEntityTypeMention
- type TextEntityTypeMentionName
- func (t *TextEntityTypeMentionName) Decode(b *bin.Buffer) error
- func (t *TextEntityTypeMentionName) Encode(b *bin.Buffer) error
- func (t *TextEntityTypeMentionName) GetUserID() (value int32)
- func (t *TextEntityTypeMentionName) String() string
- func (t *TextEntityTypeMentionName) TypeID() uint32
- func (t *TextEntityTypeMentionName) Zero() bool
- type TextEntityTypePhoneNumber
- type TextEntityTypePre
- type TextEntityTypePreCode
- func (t *TextEntityTypePreCode) Decode(b *bin.Buffer) error
- func (t *TextEntityTypePreCode) Encode(b *bin.Buffer) error
- func (t *TextEntityTypePreCode) GetLanguage() (value string)
- func (t *TextEntityTypePreCode) String() string
- func (t *TextEntityTypePreCode) TypeID() uint32
- func (t *TextEntityTypePreCode) Zero() bool
- type TextEntityTypeStrikethrough
- type TextEntityTypeTextUrl
- func (t *TextEntityTypeTextUrl) Decode(b *bin.Buffer) error
- func (t *TextEntityTypeTextUrl) Encode(b *bin.Buffer) error
- func (t *TextEntityTypeTextUrl) GetURL() (value string)
- func (t *TextEntityTypeTextUrl) String() string
- func (t *TextEntityTypeTextUrl) TypeID() uint32
- func (t *TextEntityTypeTextUrl) Zero() bool
- type TextEntityTypeUnderline
- type TextEntityTypeUrl
- type Theme
- type True
- type Update
- type UserAuth
- type UserAuthBox
- type UserAuthClass
- type UserAuthPassword
Constants ¶
const AccountThemesNotModifiedTypeID = 0xf41eb622
AccountThemesNotModifiedTypeID is TL type id of AccountThemesNotModified.
const AccountThemesTypeID = 0x7f676421
AccountThemesTypeID is TL type id of AccountThemes.
const AuthPasswordTypeID = 0x29bacabb
AuthPasswordTypeID is TL type id of AuthPassword.
const AuthTypeID = 0xf8bb4a38
AuthTypeID is TL type id of Auth.
const BigMessageTypeID = 0x7490dcc5
BigMessageTypeID is TL type id of BigMessage.
const BytesMessageTypeID = 0xf990a67d
BytesMessageTypeID is TL type id of BytesMessage.
const BytesTypeID = 0xe937bb82
BytesTypeID is TL type id of Bytes.
const ClientDHInnerDataTypeID = 0x6643b654
ClientDHInnerDataTypeID is TL type id of ClientDHInnerData.
const ConfigTypeID = 0x330b4067
ConfigTypeID is TL type id of Config.
const DcOptionTypeID = 0x18b7a10d
DcOptionTypeID is TL type id of DcOption.
const DoAuthRequestTypeID = 0xfd2f6687
DoAuthRequestTypeID is TL type id of DoAuthRequest.
const EchoVectorRequestTypeID = 0xd4785939
EchoVectorRequestTypeID is TL type id of EchoVectorRequest.
const ErrorTypeID = 0x14feebbc
ErrorTypeID is TL type id of Error.
const FalseTypeID = 0xbc799737
FalseTypeID is TL type id of False.
const FieldsMessageTypeID = 0x947225b5
FieldsMessageTypeID is TL type id of FieldsMessage.
const GetUpdatesRespTypeID = 0x2b4b45c
GetUpdatesRespTypeID is TL type id of GetUpdatesResp.
const Int32TypeID = 0x5cb934fa
Int32TypeID is TL type id of Int32.
const IntVectorTypeID = bin.TypeVector
IntVectorTypeID is TL type id of IntVector.
const InvokeWithLayerTypeID = 0xda9b0d0d
InvokeWithLayerTypeID is TL type id of InvokeWithLayer.
const MessageTypeID = 0xec200d96
MessageTypeID is TL type id of Message.
const NoMessageTypeID = 0xee6324c4
NoMessageTypeID is TL type id of NoMessage.
const OkTypeID = 0xd4edbe69
OkTypeID is TL type id of Ok.
const PingRequestTypeID = 0xce73048f
PingRequestTypeID is TL type id of PingRequest.
const ResponseIDTypeID = 0x85d7fd8b
ResponseIDTypeID is TL type id of ResponseID.
const ResponseTextTypeID = 0xcb0244f2
ResponseTextTypeID is TL type id of ResponseText.
const SMSTypeID = 0xed8bebfe
SMSTypeID is TL type id of SMS.
const SendMultipleSMSRequestTypeID = 0xdf18e5ca
SendMultipleSMSRequestTypeID is TL type id of SendMultipleSMSRequest.
const SendRequestTypeID = 0xf74488a
SendRequestTypeID is TL type id of SendRequest.
const StringTypeID = 0xb5286e24
StringTypeID is TL type id of String.
const TargetsMessageTypeID = 0xcc6136f1
TargetsMessageTypeID is TL type id of TargetsMessage.
const TestBytesTypeID = 0xa422c4de
TestBytesTypeID is TL type id of TestBytes.
const TestIntTypeID = 0xddbd2c09
TestIntTypeID is TL type id of TestInt.
const TestStringTypeID = 0xfe56688c
TestStringTypeID is TL type id of TestString.
const TestVectorBytesTypeID = 0xa590fb25
TestVectorBytesTypeID is TL type id of TestVectorBytes.
const TestVectorIntObjectTypeID = 0xf152999b
TestVectorIntObjectTypeID is TL type id of TestVectorIntObject.
const TestVectorIntTypeID = 0xdf9eb113
TestVectorIntTypeID is TL type id of TestVectorInt.
const TestVectorStringObjectTypeID = 0xe5ecc0d
TestVectorStringObjectTypeID is TL type id of TestVectorStringObject.
const TestVectorStringTypeID = 0x5d6f85bc
TestVectorStringTypeID is TL type id of TestVectorString.
const TestVectorVectorTypeID = 0x69e8846c
TestVectorVectorTypeID is TL type id of TestVectorVector.
const TextEntitiesTypeID = 0xcf89c258
TextEntitiesTypeID is TL type id of TextEntities.
const TextEntityTypeBankCardNumberTypeID = 0x6513910
TextEntityTypeBankCardNumberTypeID is TL type id of TextEntityTypeBankCardNumber.
const TextEntityTypeBoldTypeID = 0xbcc0e1b0
TextEntityTypeBoldTypeID is TL type id of TextEntityTypeBold.
const TextEntityTypeBotCommandTypeID = 0xbb652bb3
TextEntityTypeBotCommandTypeID is TL type id of TextEntityTypeBotCommand.
const TextEntityTypeCashtagTypeID = 0x48e4374b
TextEntityTypeCashtagTypeID is TL type id of TextEntityTypeCashtag.
const TextEntityTypeCodeTypeID = 0xc5e9c94a
TextEntityTypeCodeTypeID is TL type id of TextEntityTypeCode.
const TextEntityTypeEmailAddressTypeID = 0x54f81821
TextEntityTypeEmailAddressTypeID is TL type id of TextEntityTypeEmailAddress.
const TextEntityTypeHashtagTypeID = 0xc2f7a2dd
TextEntityTypeHashtagTypeID is TL type id of TextEntityTypeHashtag.
const TextEntityTypeID = 0x8bab99a8
TextEntityTypeID is TL type id of TextEntity.
const TextEntityTypeItalicTypeID = 0xf8f3965d
TextEntityTypeItalicTypeID is TL type id of TextEntityTypeItalic.
const TextEntityTypeMentionNameTypeID = 0xd0d2685d
TextEntityTypeMentionNameTypeID is TL type id of TextEntityTypeMentionName.
const TextEntityTypeMentionTypeID = 0x37b3df65
TextEntityTypeMentionTypeID is TL type id of TextEntityTypeMention.
const TextEntityTypePhoneNumberTypeID = 0xbad9aa2a
TextEntityTypePhoneNumberTypeID is TL type id of TextEntityTypePhoneNumber.
const TextEntityTypePreCodeTypeID = 0xc7a77aab
TextEntityTypePreCodeTypeID is TL type id of TextEntityTypePreCode.
const TextEntityTypePreTypeID = 0x62491c8e
TextEntityTypePreTypeID is TL type id of TextEntityTypePre.
const TextEntityTypeStrikethroughTypeID = 0x394fc4fa
TextEntityTypeStrikethroughTypeID is TL type id of TextEntityTypeStrikethrough.
const TextEntityTypeTextUrlTypeID = 0x1a912463
TextEntityTypeTextUrlTypeID is TL type id of TextEntityTypeTextUrl.
const TextEntityTypeUnderlineTypeID = 0x2f39cf92
TextEntityTypeUnderlineTypeID is TL type id of TextEntityTypeUnderline.
const TextEntityTypeUrlTypeID = 0xb1c0d47c
TextEntityTypeUrlTypeID is TL type id of TextEntityTypeUrl.
const ThemeTypeID = 0x28f1114
ThemeTypeID is TL type id of Theme.
const TrueTypeID = 0x997275b5
TrueTypeID is TL type id of True.
const UpdateTypeID = 0xb03e2ef8
UpdateTypeID is TL type id of Update.
const UserAuthPasswordTypeID = 0x5981e317
UserAuthPasswordTypeID is TL type id of UserAuthPassword.
const UserAuthTypeID = 0xf4815592
UserAuthTypeID is TL type id of UserAuth.
Variables ¶
This section is empty.
Functions ¶
func TypesConstructorMap ¶ added in v0.15.0
TypesConstructorMap maps type ids to constructors.
Types ¶
type AbstractMessageBox ¶
type AbstractMessageBox struct {
AbstractMessage AbstractMessageClass
}
AbstractMessage boxes the AbstractMessageClass providing a helper.
type AbstractMessageClass ¶
type AbstractMessageClass interface {
bin.Encoder
bin.Decoder
// TypeID returns MTProto type id (CRC code).
// See https://core.telegram.org/mtproto/TL-tl#remarks.
TypeID() uint32
// 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 := DecodeAbstractMessage(buf)
if err != nil {
panic(err)
}
switch v := g.(type) {
case *BigMessage: // bigMessage#7490dcc5
case *NoMessage: // noMessage#ee6324c4
case *TargetsMessage: // targetsMessage#cc6136f1
case *FieldsMessage: // fieldsMessage#947225b5
case *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) Encode ¶
func (t *AccountThemes) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*AccountThemes) GetHash ¶ added in v0.21.0
func (t *AccountThemes) GetHash() (value int)
GetHash returns value of Hash field.
func (*AccountThemes) GetThemes ¶ added in v0.21.0
func (t *AccountThemes) GetThemes() (value []Theme)
GetThemes returns value of Themes field.
func (*AccountThemes) String ¶ added in v0.12.0
func (t *AccountThemes) String() string
String implements fmt.Stringer.
func (*AccountThemes) TypeID ¶ added in v0.21.0
func (t *AccountThemes) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*AccountThemes) Zero ¶ added in v0.20.0
func (t *AccountThemes) Zero() bool
type AccountThemesBox ¶
type AccountThemesBox struct {
Themes AccountThemesClass
}
AccountThemes boxes the AccountThemesClass providing a helper.
type AccountThemesClass ¶
type AccountThemesClass interface {
bin.Encoder
bin.Decoder
// TypeID returns MTProto type id (CRC code).
// See https://core.telegram.org/mtproto/TL-tl#remarks.
TypeID() uint32
// 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 := DecodeAccountThemes(buf)
if err != nil {
panic(err)
}
switch v := g.(type) {
case *AccountThemesNotModified: // account.themesNotModified#f41eb622
case *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) Encode ¶
func (t *AccountThemesNotModified) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*AccountThemesNotModified) String ¶ added in v0.12.0
func (t *AccountThemesNotModified) String() string
String implements fmt.Stringer.
func (*AccountThemesNotModified) TypeID ¶ added in v0.21.0
func (t *AccountThemesNotModified) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*AccountThemesNotModified) Zero ¶ added in v0.20.0
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) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
type AuthBox ¶
type AuthBox struct {
Auth AuthClass
}
Auth boxes the AuthClass providing a helper.
type AuthClass ¶
type AuthClass interface {
bin.Encoder
bin.Decoder
// Name field of Auth.
GetName() (value string)
// TypeID returns MTProto type id (CRC code).
// See https://core.telegram.org/mtproto/TL-tl#remarks.
TypeID() uint32
// String implements fmt.Stringer.
String() string
// Zero returns true if current object has a zero value.
Zero() bool
// contains filtered or unexported methods
}
AuthClass represents Auth generic type.
See https://localhost:80/doc/type/Auth for reference.
Example:
g, err := DecodeAuth(buf)
if err != nil {
panic(err)
}
switch v := g.(type) {
case *Auth: // auth#f8bb4a38
case *AuthPassword: // authPassword#29bacabb
default: panic(v)
}
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) Encode ¶
func (a *AuthPassword) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*AuthPassword) GetName ¶ added in v0.21.0
func (a *AuthPassword) GetName() (value string)
GetName returns value of Name field.
func (*AuthPassword) GetPassword ¶ added in v0.21.0
func (a *AuthPassword) GetPassword() (value string)
GetPassword returns value of Password field.
func (*AuthPassword) String ¶ added in v0.12.0
func (a *AuthPassword) String() string
String implements fmt.Stringer.
func (*AuthPassword) TypeID ¶ added in v0.21.0
func (a *AuthPassword) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*AuthPassword) Zero ¶ added in v0.20.0
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) Encode ¶
func (b *BigMessage) Encode(buf *bin.Buffer) error
Encode implements bin.Encoder.
func (*BigMessage) GetCount ¶ added in v0.21.0
func (b *BigMessage) GetCount() (value int32)
GetCount returns value of Count field.
func (*BigMessage) GetEscape ¶ added in v0.21.0
func (b *BigMessage) GetEscape() (value bool)
GetEscape returns value of Escape field.
func (*BigMessage) GetID ¶ added in v0.21.0
func (b *BigMessage) GetID() (value int32)
GetID returns value of ID field.
func (*BigMessage) GetSummary ¶ added in v0.21.0
func (b *BigMessage) GetSummary() (value bool)
GetSummary returns value of Summary field.
func (*BigMessage) GetTargetId ¶ added in v0.21.0
func (b *BigMessage) GetTargetId() (value int32)
GetTargetId returns value of TargetId field.
func (*BigMessage) String ¶ added in v0.12.0
func (b *BigMessage) String() string
String implements fmt.Stringer.
func (*BigMessage) TypeID ¶ added in v0.21.0
func (b *BigMessage) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*BigMessage) Zero ¶ added in v0.20.0
func (b *BigMessage) Zero() bool
type BoolBox ¶
type BoolBox struct {
Bool BoolClass
}
Bool boxes the BoolClass providing a helper.
type BoolClass ¶
type BoolClass interface {
bin.Encoder
bin.Decoder
// TypeID returns MTProto type id (CRC code).
// See https://core.telegram.org/mtproto/TL-tl#remarks.
TypeID() uint32
// 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 := DecodeBool(buf)
if err != nil {
panic(err)
}
switch v := g.(type) {
case *False: // false#bc799737
case *True: // true#997275b5
default: panic(v)
}
type Bytes ¶
type Bytes struct {
}
Bytes represents TL type `bytes#e937bb82`.
See https://localhost:80/doc/constructor/bytes for reference.
func (*Bytes) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
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) Encode ¶
func (b *BytesMessage) Encode(buf *bin.Buffer) error
Encode implements bin.Encoder.
func (*BytesMessage) GetData ¶ added in v0.21.0
func (b *BytesMessage) GetData() (value []byte)
GetData returns value of Data field.
func (*BytesMessage) String ¶ added in v0.12.0
func (b *BytesMessage) String() string
String implements fmt.Stringer.
func (*BytesMessage) TypeID ¶ added in v0.21.0
func (b *BytesMessage) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*BytesMessage) Zero ¶ added in v0.20.0
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 (*Client) DoAuth ¶
DoAuth invokes method doAuth#fd2f6687 returning error if any.
See https://localhost:80/doc/method/doAuth for reference.
func (*Client) EchoVector ¶ added in v0.8.0
EchoVector invokes method echoVector#d4785939 returning error if any.
See https://localhost:80/doc/method/echoVector for reference.
func (*Client) Ping ¶
Ping invokes method ping#ce73048f returning error if any.
See https://localhost:80/doc/constructor/ping for reference.
func (*Client) Send ¶
Send invokes method send#f74488a returning error if any.
See https://localhost:80/doc/method/send for reference.
func (*Client) SendMultipleSMS ¶
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) Encode ¶
func (c *ClientDHInnerData) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*ClientDHInnerData) GetGB ¶ added in v0.21.0
func (c *ClientDHInnerData) GetGB() (value string)
GetGB returns value of GB field.
func (*ClientDHInnerData) GetNonce ¶ added in v0.21.0
func (c *ClientDHInnerData) GetNonce() (value bin.Int128)
GetNonce returns value of Nonce field.
func (*ClientDHInnerData) GetRetryID ¶ added in v0.21.0
func (c *ClientDHInnerData) GetRetryID() (value int64)
GetRetryID returns value of RetryID field.
func (*ClientDHInnerData) GetServerNonce ¶ added in v0.21.0
func (c *ClientDHInnerData) GetServerNonce() (value bin.Int128)
GetServerNonce returns value of ServerNonce field.
func (*ClientDHInnerData) String ¶ added in v0.12.0
func (c *ClientDHInnerData) String() string
String implements fmt.Stringer.
func (*ClientDHInnerData) TypeID ¶ added in v0.21.0
func (c *ClientDHInnerData) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*ClientDHInnerData) Zero ¶ added in v0.20.0
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) GetAutoupdateURLPrefix ¶
GetAutoupdateURLPrefix returns value of AutoupdateURLPrefix conditional field and boolean which is true if field was set.
func (*Config) GetBaseLangPackVersion ¶
GetBaseLangPackVersion returns value of BaseLangPackVersion conditional field and boolean which is true if field was set.
func (*Config) GetBlockedMode ¶ added in v0.21.0
GetBlockedMode returns value of BlockedMode conditional field.
func (*Config) GetCallConnectTimeoutMs ¶ added in v0.21.0
GetCallConnectTimeoutMs returns value of CallConnectTimeoutMs field.
func (*Config) GetCallPacketTimeoutMs ¶ added in v0.21.0
GetCallPacketTimeoutMs returns value of CallPacketTimeoutMs field.
func (*Config) GetCallReceiveTimeoutMs ¶ added in v0.21.0
GetCallReceiveTimeoutMs returns value of CallReceiveTimeoutMs field.
func (*Config) GetCallRingTimeoutMs ¶ added in v0.21.0
GetCallRingTimeoutMs returns value of CallRingTimeoutMs field.
func (*Config) GetCaptionLengthMax ¶ added in v0.21.0
GetCaptionLengthMax returns value of CaptionLengthMax field.
func (*Config) GetChannelsReadMediaPeriod ¶ added in v0.21.0
GetChannelsReadMediaPeriod returns value of ChannelsReadMediaPeriod field.
func (*Config) GetChatSizeMax ¶ added in v0.21.0
GetChatSizeMax returns value of ChatSizeMax field.
func (*Config) GetDCOptions ¶ added in v0.21.0
GetDCOptions returns value of DCOptions field.
func (*Config) GetDCTxtDomainName ¶ added in v0.21.0
GetDCTxtDomainName returns value of DCTxtDomainName field.
func (*Config) GetDefaultP2PContacts ¶ added in v0.21.0
GetDefaultP2PContacts returns value of DefaultP2PContacts conditional field.
func (*Config) GetEditTimeLimit ¶ added in v0.21.0
GetEditTimeLimit returns value of EditTimeLimit field.
func (*Config) GetExpires ¶ added in v0.21.0
GetExpires returns value of Expires field.
func (*Config) GetForwardedCountMax ¶ added in v0.21.0
GetForwardedCountMax returns value of ForwardedCountMax field.
func (*Config) GetGifSearchUsername ¶
GetGifSearchUsername returns value of GifSearchUsername conditional field and boolean which is true if field was set.
func (*Config) GetIgnorePhoneEntities ¶ added in v0.21.0
GetIgnorePhoneEntities returns value of IgnorePhoneEntities conditional field.
func (*Config) GetImgSearchUsername ¶
GetImgSearchUsername returns value of ImgSearchUsername conditional field and boolean which is true if field was set.
func (*Config) GetLangPackVersion ¶
GetLangPackVersion returns value of LangPackVersion conditional field and boolean which is true if field was set.
func (*Config) GetMeURLPrefix ¶ added in v0.21.0
GetMeURLPrefix returns value of MeURLPrefix field.
func (*Config) GetMegagroupSizeMax ¶ added in v0.21.0
GetMegagroupSizeMax returns value of MegagroupSizeMax field.
func (*Config) GetMessageLengthMax ¶ added in v0.21.0
GetMessageLengthMax returns value of MessageLengthMax field.
func (*Config) GetNotifyCloudDelayMs ¶ added in v0.21.0
GetNotifyCloudDelayMs returns value of NotifyCloudDelayMs field.
func (*Config) GetNotifyDefaultDelayMs ¶ added in v0.21.0
GetNotifyDefaultDelayMs returns value of NotifyDefaultDelayMs field.
func (*Config) GetOfflineBlurTimeoutMs ¶ added in v0.21.0
GetOfflineBlurTimeoutMs returns value of OfflineBlurTimeoutMs field.
func (*Config) GetOfflineIdleTimeoutMs ¶ added in v0.21.0
GetOfflineIdleTimeoutMs returns value of OfflineIdleTimeoutMs field.
func (*Config) GetOnlineCloudTimeoutMs ¶ added in v0.21.0
GetOnlineCloudTimeoutMs returns value of OnlineCloudTimeoutMs field.
func (*Config) GetOnlineUpdatePeriodMs ¶ added in v0.21.0
GetOnlineUpdatePeriodMs returns value of OnlineUpdatePeriodMs field.
func (*Config) GetPFSEnabled ¶ added in v0.21.0
GetPFSEnabled returns value of PFSEnabled conditional field.
func (*Config) GetPhonecallsEnabled ¶ added in v0.21.0
GetPhonecallsEnabled returns value of PhonecallsEnabled conditional field.
func (*Config) GetPinnedDialogsCountMax ¶ added in v0.21.0
GetPinnedDialogsCountMax returns value of PinnedDialogsCountMax field.
func (*Config) GetPinnedInfolderCountMax ¶ added in v0.21.0
GetPinnedInfolderCountMax returns value of PinnedInfolderCountMax field.
func (*Config) GetPreloadFeaturedStickers ¶ added in v0.21.0
GetPreloadFeaturedStickers returns value of PreloadFeaturedStickers conditional field.
func (*Config) GetPushChatLimit ¶ added in v0.21.0
GetPushChatLimit returns value of PushChatLimit field.
func (*Config) GetPushChatPeriodMs ¶ added in v0.21.0
GetPushChatPeriodMs returns value of PushChatPeriodMs field.
func (*Config) GetRatingEDecay ¶ added in v0.21.0
GetRatingEDecay returns value of RatingEDecay field.
func (*Config) GetRevokePmInbox ¶ added in v0.21.0
GetRevokePmInbox returns value of RevokePmInbox conditional field.
func (*Config) GetRevokePmTimeLimit ¶ added in v0.21.0
GetRevokePmTimeLimit returns value of RevokePmTimeLimit field.
func (*Config) GetRevokeTimeLimit ¶ added in v0.21.0
GetRevokeTimeLimit returns value of RevokeTimeLimit field.
func (*Config) GetSavedGifsLimit ¶ added in v0.21.0
GetSavedGifsLimit returns value of SavedGifsLimit field.
func (*Config) GetStaticMapsProvider ¶
GetStaticMapsProvider returns value of StaticMapsProvider conditional field and boolean which is true if field was set.
func (*Config) GetStickersFavedLimit ¶ added in v0.21.0
GetStickersFavedLimit returns value of StickersFavedLimit field.
func (*Config) GetStickersRecentLimit ¶ added in v0.21.0
GetStickersRecentLimit returns value of StickersRecentLimit field.
func (*Config) GetSuggestedLangCode ¶
GetSuggestedLangCode returns value of SuggestedLangCode conditional field and boolean which is true if field was set.
func (*Config) GetTestMode ¶ added in v0.21.0
GetTestMode returns value of TestMode field.
func (*Config) GetTmpSessions ¶
GetTmpSessions returns value of TmpSessions conditional field and boolean which is true if field was set.
func (*Config) GetVenueSearchUsername ¶
GetVenueSearchUsername returns value of VenueSearchUsername conditional field and boolean which is true if field was set.
func (*Config) GetWebfileDCID ¶ added in v0.21.0
GetWebfileDCID returns value of WebfileDCID field.
func (*Config) SetAutoupdateURLPrefix ¶
SetAutoupdateURLPrefix sets value of AutoupdateURLPrefix conditional field.
func (*Config) SetBaseLangPackVersion ¶
SetBaseLangPackVersion sets value of BaseLangPackVersion conditional field.
func (*Config) SetBlockedMode ¶
SetBlockedMode sets value of BlockedMode conditional field.
func (*Config) SetDefaultP2PContacts ¶
SetDefaultP2PContacts sets value of DefaultP2PContacts conditional field.
func (*Config) SetGifSearchUsername ¶
SetGifSearchUsername sets value of GifSearchUsername conditional field.
func (*Config) SetIgnorePhoneEntities ¶
SetIgnorePhoneEntities sets value of IgnorePhoneEntities conditional field.
func (*Config) SetImgSearchUsername ¶
SetImgSearchUsername sets value of ImgSearchUsername conditional field.
func (*Config) SetLangPackVersion ¶
SetLangPackVersion sets value of LangPackVersion conditional field.
func (*Config) SetPFSEnabled ¶
SetPFSEnabled sets value of PFSEnabled conditional field.
func (*Config) SetPhonecallsEnabled ¶
SetPhonecallsEnabled sets value of PhonecallsEnabled conditional field.
func (*Config) SetPreloadFeaturedStickers ¶
SetPreloadFeaturedStickers sets value of PreloadFeaturedStickers conditional field.
func (*Config) SetRevokePmInbox ¶
SetRevokePmInbox sets value of RevokePmInbox conditional field.
func (*Config) SetStaticMapsProvider ¶
SetStaticMapsProvider sets value of StaticMapsProvider conditional field.
func (*Config) SetSuggestedLangCode ¶
SetSuggestedLangCode sets value of SuggestedLangCode conditional field.
func (*Config) SetTmpSessions ¶
SetTmpSessions sets value of TmpSessions conditional field.
func (*Config) SetVenueSearchUsername ¶
SetVenueSearchUsername sets value of VenueSearchUsername conditional field.
func (*Config) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
type DcOption ¶
type DcOption struct {
// Flags field of DcOption.
Flags bin.Fields
// Ipv6 field of DcOption.
Ipv6 bool
// MediaOnly field of DcOption.
MediaOnly bool
// TcpoOnly field of DcOption.
TcpoOnly 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) GetIPAddress ¶ added in v0.21.0
GetIPAddress returns value of IPAddress field.
func (*DcOption) GetMediaOnly ¶ added in v0.21.0
GetMediaOnly returns value of MediaOnly conditional field.
func (*DcOption) GetSecret ¶
GetSecret returns value of Secret conditional field and boolean which is true if field was set.
func (*DcOption) GetTcpoOnly ¶ added in v0.21.0
GetTcpoOnly returns value of TcpoOnly conditional field.
func (*DcOption) SetMediaOnly ¶
SetMediaOnly sets value of MediaOnly conditional field.
func (*DcOption) SetTcpoOnly ¶
SetTcpoOnly sets value of TcpoOnly conditional field.
func (*DcOption) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
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) Encode ¶
func (d *DoAuthRequest) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*DoAuthRequest) String ¶ added in v0.12.0
func (d *DoAuthRequest) String() string
String implements fmt.Stringer.
func (*DoAuthRequest) TypeID ¶ added in v0.21.0
func (d *DoAuthRequest) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*DoAuthRequest) Zero ¶ added in v0.20.0
func (d *DoAuthRequest) Zero() bool
type EchoVectorRequest ¶ added in v0.8.0
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 ¶ added in v0.8.0
func (e *EchoVectorRequest) Decode(b *bin.Buffer) error
Decode implements bin.Decoder.
func (*EchoVectorRequest) Encode ¶ added in v0.8.0
func (e *EchoVectorRequest) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*EchoVectorRequest) GetIds ¶ added in v0.21.0
func (e *EchoVectorRequest) GetIds() (value []int)
GetIds returns value of Ids field.
func (*EchoVectorRequest) String ¶ added in v0.12.0
func (e *EchoVectorRequest) String() string
String implements fmt.Stringer.
func (*EchoVectorRequest) TypeID ¶ added in v0.21.0
func (e *EchoVectorRequest) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*EchoVectorRequest) Zero ¶ added in v0.20.0
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) GetMessage ¶ added in v0.21.0
GetMessage returns value of Message field.
func (*Error) GetTemporary ¶ added in v0.21.0
GetTemporary returns value of Temporary field.
func (*Error) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
type False ¶
type False struct {
}
False represents TL type `false#bc799737`.
See https://localhost:80/doc/constructor/false for reference.
func (*False) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
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) Encode ¶
func (f *FieldsMessage) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*FieldsMessage) GetEscape ¶ added in v0.17.0
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) SetTTLSeconds ¶
func (f *FieldsMessage) SetTTLSeconds(value int)
SetTTLSeconds sets value of TTLSeconds conditional field.
func (*FieldsMessage) String ¶ added in v0.12.0
func (f *FieldsMessage) String() string
String implements fmt.Stringer.
func (*FieldsMessage) TypeID ¶ added in v0.21.0
func (f *FieldsMessage) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*FieldsMessage) Zero ¶ added in v0.20.0
func (f *FieldsMessage) Zero() bool
type GetUpdatesResp ¶
type GetUpdatesResp struct {
// Updates field of GetUpdatesResp.
Updates []AbstractMessageClass
}
GetUpdatesResp represents TL type `getUpdatesResp#2b4b45c`.
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) Encode ¶
func (g *GetUpdatesResp) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*GetUpdatesResp) GetUpdates ¶ added in v0.21.0
func (g *GetUpdatesResp) GetUpdates() (value []AbstractMessageClass)
GetUpdates returns value of Updates field.
func (*GetUpdatesResp) String ¶ added in v0.12.0
func (g *GetUpdatesResp) String() string
String implements fmt.Stringer.
func (*GetUpdatesResp) TypeID ¶ added in v0.21.0
func (g *GetUpdatesResp) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*GetUpdatesResp) Zero ¶ added in v0.20.0
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) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
type IntVector ¶ added in v0.8.0
type IntVector struct {
// Elements of Vector<int>
Elems []int
}
IntVector is a box for Vector<int>
func (*IntVector) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
type InvokeWithLayer ¶ added in v0.18.0
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 ¶ added in v0.18.0
func (i *InvokeWithLayer) Decode(b *bin.Buffer) error
Decode implements bin.Decoder.
func (*InvokeWithLayer) Encode ¶ added in v0.18.0
func (i *InvokeWithLayer) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*InvokeWithLayer) GetLayer ¶ added in v0.21.0
func (i *InvokeWithLayer) GetLayer() (value int)
GetLayer returns value of Layer field.
func (*InvokeWithLayer) GetQuery ¶ added in v0.21.0
func (i *InvokeWithLayer) GetQuery() (value bin.Object)
GetQuery returns value of Query field.
func (*InvokeWithLayer) String ¶ added in v0.18.0
func (i *InvokeWithLayer) String() string
String implements fmt.Stringer.
func (*InvokeWithLayer) TypeID ¶ added in v0.21.0
func (i *InvokeWithLayer) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*InvokeWithLayer) Zero ¶ added in v0.20.0
func (i *InvokeWithLayer) Zero() bool
type Invoker ¶
type Invoker interface {
InvokeRaw(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) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
type NoMessage ¶
type NoMessage struct {
}
NoMessage represents TL type `noMessage#ee6324c4`.
See https://localhost:80/doc/constructor/noMessage for reference.
func (*NoMessage) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
type Ok ¶
type Ok struct {
}
Ok represents TL type `ok#d4edbe69`.
See https://localhost:80/doc/constructor/ok for reference.
func (*Ok) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
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) Encode ¶
func (p *PingRequest) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*PingRequest) GetID ¶ added in v0.21.0
func (p *PingRequest) GetID() (value int32)
GetID returns value of ID field.
func (*PingRequest) String ¶ added in v0.12.0
func (p *PingRequest) String() string
String implements fmt.Stringer.
func (*PingRequest) TypeID ¶ added in v0.21.0
func (p *PingRequest) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*PingRequest) Zero ¶ added in v0.20.0
func (p *PingRequest) Zero() bool
type ResponseBox ¶
type ResponseBox struct {
Response ResponseClass
}
Response boxes the ResponseClass providing a helper.
type ResponseClass ¶
type ResponseClass interface {
bin.Encoder
bin.Decoder
// TypeID returns MTProto type id (CRC code).
// See https://core.telegram.org/mtproto/TL-tl#remarks.
TypeID() uint32
// 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 := DecodeResponse(buf)
if err != nil {
panic(err)
}
switch v := g.(type) {
case *ResponseID: // responseID#85d7fd8b
case *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) Encode ¶
func (r *ResponseID) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*ResponseID) GetID ¶ added in v0.21.0
func (r *ResponseID) GetID() (value int32)
GetID returns value of ID field.
func (*ResponseID) String ¶ added in v0.12.0
func (r *ResponseID) String() string
String implements fmt.Stringer.
func (*ResponseID) TypeID ¶ added in v0.21.0
func (r *ResponseID) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*ResponseID) Zero ¶ added in v0.20.0
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) Encode ¶
func (r *ResponseText) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*ResponseText) GetText ¶ added in v0.21.0
func (r *ResponseText) GetText() (value string)
GetText returns value of Text field.
func (*ResponseText) String ¶ added in v0.12.0
func (r *ResponseText) String() string
String implements fmt.Stringer.
func (*ResponseText) TypeID ¶ added in v0.21.0
func (r *ResponseText) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*ResponseText) Zero ¶ added in v0.20.0
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) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
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) Encode ¶
func (s *SendMultipleSMSRequest) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*SendMultipleSMSRequest) GetMessages ¶ added in v0.21.0
func (s *SendMultipleSMSRequest) GetMessages() (value []SMS)
GetMessages returns value of Messages field.
func (*SendMultipleSMSRequest) String ¶ added in v0.12.0
func (s *SendMultipleSMSRequest) String() string
String implements fmt.Stringer.
func (*SendMultipleSMSRequest) TypeID ¶ added in v0.21.0
func (s *SendMultipleSMSRequest) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*SendMultipleSMSRequest) Zero ¶ added in v0.20.0
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) Encode ¶
func (s *SendRequest) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*SendRequest) GetMsg ¶ added in v0.21.0
func (s *SendRequest) GetMsg() (value SMS)
GetMsg returns value of Msg field.
func (*SendRequest) String ¶ added in v0.12.0
func (s *SendRequest) String() string
String implements fmt.Stringer.
func (*SendRequest) TypeID ¶ added in v0.21.0
func (s *SendRequest) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*SendRequest) Zero ¶ added in v0.20.0
func (s *SendRequest) Zero() bool
type String ¶
type String struct {
}
String represents TL type `string#b5286e24`.
See https://localhost:80/doc/constructor/string for reference.
func (*String) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
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) Encode ¶
func (t *TargetsMessage) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TargetsMessage) GetTargets ¶ added in v0.21.0
func (t *TargetsMessage) GetTargets() (value []int32)
GetTargets returns value of Targets field.
func (*TargetsMessage) String ¶ added in v0.12.0
func (t *TargetsMessage) String() string
String implements fmt.Stringer.
func (*TargetsMessage) TypeID ¶ added in v0.21.0
func (t *TargetsMessage) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TargetsMessage) Zero ¶ added in v0.20.0
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) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
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) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
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) Encode ¶
func (t *TestString) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TestString) GetValue ¶ added in v0.21.0
func (t *TestString) GetValue() (value string)
GetValue returns value of Value field.
func (*TestString) String ¶ added in v0.12.0
func (t *TestString) String() string
String implements fmt.Stringer.
func (*TestString) TypeID ¶ added in v0.21.0
func (t *TestString) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TestString) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TestVectorBytes) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TestVectorBytes) GetValue ¶ added in v0.21.0
func (t *TestVectorBytes) GetValue() (value [][]byte)
GetValue returns value of Value field.
func (*TestVectorBytes) String ¶ added in v0.12.0
func (t *TestVectorBytes) String() string
String implements fmt.Stringer.
func (*TestVectorBytes) TypeID ¶ added in v0.21.0
func (t *TestVectorBytes) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TestVectorBytes) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TestVectorInt) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TestVectorInt) GetValue ¶ added in v0.21.0
func (t *TestVectorInt) GetValue() (value []int32)
GetValue returns value of Value field.
func (*TestVectorInt) String ¶ added in v0.12.0
func (t *TestVectorInt) String() string
String implements fmt.Stringer.
func (*TestVectorInt) TypeID ¶ added in v0.21.0
func (t *TestVectorInt) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TestVectorInt) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TestVectorIntObject) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TestVectorIntObject) GetValue ¶ added in v0.21.0
func (t *TestVectorIntObject) GetValue() (value []TestInt)
GetValue returns value of Value field.
func (*TestVectorIntObject) String ¶ added in v0.12.0
func (t *TestVectorIntObject) String() string
String implements fmt.Stringer.
func (*TestVectorIntObject) TypeID ¶ added in v0.21.0
func (t *TestVectorIntObject) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TestVectorIntObject) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TestVectorString) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TestVectorString) GetValue ¶ added in v0.21.0
func (t *TestVectorString) GetValue() (value []string)
GetValue returns value of Value field.
func (*TestVectorString) String ¶ added in v0.12.0
func (t *TestVectorString) String() string
String implements fmt.Stringer.
func (*TestVectorString) TypeID ¶ added in v0.21.0
func (t *TestVectorString) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TestVectorString) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TestVectorStringObject) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TestVectorStringObject) GetValue ¶ added in v0.21.0
func (t *TestVectorStringObject) GetValue() (value []TestString)
GetValue returns value of Value field.
func (*TestVectorStringObject) String ¶ added in v0.12.0
func (t *TestVectorStringObject) String() string
String implements fmt.Stringer.
func (*TestVectorStringObject) TypeID ¶ added in v0.21.0
func (t *TestVectorStringObject) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TestVectorStringObject) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TestVectorVector) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TestVectorVector) GetValue ¶ added in v0.21.0
func (t *TestVectorVector) GetValue() (value [][]string)
GetValue returns value of Value field.
func (*TestVectorVector) String ¶ added in v0.12.0
func (t *TestVectorVector) String() string
String implements fmt.Stringer.
func (*TestVectorVector) TypeID ¶ added in v0.21.0
func (t *TestVectorVector) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TestVectorVector) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TextEntities) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntities) GetEntities ¶ added in v0.21.0
func (t *TextEntities) GetEntities() (value []TextEntity)
GetEntities returns value of Entities field.
func (*TextEntities) String ¶ added in v0.12.0
func (t *TextEntities) String() string
String implements fmt.Stringer.
func (*TextEntities) TypeID ¶ added in v0.21.0
func (t *TextEntities) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntities) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TextEntity) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntity) GetLength ¶ added in v0.21.0
func (t *TextEntity) GetLength() (value int32)
GetLength returns value of Length field.
func (*TextEntity) GetOffset ¶ added in v0.21.0
func (t *TextEntity) GetOffset() (value int32)
GetOffset returns value of Offset field.
func (*TextEntity) GetType ¶ added in v0.21.0
func (t *TextEntity) GetType() (value TextEntityTypeClass)
GetType returns value of Type field.
func (*TextEntity) String ¶ added in v0.12.0
func (t *TextEntity) String() string
String implements fmt.Stringer.
func (*TextEntity) TypeID ¶ added in v0.21.0
func (t *TextEntity) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntity) Zero ¶ added in v0.20.0
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 ¶
func (t *TextEntityTypeBankCardNumber) Decode(b *bin.Buffer) error
Decode implements bin.Decoder.
func (*TextEntityTypeBankCardNumber) Encode ¶
func (t *TextEntityTypeBankCardNumber) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeBankCardNumber) String ¶ added in v0.12.0
func (t *TextEntityTypeBankCardNumber) String() string
String implements fmt.Stringer.
func (*TextEntityTypeBankCardNumber) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeBankCardNumber) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeBankCardNumber) Zero ¶ added in v0.20.0
func (t *TextEntityTypeBankCardNumber) Zero() bool
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) Encode ¶
func (t *TextEntityTypeBold) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeBold) String ¶ added in v0.12.0
func (t *TextEntityTypeBold) String() string
String implements fmt.Stringer.
func (*TextEntityTypeBold) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeBold) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeBold) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TextEntityTypeBotCommand) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeBotCommand) String ¶ added in v0.12.0
func (t *TextEntityTypeBotCommand) String() string
String implements fmt.Stringer.
func (*TextEntityTypeBotCommand) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeBotCommand) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeBotCommand) Zero ¶ added in v0.20.0
func (t *TextEntityTypeBotCommand) Zero() bool
type TextEntityTypeBox ¶
type TextEntityTypeBox struct {
TextEntityType TextEntityTypeClass
}
TextEntityType boxes the TextEntityTypeClass providing a helper.
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) Encode ¶
func (t *TextEntityTypeCashtag) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeCashtag) String ¶ added in v0.12.0
func (t *TextEntityTypeCashtag) String() string
String implements fmt.Stringer.
func (*TextEntityTypeCashtag) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeCashtag) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeCashtag) Zero ¶ added in v0.20.0
func (t *TextEntityTypeCashtag) Zero() bool
type TextEntityTypeClass ¶
type TextEntityTypeClass interface {
bin.Encoder
bin.Decoder
// TypeID returns MTProto type id (CRC code).
// See https://core.telegram.org/mtproto/TL-tl#remarks.
TypeID() uint32
// 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 := DecodeTextEntityType(buf)
if err != nil {
panic(err)
}
switch v := g.(type) {
case *TextEntityTypeMention: // textEntityTypeMention#37b3df65
case *TextEntityTypeHashtag: // textEntityTypeHashtag#c2f7a2dd
case *TextEntityTypeCashtag: // textEntityTypeCashtag#48e4374b
case *TextEntityTypeBotCommand: // textEntityTypeBotCommand#bb652bb3
case *TextEntityTypeUrl: // textEntityTypeUrl#b1c0d47c
case *TextEntityTypeEmailAddress: // textEntityTypeEmailAddress#54f81821
case *TextEntityTypePhoneNumber: // textEntityTypePhoneNumber#bad9aa2a
case *TextEntityTypeBankCardNumber: // textEntityTypeBankCardNumber#6513910
case *TextEntityTypeBold: // textEntityTypeBold#bcc0e1b0
case *TextEntityTypeItalic: // textEntityTypeItalic#f8f3965d
case *TextEntityTypeUnderline: // textEntityTypeUnderline#2f39cf92
case *TextEntityTypeStrikethrough: // textEntityTypeStrikethrough#394fc4fa
case *TextEntityTypeCode: // textEntityTypeCode#c5e9c94a
case *TextEntityTypePre: // textEntityTypePre#62491c8e
case *TextEntityTypePreCode: // textEntityTypePreCode#c7a77aab
case *TextEntityTypeTextUrl: // textEntityTypeTextUrl#1a912463
case *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) Encode ¶
func (t *TextEntityTypeCode) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeCode) String ¶ added in v0.12.0
func (t *TextEntityTypeCode) String() string
String implements fmt.Stringer.
func (*TextEntityTypeCode) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeCode) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeCode) Zero ¶ added in v0.20.0
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 ¶
func (t *TextEntityTypeEmailAddress) Decode(b *bin.Buffer) error
Decode implements bin.Decoder.
func (*TextEntityTypeEmailAddress) Encode ¶
func (t *TextEntityTypeEmailAddress) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeEmailAddress) String ¶ added in v0.12.0
func (t *TextEntityTypeEmailAddress) String() string
String implements fmt.Stringer.
func (*TextEntityTypeEmailAddress) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeEmailAddress) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeEmailAddress) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TextEntityTypeHashtag) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeHashtag) String ¶ added in v0.12.0
func (t *TextEntityTypeHashtag) String() string
String implements fmt.Stringer.
func (*TextEntityTypeHashtag) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeHashtag) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeHashtag) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TextEntityTypeItalic) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeItalic) String ¶ added in v0.12.0
func (t *TextEntityTypeItalic) String() string
String implements fmt.Stringer.
func (*TextEntityTypeItalic) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeItalic) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeItalic) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TextEntityTypeMention) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeMention) String ¶ added in v0.12.0
func (t *TextEntityTypeMention) String() string
String implements fmt.Stringer.
func (*TextEntityTypeMention) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeMention) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeMention) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TextEntityTypeMentionName) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeMentionName) GetUserID ¶ added in v0.21.0
func (t *TextEntityTypeMentionName) GetUserID() (value int32)
GetUserID returns value of UserID field.
func (*TextEntityTypeMentionName) String ¶ added in v0.12.0
func (t *TextEntityTypeMentionName) String() string
String implements fmt.Stringer.
func (*TextEntityTypeMentionName) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeMentionName) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeMentionName) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TextEntityTypePhoneNumber) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypePhoneNumber) String ¶ added in v0.12.0
func (t *TextEntityTypePhoneNumber) String() string
String implements fmt.Stringer.
func (*TextEntityTypePhoneNumber) TypeID ¶ added in v0.21.0
func (t *TextEntityTypePhoneNumber) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypePhoneNumber) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TextEntityTypePre) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypePre) String ¶ added in v0.12.0
func (t *TextEntityTypePre) String() string
String implements fmt.Stringer.
func (*TextEntityTypePre) TypeID ¶ added in v0.21.0
func (t *TextEntityTypePre) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypePre) Zero ¶ added in v0.20.0
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) Encode ¶
func (t *TextEntityTypePreCode) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypePreCode) GetLanguage ¶ added in v0.21.0
func (t *TextEntityTypePreCode) GetLanguage() (value string)
GetLanguage returns value of Language field.
func (*TextEntityTypePreCode) String ¶ added in v0.12.0
func (t *TextEntityTypePreCode) String() string
String implements fmt.Stringer.
func (*TextEntityTypePreCode) TypeID ¶ added in v0.21.0
func (t *TextEntityTypePreCode) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypePreCode) Zero ¶ added in v0.20.0
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 ¶
func (t *TextEntityTypeStrikethrough) Decode(b *bin.Buffer) error
Decode implements bin.Decoder.
func (*TextEntityTypeStrikethrough) Encode ¶
func (t *TextEntityTypeStrikethrough) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeStrikethrough) String ¶ added in v0.12.0
func (t *TextEntityTypeStrikethrough) String() string
String implements fmt.Stringer.
func (*TextEntityTypeStrikethrough) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeStrikethrough) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeStrikethrough) Zero ¶ added in v0.20.0
func (t *TextEntityTypeStrikethrough) Zero() bool
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) Encode ¶
func (t *TextEntityTypeTextUrl) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeTextUrl) GetURL ¶ added in v0.21.0
func (t *TextEntityTypeTextUrl) GetURL() (value string)
GetURL returns value of URL field.
func (*TextEntityTypeTextUrl) String ¶ added in v0.12.0
func (t *TextEntityTypeTextUrl) String() string
String implements fmt.Stringer.
func (*TextEntityTypeTextUrl) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeTextUrl) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeTextUrl) Zero ¶ added in v0.20.0
func (t *TextEntityTypeTextUrl) 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) Encode ¶
func (t *TextEntityTypeUnderline) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeUnderline) String ¶ added in v0.12.0
func (t *TextEntityTypeUnderline) String() string
String implements fmt.Stringer.
func (*TextEntityTypeUnderline) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeUnderline) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeUnderline) Zero ¶ added in v0.20.0
func (t *TextEntityTypeUnderline) 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) Encode ¶
func (t *TextEntityTypeUrl) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*TextEntityTypeUrl) String ¶ added in v0.12.0
func (t *TextEntityTypeUrl) String() string
String implements fmt.Stringer.
func (*TextEntityTypeUrl) TypeID ¶ added in v0.21.0
func (t *TextEntityTypeUrl) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*TextEntityTypeUrl) Zero ¶ added in v0.20.0
func (t *TextEntityTypeUrl) 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) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
type True ¶
type True struct {
}
True represents TL type `true#997275b5`.
See https://localhost:80/doc/constructor/true for reference.
func (*True) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
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) GetMsg ¶ added in v0.21.0
func (u *Update) GetMsg() (value AbstractMessageClass)
GetMsg returns value of Msg field.
func (*Update) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
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) TypeID ¶ added in v0.21.0
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
type UserAuthBox ¶
type UserAuthBox struct {
Auth UserAuthClass
}
UserAuth boxes the UserAuthClass providing a helper.
type UserAuthClass ¶
type UserAuthClass interface {
bin.Encoder
bin.Decoder
// TypeID returns MTProto type id (CRC code).
// See https://core.telegram.org/mtproto/TL-tl#remarks.
TypeID() uint32
// 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 := DecodeUserAuth(buf)
if err != nil {
panic(err)
}
switch v := g.(type) {
case *UserAuth: // user.auth#f4815592
case *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) Encode ¶
func (a *UserAuthPassword) Encode(b *bin.Buffer) error
Encode implements bin.Encoder.
func (*UserAuthPassword) GetPwd ¶ added in v0.21.0
func (a *UserAuthPassword) GetPwd() (value string)
GetPwd returns value of Pwd field.
func (*UserAuthPassword) String ¶ added in v0.12.0
func (a *UserAuthPassword) String() string
String implements fmt.Stringer.
func (*UserAuthPassword) TypeID ¶ added in v0.21.0
func (a *UserAuthPassword) TypeID() uint32
TypeID returns MTProto type id (CRC code). See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*UserAuthPassword) Zero ¶ added in v0.20.0
func (a *UserAuthPassword) Zero() bool
Source Files
¶
- example.go
- tl_abstract_message_gen.go
- tl_account_themes_gen.go
- tl_auth_gen.go
- tl_bool_gen.go
- tl_bytes_gen.go
- tl_client_d_h_inner_data_gen.go
- tl_client_gen.go
- tl_config_gen.go
- tl_dc_option_gen.go
- tl_do_auth_gen.go
- tl_echo_vector_gen.go
- tl_error_gen.go
- tl_get_updates_resp_gen.go
- tl_int32_gen.go
- tl_int_vector_gen.go
- tl_invoke_with_layer_gen.go
- tl_message_gen.go
- tl_ok_gen.go
- tl_ping_gen.go
- tl_registry_gen.go
- tl_response_gen.go
- tl_send_gen.go
- tl_send_multiple_sms_gen.go
- tl_sms_gen.go
- tl_string_gen.go
- tl_test_bytes_gen.go
- tl_test_int_gen.go
- tl_test_string_gen.go
- tl_test_vector_bytes_gen.go
- tl_test_vector_int_gen.go
- tl_test_vector_int_object_gen.go
- tl_test_vector_string_gen.go
- tl_test_vector_string_object_gen.go
- tl_test_vector_vector_gen.go
- tl_text_entities_gen.go
- tl_text_entity_gen.go
- tl_text_entity_type_gen.go
- tl_theme_gen.go
- tl_update_gen.go
- tl_user_auth_gen.go