mt

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

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 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 MsgsAckTypeID = 0x62d6b459

MsgsAckTypeID is TL type id of MsgsAck.

View Source
const NewSessionCreatedTypeID = 0x9ec20908

NewSessionCreatedTypeID is TL type id of NewSessionCreated.

View Source
const PQInnerDataConstTypeID = 0x83c95aec

PQInnerDataConstTypeID is TL type id of PQInnerDataConst.

View Source
const PQInnerDataTempTypeID = 0x3c6a84d4

PQInnerDataTempTypeID is TL type id of PQInnerDataTemp.

View Source
const PongTypeID = 0x347773c5

PongTypeID is TL type id of Pong.

View Source
const RPCErrorTypeID = 0x2144ca19

RPCErrorTypeID is TL type id of RPCError.

View Source
const ReqDHParamsTypeID = 0xd712e4be

ReqDHParamsTypeID is TL type id of ReqDHParams.

View Source
const ReqPqMultiTypeID = 0xbe7e8ef1

ReqPqMultiTypeID is TL type id of ReqPqMulti.

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 SetClientDHParamsTypeID = 0xf5045f1f

SetClientDHParamsTypeID is TL type id of SetClientDHParams.

Variables

This section is empty.

Functions

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.

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.

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

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.

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.

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.

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.

type Invoker

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

Invoker can invoke raw MTProto rpc calls.

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.

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.

type PQInnerDataBox

type PQInnerDataBox struct {
	P_Q_inner_data PQInnerDataClass
}

PQInnerData boxes the PQInnerDataClass providing a helper.

func (*PQInnerDataBox) Decode

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

Decode implements bin.Decoder for PQInnerDataBox.

func (*PQInnerDataBox) Encode

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

Encode implements bin.Encode for PQInnerDataBox.

type PQInnerDataClass

type PQInnerDataClass interface {
	bin.Encoder
	bin.Decoder
	// contains filtered or unexported methods
}

PQInnerDataClass represents P_Q_inner_data generic type.

Example:

g, err := DecodePQInnerData(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PQInnerDataConst: // p_q_inner_data_const#83c95aec
case *PQInnerDataTemp: // p_q_inner_data_temp#3c6a84d4
default: panic(v)
}

func DecodePQInnerData

func DecodePQInnerData(buf *bin.Buffer) (PQInnerDataClass, error)

DecodePQInnerData implements binary de-serialization for PQInnerDataClass.

type PQInnerDataConst

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

PQInnerDataConst represents TL type `p_q_inner_data_const#83c95aec`.

func (*PQInnerDataConst) Decode

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

Decode implements bin.Decoder.

func (*PQInnerDataConst) Encode

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

Encode implements bin.Encoder.

type PQInnerDataTemp

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

PQInnerDataTemp represents TL type `p_q_inner_data_temp#3c6a84d4`.

func (*PQInnerDataTemp) Decode

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

Decode implements bin.Decoder.

func (*PQInnerDataTemp) Encode

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

Encode implements bin.Encoder.

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.

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.

type ReqDHParams

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

ReqDHParams represents TL type `req_DH_params#d712e4be`.

func (*ReqDHParams) Decode

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

Decode implements bin.Decoder.

func (*ReqDHParams) Encode

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

Encode implements bin.Encoder.

type ReqPqMulti

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

ReqPqMulti represents TL type `req_pq_multi#be7e8ef1`.

func (*ReqPqMulti) Decode

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

Decode implements bin.Decoder.

func (*ReqPqMulti) Encode

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

Encode implements bin.Encoder.

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.

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.

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
	// 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.

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.

type SetClientDHParams

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

SetClientDHParams represents TL type `set_client_DH_params#f5045f1f`.

func (*SetClientDHParams) Decode

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

Decode implements bin.Decoder.

func (*SetClientDHParams) Encode

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

Encode implements bin.Encoder.

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
	// 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.

Jump to

Keyboard shortcuts

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