mt

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package mt contains generated code based on mtproto schema.

See https://core.telegram.org/schema/mtproto for reference. Some types are implemented manually in "proto" package.

Index

Constants

View Source
const BadMsgNotificationTypeID = 0xa7eff811

BadMsgNotificationTypeID is TL type id of BadMsgNotification.

View Source
const BadServerSaltTypeID = 0xedab447b

BadServerSaltTypeID is TL type id of BadServerSalt.

View Source
const ClientDHInnerDataTypeID = 0x6643b654

ClientDHInnerDataTypeID is TL type id of ClientDHInnerData.

View Source
const DestroySessionNoneTypeID = 0x62d350c9

DestroySessionNoneTypeID is TL type id of DestroySessionNone.

View Source
const DestroySessionOkTypeID = 0xe22045fc

DestroySessionOkTypeID is TL type id of DestroySessionOk.

View Source
const DestroySessionRequestTypeID = 0xe7512126

DestroySessionRequestTypeID is TL type id of DestroySessionRequest.

View Source
const DhGenFailTypeID = 0xa69dae02

DhGenFailTypeID is TL type id of DhGenFail.

View Source
const DhGenOkTypeID = 0x3bcbf734

DhGenOkTypeID is TL type id of DhGenOk.

View Source
const DhGenRetryTypeID = 0x46dc1fb9

DhGenRetryTypeID is TL type id of DhGenRetry.

View Source
const FutureSaltTypeID = 0x949d9dc

FutureSaltTypeID is TL type id of FutureSalt.

View Source
const FutureSaltsTypeID = 0xae500895

FutureSaltsTypeID is TL type id of FutureSalts.

View Source
const GetFutureSaltsRequestTypeID = 0xb921bd04

GetFutureSaltsRequestTypeID is TL type id of GetFutureSaltsRequest.

View Source
const GzipPackedTypeID = 0x3072cfa1

GzipPackedTypeID is TL type id of GzipPacked.

View Source
const HTTPWaitRequestTypeID = 0x9299359f

HTTPWaitRequestTypeID is TL type id of HTTPWaitRequest.

View Source
const MessageTypeID = 0x5bb8e511

MessageTypeID is TL type id of Message.

View Source
const MsgCopyTypeID = 0xe06046b2

MsgCopyTypeID is TL type id of MsgCopy.

View Source
const MsgDetailedInfoTypeID = 0x276d3ec6

MsgDetailedInfoTypeID is TL type id of MsgDetailedInfo.

View Source
const MsgNewDetailedInfoTypeID = 0x809db6df

MsgNewDetailedInfoTypeID is TL type id of MsgNewDetailedInfo.

View Source
const MsgResendReqTypeID = 0x7d861a08

MsgResendReqTypeID is TL type id of MsgResendReq.

View Source
const MsgsAckTypeID = 0x62d6b459

MsgsAckTypeID is TL type id of MsgsAck.

View Source
const MsgsAllInfoTypeID = 0x8cc0d131

MsgsAllInfoTypeID is TL type id of MsgsAllInfo.

View Source
const MsgsStateInfoTypeID = 0x4deb57d

MsgsStateInfoTypeID is TL type id of MsgsStateInfo.

View Source
const MsgsStateReqTypeID = 0xda69fb52

MsgsStateReqTypeID is TL type id of MsgsStateReq.

View Source
const NewSessionCreatedTypeID = 0x9ec20908

NewSessionCreatedTypeID is TL type id of NewSessionCreated.

View Source
const PQInnerDataTypeID = 0x83c95aec

PQInnerDataTypeID is TL type id of PQInnerData.

View Source
const PingDelayDisconnectRequestTypeID = 0xf3427b8c

PingDelayDisconnectRequestTypeID is TL type id of PingDelayDisconnectRequest.

View Source
const PingRequestTypeID = 0x7abe77ec

PingRequestTypeID is TL type id of PingRequest.

View Source
const PongTypeID = 0x347773c5

PongTypeID is TL type id of Pong.

View Source
const RPCAnswerDroppedRunningTypeID = 0xcd78e586

RPCAnswerDroppedRunningTypeID is TL type id of RPCAnswerDroppedRunning.

View Source
const RPCAnswerDroppedTypeID = 0xa43ad8b7

RPCAnswerDroppedTypeID is TL type id of RPCAnswerDropped.

View Source
const RPCAnswerUnknownTypeID = 0x5e2ad36e

RPCAnswerUnknownTypeID is TL type id of RPCAnswerUnknown.

View Source
const RPCDropAnswerRequestTypeID = 0x58e4a740

RPCDropAnswerRequestTypeID is TL type id of RPCDropAnswerRequest.

View Source
const RPCErrorTypeID = 0x2144ca19

RPCErrorTypeID is TL type id of RPCError.

View Source
const RPCResultTypeID = 0xf35c6d01

RPCResultTypeID is TL type id of RPCResult.

View Source
const ReqDHParamsRequestTypeID = 0xd712e4be

ReqDHParamsRequestTypeID is TL type id of ReqDHParamsRequest.

View Source
const ReqPqMultiRequestTypeID = 0xbe7e8ef1

ReqPqMultiRequestTypeID is TL type id of ReqPqMultiRequest.

View Source
const ReqPqRequestTypeID = 0x60469778

ReqPqRequestTypeID is TL type id of ReqPqRequest.

View Source
const ResPQTypeID = 0x5162463

ResPQTypeID is TL type id of ResPQ.

View Source
const ServerDHInnerDataTypeID = 0xb5890dba

ServerDHInnerDataTypeID is TL type id of ServerDHInnerData.

View Source
const ServerDHParamsFailTypeID = 0x79cb045d

ServerDHParamsFailTypeID is TL type id of ServerDHParamsFail.

View Source
const ServerDHParamsOkTypeID = 0xd0e8075c

ServerDHParamsOkTypeID is TL type id of ServerDHParamsOk.

View Source
const SetClientDHParamsRequestTypeID = 0xf5045f1f

SetClientDHParamsRequestTypeID is TL type id of SetClientDHParamsRequest.

Variables

This section is empty.

Functions

func TypesConstructorMap added in v0.15.0

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

TypesConstructorMap maps type ids to constructors.

func TypesMap

func TypesMap() map[uint32]string

Types returns mapping from type ids to TL type names.

Types

type BadMsgNotification

type BadMsgNotification struct {
	// BadMsgID field of BadMsgNotification.
	BadMsgID int64
	// BadMsgSeqno field of BadMsgNotification.
	BadMsgSeqno int
	// ErrorCode field of BadMsgNotification.
	ErrorCode int
}

BadMsgNotification represents TL type `bad_msg_notification#a7eff811`.

func (*BadMsgNotification) Decode

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

Decode implements bin.Decoder.

func (*BadMsgNotification) Encode

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

Encode implements bin.Encoder.

func (*BadMsgNotification) String added in v0.12.0

func (b *BadMsgNotification) String() string

String implements fmt.Stringer.

type BadMsgNotificationBox added in v0.12.0

type BadMsgNotificationBox struct {
	BadMsgNotification BadMsgNotificationClass
}

BadMsgNotification boxes the BadMsgNotificationClass providing a helper.

func (*BadMsgNotificationBox) Decode added in v0.12.0

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

Decode implements bin.Decoder for BadMsgNotificationBox.

func (*BadMsgNotificationBox) Encode added in v0.12.0

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

Encode implements bin.Encode for BadMsgNotificationBox.

type BadMsgNotificationClass added in v0.12.0

type BadMsgNotificationClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

BadMsgNotificationClass represents BadMsgNotification generic type.

Example:

g, err := DecodeBadMsgNotification(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *BadMsgNotification: // bad_msg_notification#a7eff811
case *BadServerSalt: // bad_server_salt#edab447b
default: panic(v)
}

func DecodeBadMsgNotification added in v0.12.0

func DecodeBadMsgNotification(buf *bin.Buffer) (BadMsgNotificationClass, error)

DecodeBadMsgNotification implements binary de-serialization for BadMsgNotificationClass.

type BadServerSalt

type BadServerSalt struct {
	// BadMsgID field of BadServerSalt.
	BadMsgID int64
	// BadMsgSeqno field of BadServerSalt.
	BadMsgSeqno int
	// ErrorCode field of BadServerSalt.
	ErrorCode int
	// NewServerSalt field of BadServerSalt.
	NewServerSalt int64
}

BadServerSalt represents TL type `bad_server_salt#edab447b`.

func (*BadServerSalt) Decode

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

Decode implements bin.Decoder.

func (*BadServerSalt) Encode

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

Encode implements bin.Encoder.

func (*BadServerSalt) String added in v0.12.0

func (b *BadServerSalt) String() string

String implements fmt.Stringer.

type Client

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

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

func NewClient

func NewClient(invoker Invoker) *Client

func (*Client) DestroySession added in v0.12.0

func (c *Client) DestroySession(ctx context.Context, sessionid int64) (DestroySessionResClass, error)

DestroySession invokes method destroy_session#e7512126 returning error if any.

func (*Client) GetFutureSalts added in v0.12.0

func (c *Client) GetFutureSalts(ctx context.Context, num int) (*FutureSalts, error)

GetFutureSalts invokes method get_future_salts#b921bd04 returning error if any.

func (*Client) Ping added in v0.12.0

func (c *Client) Ping(ctx context.Context, pingid int64) (*Pong, error)

Ping invokes method ping#7abe77ec returning error if any.

func (*Client) PingDelayDisconnect added in v0.12.0

func (c *Client) PingDelayDisconnect(ctx context.Context, request *PingDelayDisconnectRequest) (*Pong, error)

PingDelayDisconnect invokes method ping_delay_disconnect#f3427b8c returning error if any.

func (*Client) RPCDropAnswer added in v0.12.0

func (c *Client) RPCDropAnswer(ctx context.Context, reqmsgid int64) (RpcDropAnswerClass, error)

RPCDropAnswer invokes method rpc_drop_answer#58e4a740 returning error if any.

func (*Client) ReqDHParams added in v0.12.0

func (c *Client) ReqDHParams(ctx context.Context, request *ReqDHParamsRequest) (ServerDHParamsClass, error)

ReqDHParams invokes method req_DH_params#d712e4be returning error if any.

func (*Client) ReqPq added in v0.12.0

func (c *Client) ReqPq(ctx context.Context, nonce bin.Int128) (*ResPQ, error)

ReqPq invokes method req_pq#60469778 returning error if any.

func (*Client) ReqPqMulti added in v0.12.0

func (c *Client) ReqPqMulti(ctx context.Context, nonce bin.Int128) (*ResPQ, error)

ReqPqMulti invokes method req_pq_multi#be7e8ef1 returning error if any.

func (*Client) SetClientDHParams added in v0.12.0

func (c *Client) SetClientDHParams(ctx context.Context, request *SetClientDHParamsRequest) (SetClientDHParamsAnswerClass, error)

SetClientDHParams invokes method set_client_DH_params#f5045f1f returning error if any.

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 []byte
}

ClientDHInnerData represents TL type `client_DH_inner_data#6643b654`.

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) String added in v0.12.0

func (c *ClientDHInnerData) String() string

String implements fmt.Stringer.

type DestroySessionNone added in v0.12.0

type DestroySessionNone struct {
	// SessionID field of DestroySessionNone.
	SessionID int64
}

DestroySessionNone represents TL type `destroy_session_none#62d350c9`.

func (*DestroySessionNone) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*DestroySessionNone) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*DestroySessionNone) String added in v0.12.0

func (d *DestroySessionNone) String() string

String implements fmt.Stringer.

type DestroySessionOk added in v0.12.0

type DestroySessionOk struct {
	// SessionID field of DestroySessionOk.
	SessionID int64
}

DestroySessionOk represents TL type `destroy_session_ok#e22045fc`.

func (*DestroySessionOk) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*DestroySessionOk) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*DestroySessionOk) String added in v0.12.0

func (d *DestroySessionOk) String() string

String implements fmt.Stringer.

type DestroySessionRequest added in v0.12.0

type DestroySessionRequest struct {
	// SessionID field of DestroySessionRequest.
	SessionID int64
}

DestroySessionRequest represents TL type `destroy_session#e7512126`.

func (*DestroySessionRequest) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*DestroySessionRequest) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*DestroySessionRequest) String added in v0.12.0

func (d *DestroySessionRequest) String() string

String implements fmt.Stringer.

type DestroySessionResBox added in v0.12.0

type DestroySessionResBox struct {
	DestroySessionRes DestroySessionResClass
}

DestroySessionRes boxes the DestroySessionResClass providing a helper.

func (*DestroySessionResBox) Decode added in v0.12.0

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

Decode implements bin.Decoder for DestroySessionResBox.

func (*DestroySessionResBox) Encode added in v0.12.0

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

Encode implements bin.Encode for DestroySessionResBox.

type DestroySessionResClass added in v0.12.0

type DestroySessionResClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

DestroySessionResClass represents DestroySessionRes generic type.

Example:

g, err := DecodeDestroySessionRes(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *DestroySessionOk: // destroy_session_ok#e22045fc
case *DestroySessionNone: // destroy_session_none#62d350c9
default: panic(v)
}

func DecodeDestroySessionRes added in v0.12.0

func DecodeDestroySessionRes(buf *bin.Buffer) (DestroySessionResClass, error)

DecodeDestroySessionRes implements binary de-serialization for DestroySessionResClass.

type DhGenFail

type DhGenFail struct {
	// Nonce field of DhGenFail.
	Nonce bin.Int128
	// ServerNonce field of DhGenFail.
	ServerNonce bin.Int128
	// NewNonceHash3 field of DhGenFail.
	NewNonceHash3 bin.Int128
}

DhGenFail represents TL type `dh_gen_fail#a69dae02`.

func (*DhGenFail) Decode

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

Decode implements bin.Decoder.

func (*DhGenFail) Encode

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

Encode implements bin.Encoder.

func (*DhGenFail) String added in v0.12.0

func (d *DhGenFail) String() string

String implements fmt.Stringer.

type DhGenOk

type DhGenOk struct {
	// Nonce field of DhGenOk.
	Nonce bin.Int128
	// ServerNonce field of DhGenOk.
	ServerNonce bin.Int128
	// NewNonceHash1 field of DhGenOk.
	NewNonceHash1 bin.Int128
}

DhGenOk represents TL type `dh_gen_ok#3bcbf734`.

func (*DhGenOk) Decode

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

Decode implements bin.Decoder.

func (*DhGenOk) Encode

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

Encode implements bin.Encoder.

func (*DhGenOk) String added in v0.12.0

func (d *DhGenOk) String() string

String implements fmt.Stringer.

type DhGenRetry

type DhGenRetry struct {
	// Nonce field of DhGenRetry.
	Nonce bin.Int128
	// ServerNonce field of DhGenRetry.
	ServerNonce bin.Int128
	// NewNonceHash2 field of DhGenRetry.
	NewNonceHash2 bin.Int128
}

DhGenRetry represents TL type `dh_gen_retry#46dc1fb9`.

func (*DhGenRetry) Decode

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

Decode implements bin.Decoder.

func (*DhGenRetry) Encode

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

Encode implements bin.Encoder.

func (*DhGenRetry) String added in v0.12.0

func (d *DhGenRetry) String() string

String implements fmt.Stringer.

type FutureSalt added in v0.12.0

type FutureSalt struct {
	// ValidSince field of FutureSalt.
	ValidSince int
	// ValidUntil field of FutureSalt.
	ValidUntil int
	// Salt field of FutureSalt.
	Salt int64
}

FutureSalt represents TL type `future_salt#949d9dc`.

func (*FutureSalt) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*FutureSalt) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*FutureSalt) String added in v0.12.0

func (f *FutureSalt) String() string

String implements fmt.Stringer.

type FutureSalts added in v0.12.0

type FutureSalts struct {
	// ReqMsgID field of FutureSalts.
	ReqMsgID int64
	// Now field of FutureSalts.
	Now int
	// Salts field of FutureSalts.
	Salts []FutureSalt
}

FutureSalts represents TL type `future_salts#ae500895`.

func (*FutureSalts) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*FutureSalts) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*FutureSalts) String added in v0.12.0

func (f *FutureSalts) String() string

String implements fmt.Stringer.

type GetFutureSaltsRequest added in v0.12.0

type GetFutureSaltsRequest struct {
	// Num field of GetFutureSaltsRequest.
	Num int
}

GetFutureSaltsRequest represents TL type `get_future_salts#b921bd04`.

func (*GetFutureSaltsRequest) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*GetFutureSaltsRequest) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*GetFutureSaltsRequest) String added in v0.12.0

func (g *GetFutureSaltsRequest) String() string

String implements fmt.Stringer.

type GzipPacked added in v0.12.0

type GzipPacked struct {
	// PackedData field of GzipPacked.
	PackedData []byte
}

GzipPacked represents TL type `gzip_packed#3072cfa1`.

func (*GzipPacked) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*GzipPacked) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*GzipPacked) String added in v0.12.0

func (g *GzipPacked) String() string

String implements fmt.Stringer.

type HTTPWaitRequest added in v0.12.0

type HTTPWaitRequest struct {
	// MaxDelay field of HTTPWaitRequest.
	MaxDelay int
	// WaitAfter field of HTTPWaitRequest.
	WaitAfter int
	// MaxWait field of HTTPWaitRequest.
	MaxWait int
}

HTTPWaitRequest represents TL type `http_wait#9299359f`.

func (*HTTPWaitRequest) Decode added in v0.12.0

func (h *HTTPWaitRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HTTPWaitRequest) Encode added in v0.12.0

func (h *HTTPWaitRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HTTPWaitRequest) String added in v0.12.0

func (h *HTTPWaitRequest) String() string

String implements fmt.Stringer.

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 added in v0.12.0

type Message struct {
	// MsgID field of Message.
	MsgID int64
	// Seqno field of Message.
	Seqno int
	// Bytes field of Message.
	Bytes int
	// Body field of Message.
	Body GzipPacked
}

Message represents TL type `message#5bb8e511`.

func (*Message) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*Message) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*Message) String added in v0.12.0

func (m *Message) String() string

String implements fmt.Stringer.

type MsgCopy added in v0.12.0

type MsgCopy struct {
	// OrigMessage field of MsgCopy.
	OrigMessage Message
}

MsgCopy represents TL type `msg_copy#e06046b2`.

func (*MsgCopy) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*MsgCopy) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*MsgCopy) String added in v0.12.0

func (m *MsgCopy) String() string

String implements fmt.Stringer.

type MsgDetailedInfo added in v0.12.0

type MsgDetailedInfo struct {
	// MsgID field of MsgDetailedInfo.
	MsgID int64
	// AnswerMsgID field of MsgDetailedInfo.
	AnswerMsgID int64
	// Bytes field of MsgDetailedInfo.
	Bytes int
	// Status field of MsgDetailedInfo.
	Status int
}

MsgDetailedInfo represents TL type `msg_detailed_info#276d3ec6`.

func (*MsgDetailedInfo) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*MsgDetailedInfo) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*MsgDetailedInfo) String added in v0.12.0

func (m *MsgDetailedInfo) String() string

String implements fmt.Stringer.

type MsgDetailedInfoBox added in v0.12.0

type MsgDetailedInfoBox struct {
	MsgDetailedInfo MsgDetailedInfoClass
}

MsgDetailedInfo boxes the MsgDetailedInfoClass providing a helper.

func (*MsgDetailedInfoBox) Decode added in v0.12.0

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

Decode implements bin.Decoder for MsgDetailedInfoBox.

func (*MsgDetailedInfoBox) Encode added in v0.12.0

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

Encode implements bin.Encode for MsgDetailedInfoBox.

type MsgDetailedInfoClass added in v0.12.0

type MsgDetailedInfoClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MsgDetailedInfoClass represents MsgDetailedInfo generic type.

Example:

g, err := DecodeMsgDetailedInfo(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MsgDetailedInfo: // msg_detailed_info#276d3ec6
case *MsgNewDetailedInfo: // msg_new_detailed_info#809db6df
default: panic(v)
}

func DecodeMsgDetailedInfo added in v0.12.0

func DecodeMsgDetailedInfo(buf *bin.Buffer) (MsgDetailedInfoClass, error)

DecodeMsgDetailedInfo implements binary de-serialization for MsgDetailedInfoClass.

type MsgNewDetailedInfo added in v0.12.0

type MsgNewDetailedInfo struct {
	// AnswerMsgID field of MsgNewDetailedInfo.
	AnswerMsgID int64
	// Bytes field of MsgNewDetailedInfo.
	Bytes int
	// Status field of MsgNewDetailedInfo.
	Status int
}

MsgNewDetailedInfo represents TL type `msg_new_detailed_info#809db6df`.

func (*MsgNewDetailedInfo) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*MsgNewDetailedInfo) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*MsgNewDetailedInfo) String added in v0.12.0

func (m *MsgNewDetailedInfo) String() string

String implements fmt.Stringer.

type MsgResendReq added in v0.12.0

type MsgResendReq struct {
	// MsgIds field of MsgResendReq.
	MsgIds []int64
}

MsgResendReq represents TL type `msg_resend_req#7d861a08`.

func (*MsgResendReq) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*MsgResendReq) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*MsgResendReq) String added in v0.12.0

func (m *MsgResendReq) String() string

String implements fmt.Stringer.

type MsgsAck

type MsgsAck struct {
	// MsgIds field of MsgsAck.
	MsgIds []int64
}

MsgsAck represents TL type `msgs_ack#62d6b459`.

func (*MsgsAck) Decode

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

Decode implements bin.Decoder.

func (*MsgsAck) Encode

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

Encode implements bin.Encoder.

func (*MsgsAck) String added in v0.12.0

func (m *MsgsAck) String() string

String implements fmt.Stringer.

type MsgsAllInfo added in v0.12.0

type MsgsAllInfo struct {
	// MsgIds field of MsgsAllInfo.
	MsgIds []int64
	// Info field of MsgsAllInfo.
	Info []byte
}

MsgsAllInfo represents TL type `msgs_all_info#8cc0d131`.

func (*MsgsAllInfo) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*MsgsAllInfo) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*MsgsAllInfo) String added in v0.12.0

func (m *MsgsAllInfo) String() string

String implements fmt.Stringer.

type MsgsStateInfo added in v0.12.0

type MsgsStateInfo struct {
	// ReqMsgID field of MsgsStateInfo.
	ReqMsgID int64
	// Info field of MsgsStateInfo.
	Info []byte
}

MsgsStateInfo represents TL type `msgs_state_info#4deb57d`.

func (*MsgsStateInfo) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*MsgsStateInfo) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*MsgsStateInfo) String added in v0.12.0

func (m *MsgsStateInfo) String() string

String implements fmt.Stringer.

type MsgsStateReq added in v0.12.0

type MsgsStateReq struct {
	// MsgIds field of MsgsStateReq.
	MsgIds []int64
}

MsgsStateReq represents TL type `msgs_state_req#da69fb52`.

func (*MsgsStateReq) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*MsgsStateReq) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*MsgsStateReq) String added in v0.12.0

func (m *MsgsStateReq) String() string

String implements fmt.Stringer.

type NewSessionCreated

type NewSessionCreated struct {
	// FirstMsgID field of NewSessionCreated.
	FirstMsgID int64
	// UniqueID field of NewSessionCreated.
	UniqueID int64
	// ServerSalt field of NewSessionCreated.
	ServerSalt int64
}

NewSessionCreated represents TL type `new_session_created#9ec20908`.

func (*NewSessionCreated) Decode

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

Decode implements bin.Decoder.

func (*NewSessionCreated) Encode

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

Encode implements bin.Encoder.

func (*NewSessionCreated) String added in v0.12.0

func (n *NewSessionCreated) String() string

String implements fmt.Stringer.

type PQInnerData added in v0.12.0

type PQInnerData struct {
	// Pq field of PQInnerData.
	Pq []byte
	// P field of PQInnerData.
	P []byte
	// Q field of PQInnerData.
	Q []byte
	// Nonce field of PQInnerData.
	Nonce bin.Int128
	// ServerNonce field of PQInnerData.
	ServerNonce bin.Int128
	// NewNonce field of PQInnerData.
	NewNonce bin.Int256
}

PQInnerData represents TL type `p_q_inner_data#83c95aec`.

func (*PQInnerData) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*PQInnerData) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*PQInnerData) String added in v0.12.0

func (p *PQInnerData) String() string

String implements fmt.Stringer.

type PingDelayDisconnectRequest added in v0.12.0

type PingDelayDisconnectRequest struct {
	// PingID field of PingDelayDisconnectRequest.
	PingID int64
	// DisconnectDelay field of PingDelayDisconnectRequest.
	DisconnectDelay int
}

PingDelayDisconnectRequest represents TL type `ping_delay_disconnect#f3427b8c`.

func (*PingDelayDisconnectRequest) Decode added in v0.12.0

Decode implements bin.Decoder.

func (*PingDelayDisconnectRequest) Encode added in v0.12.0

Encode implements bin.Encoder.

func (*PingDelayDisconnectRequest) String added in v0.12.0

func (p *PingDelayDisconnectRequest) String() string

String implements fmt.Stringer.

type PingRequest added in v0.12.0

type PingRequest struct {
	// PingID field of PingRequest.
	PingID int64
}

PingRequest represents TL type `ping#7abe77ec`.

func (*PingRequest) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*PingRequest) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*PingRequest) String added in v0.12.0

func (p *PingRequest) String() string

String implements fmt.Stringer.

type Pong

type Pong struct {
	// MsgID field of Pong.
	MsgID int64
	// PingID field of Pong.
	PingID int64
}

Pong represents TL type `pong#347773c5`.

func (*Pong) Decode

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

Decode implements bin.Decoder.

func (*Pong) Encode

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

Encode implements bin.Encoder.

func (*Pong) String added in v0.12.0

func (p *Pong) String() string

String implements fmt.Stringer.

type RPCAnswerDropped added in v0.12.0

type RPCAnswerDropped struct {
	// MsgID field of RPCAnswerDropped.
	MsgID int64
	// SeqNo field of RPCAnswerDropped.
	SeqNo int
	// Bytes field of RPCAnswerDropped.
	Bytes int
}

RPCAnswerDropped represents TL type `rpc_answer_dropped#a43ad8b7`.

func (*RPCAnswerDropped) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*RPCAnswerDropped) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*RPCAnswerDropped) String added in v0.12.0

func (r *RPCAnswerDropped) String() string

String implements fmt.Stringer.

type RPCAnswerDroppedRunning added in v0.12.0

type RPCAnswerDroppedRunning struct {
}

RPCAnswerDroppedRunning represents TL type `rpc_answer_dropped_running#cd78e586`.

func (*RPCAnswerDroppedRunning) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*RPCAnswerDroppedRunning) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*RPCAnswerDroppedRunning) String added in v0.12.0

func (r *RPCAnswerDroppedRunning) String() string

String implements fmt.Stringer.

type RPCAnswerUnknown added in v0.12.0

type RPCAnswerUnknown struct {
}

RPCAnswerUnknown represents TL type `rpc_answer_unknown#5e2ad36e`.

func (*RPCAnswerUnknown) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*RPCAnswerUnknown) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*RPCAnswerUnknown) String added in v0.12.0

func (r *RPCAnswerUnknown) String() string

String implements fmt.Stringer.

type RPCDropAnswerRequest added in v0.12.0

type RPCDropAnswerRequest struct {
	// ReqMsgID field of RPCDropAnswerRequest.
	ReqMsgID int64
}

RPCDropAnswerRequest represents TL type `rpc_drop_answer#58e4a740`.

func (*RPCDropAnswerRequest) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*RPCDropAnswerRequest) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*RPCDropAnswerRequest) String added in v0.12.0

func (r *RPCDropAnswerRequest) String() string

String implements fmt.Stringer.

type RPCError

type RPCError struct {
	// ErrorCode field of RPCError.
	ErrorCode int
	// ErrorMessage field of RPCError.
	ErrorMessage string
}

RPCError represents TL type `rpc_error#2144ca19`.

func (*RPCError) Decode

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

Decode implements bin.Decoder.

func (*RPCError) Encode

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

Encode implements bin.Encoder.

func (*RPCError) String added in v0.12.0

func (r *RPCError) String() string

String implements fmt.Stringer.

type RPCResult added in v0.12.0

type RPCResult struct {
	// ReqMsgID field of RPCResult.
	ReqMsgID int64
	// Result field of RPCResult.
	Result GzipPacked
}

RPCResult represents TL type `rpc_result#f35c6d01`.

func (*RPCResult) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*RPCResult) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*RPCResult) String added in v0.12.0

func (r *RPCResult) String() string

String implements fmt.Stringer.

type ReqDHParamsRequest added in v0.12.0

type ReqDHParamsRequest struct {
	// Nonce field of ReqDHParamsRequest.
	Nonce bin.Int128
	// ServerNonce field of ReqDHParamsRequest.
	ServerNonce bin.Int128
	// P field of ReqDHParamsRequest.
	P []byte
	// Q field of ReqDHParamsRequest.
	Q []byte
	// PublicKeyFingerprint field of ReqDHParamsRequest.
	PublicKeyFingerprint int64
	// EncryptedData field of ReqDHParamsRequest.
	EncryptedData []byte
}

ReqDHParamsRequest represents TL type `req_DH_params#d712e4be`.

func (*ReqDHParamsRequest) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*ReqDHParamsRequest) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*ReqDHParamsRequest) String added in v0.12.0

func (r *ReqDHParamsRequest) String() string

String implements fmt.Stringer.

type ReqPqMultiRequest added in v0.12.0

type ReqPqMultiRequest struct {
	// Nonce field of ReqPqMultiRequest.
	Nonce bin.Int128
}

ReqPqMultiRequest represents TL type `req_pq_multi#be7e8ef1`.

func (*ReqPqMultiRequest) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*ReqPqMultiRequest) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*ReqPqMultiRequest) String added in v0.12.0

func (r *ReqPqMultiRequest) String() string

String implements fmt.Stringer.

type ReqPqRequest added in v0.12.0

type ReqPqRequest struct {
	// Nonce field of ReqPqRequest.
	Nonce bin.Int128
}

ReqPqRequest represents TL type `req_pq#60469778`.

func (*ReqPqRequest) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*ReqPqRequest) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*ReqPqRequest) String added in v0.12.0

func (r *ReqPqRequest) String() string

String implements fmt.Stringer.

type ResPQ

type ResPQ struct {
	// Nonce field of ResPQ.
	Nonce bin.Int128
	// ServerNonce field of ResPQ.
	ServerNonce bin.Int128
	// Pq field of ResPQ.
	Pq []byte
	// ServerPublicKeyFingerprints field of ResPQ.
	ServerPublicKeyFingerprints []int64
}

ResPQ represents TL type `resPQ#5162463`.

func (*ResPQ) Decode

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

Decode implements bin.Decoder.

func (*ResPQ) Encode

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

Encode implements bin.Encoder.

func (*ResPQ) String added in v0.12.0

func (r *ResPQ) String() string

String implements fmt.Stringer.

type RpcDropAnswerBox added in v0.12.0

type RpcDropAnswerBox struct {
	RpcDropAnswer RpcDropAnswerClass
}

RpcDropAnswer boxes the RpcDropAnswerClass providing a helper.

func (*RpcDropAnswerBox) Decode added in v0.12.0

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

Decode implements bin.Decoder for RpcDropAnswerBox.

func (*RpcDropAnswerBox) Encode added in v0.12.0

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

Encode implements bin.Encode for RpcDropAnswerBox.

type RpcDropAnswerClass added in v0.12.0

type RpcDropAnswerClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

RpcDropAnswerClass represents RpcDropAnswer generic type.

Example:

g, err := DecodeRpcDropAnswer(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *RPCAnswerUnknown: // rpc_answer_unknown#5e2ad36e
case *RPCAnswerDroppedRunning: // rpc_answer_dropped_running#cd78e586
case *RPCAnswerDropped: // rpc_answer_dropped#a43ad8b7
default: panic(v)
}

func DecodeRpcDropAnswer added in v0.12.0

func DecodeRpcDropAnswer(buf *bin.Buffer) (RpcDropAnswerClass, error)

DecodeRpcDropAnswer implements binary de-serialization for RpcDropAnswerClass.

type ServerDHInnerData

type ServerDHInnerData struct {
	// Nonce field of ServerDHInnerData.
	Nonce bin.Int128
	// ServerNonce field of ServerDHInnerData.
	ServerNonce bin.Int128
	// G field of ServerDHInnerData.
	G int
	// DhPrime field of ServerDHInnerData.
	DhPrime []byte
	// GA field of ServerDHInnerData.
	GA []byte
	// ServerTime field of ServerDHInnerData.
	ServerTime int
}

ServerDHInnerData represents TL type `server_DH_inner_data#b5890dba`.

func (*ServerDHInnerData) Decode

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

Decode implements bin.Decoder.

func (*ServerDHInnerData) Encode

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

Encode implements bin.Encoder.

func (*ServerDHInnerData) String added in v0.12.0

func (s *ServerDHInnerData) String() string

String implements fmt.Stringer.

type ServerDHParamsBox

type ServerDHParamsBox struct {
	Server_DH_Params ServerDHParamsClass
}

ServerDHParams boxes the ServerDHParamsClass providing a helper.

func (*ServerDHParamsBox) Decode

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

Decode implements bin.Decoder for ServerDHParamsBox.

func (*ServerDHParamsBox) Encode

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

Encode implements bin.Encode for ServerDHParamsBox.

type ServerDHParamsClass

type ServerDHParamsClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ServerDHParamsClass represents Server_DH_Params generic type.

Example:

g, err := DecodeServerDHParams(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ServerDHParamsFail: // server_DH_params_fail#79cb045d
case *ServerDHParamsOk: // server_DH_params_ok#d0e8075c
default: panic(v)
}

func DecodeServerDHParams

func DecodeServerDHParams(buf *bin.Buffer) (ServerDHParamsClass, error)

DecodeServerDHParams implements binary de-serialization for ServerDHParamsClass.

type ServerDHParamsFail

type ServerDHParamsFail struct {
	// Nonce field of ServerDHParamsFail.
	Nonce bin.Int128
	// ServerNonce field of ServerDHParamsFail.
	ServerNonce bin.Int128
	// NewNonceHash field of ServerDHParamsFail.
	NewNonceHash bin.Int128
}

ServerDHParamsFail represents TL type `server_DH_params_fail#79cb045d`.

func (*ServerDHParamsFail) Decode

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

Decode implements bin.Decoder.

func (*ServerDHParamsFail) Encode

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

Encode implements bin.Encoder.

func (*ServerDHParamsFail) String added in v0.12.0

func (s *ServerDHParamsFail) String() string

String implements fmt.Stringer.

type ServerDHParamsOk

type ServerDHParamsOk struct {
	// Nonce field of ServerDHParamsOk.
	Nonce bin.Int128
	// ServerNonce field of ServerDHParamsOk.
	ServerNonce bin.Int128
	// EncryptedAnswer field of ServerDHParamsOk.
	EncryptedAnswer []byte
}

ServerDHParamsOk represents TL type `server_DH_params_ok#d0e8075c`.

func (*ServerDHParamsOk) Decode

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

Decode implements bin.Decoder.

func (*ServerDHParamsOk) Encode

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

Encode implements bin.Encoder.

func (*ServerDHParamsOk) String added in v0.12.0

func (s *ServerDHParamsOk) String() string

String implements fmt.Stringer.

type SetClientDHParamsAnswerBox

type SetClientDHParamsAnswerBox struct {
	Set_client_DH_params_answer SetClientDHParamsAnswerClass
}

SetClientDHParamsAnswer boxes the SetClientDHParamsAnswerClass providing a helper.

func (*SetClientDHParamsAnswerBox) Decode

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

Decode implements bin.Decoder for SetClientDHParamsAnswerBox.

func (*SetClientDHParamsAnswerBox) Encode

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

Encode implements bin.Encode for SetClientDHParamsAnswerBox.

type SetClientDHParamsAnswerClass

type SetClientDHParamsAnswerClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

SetClientDHParamsAnswerClass represents Set_client_DH_params_answer generic type.

Example:

g, err := DecodeSetClientDHParamsAnswer(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *DhGenOk: // dh_gen_ok#3bcbf734
case *DhGenRetry: // dh_gen_retry#46dc1fb9
case *DhGenFail: // dh_gen_fail#a69dae02
default: panic(v)
}

func DecodeSetClientDHParamsAnswer

func DecodeSetClientDHParamsAnswer(buf *bin.Buffer) (SetClientDHParamsAnswerClass, error)

DecodeSetClientDHParamsAnswer implements binary de-serialization for SetClientDHParamsAnswerClass.

type SetClientDHParamsRequest added in v0.12.0

type SetClientDHParamsRequest struct {
	// Nonce field of SetClientDHParamsRequest.
	Nonce bin.Int128
	// ServerNonce field of SetClientDHParamsRequest.
	ServerNonce bin.Int128
	// EncryptedData field of SetClientDHParamsRequest.
	EncryptedData []byte
}

SetClientDHParamsRequest represents TL type `set_client_DH_params#f5045f1f`.

func (*SetClientDHParamsRequest) Decode added in v0.12.0

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

Decode implements bin.Decoder.

func (*SetClientDHParamsRequest) Encode added in v0.12.0

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

Encode implements bin.Encoder.

func (*SetClientDHParamsRequest) String added in v0.12.0

func (s *SetClientDHParamsRequest) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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