Documentation
¶
Overview ¶
Package mtgo is a Go client library for the Telegram MTProto API.
mtgo provides a full-featured implementation of MTProto 2.0, the protocol used by Telegram clients. It supports session management, transport layer abstraction (TCP, WebSocket, MTProxy), TL schema compilation, and a rich set of Telegram API helpers.
Key features:
- Full MTProto 2.0 implementation with encryption and key exchange
- Session management with multiple storage backends
- TL schema compiler and code generator
- Built-in support for MTProxy (obfuscated transport)
- Comprehensive Telegram type system
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
errgen
command
|
|
|
tlgen
command
|
|
|
compiler
|
|
|
examples
|
|
|
chatid_bot
command
|
|
|
download
command
|
|
|
e2e
command
|
|
|
echo_bot
command
|
|
|
export_session
command
|
|
|
handler_groups
command
|
|
|
import_session
command
|
|
|
import_tdata
command
|
|
|
keyboard_bot
command
|
|
|
mtproxy_bot
command
mtproxy_bot demonstrates connecting a Telegram bot through an MTProxy server.
|
mtproxy_bot demonstrates connecting a Telegram bot through an MTProxy server. |
|
send_media
command
|
|
|
upload
command
|
|
|
webapp_bot
command
|
|
|
internal
|
|
|
storage
Package storage defines interfaces and types used by the MTGO client to persist session data, peer cache entries, update state, and conversation state.
|
Package storage defines interfaces and types used by the MTGO client to persist session data, peer cache entries, update state, and conversation state. |
|
Package mtproxy implements MTProxy client support for connecting to Telegram through intermediate proxy servers.
|
Package mtproxy implements MTProxy client support for connecting to Telegram through intermediate proxy servers. |
|
tdesktop
Package tdesktop reads Telegram Desktop session data from a tdata directory.
|
Package tdesktop reads Telegram Desktop session data from a tdata directory. |
|
Package telegram provides a high-level Go client for the Telegram MTProto API.
|
Package telegram provides a high-level Go client for the Telegram MTProto API. |
|
fileid
Package fileid implements encoding and decoding of Telegram file_id strings.
|
Package fileid implements encoding and decoding of Telegram file_id strings. |
|
params
Package params defines option and parameter structs used to configure Telegram Bot API calls such as sending, editing, forwarding, copying, deleting, and pinning messages, as well as file upload/download progress.
|
Package params defines option and parameter structs used to configure Telegram Bot API calls such as sending, editing, forwarding, copying, deleting, and pinning messages, as well as file upload/download progress. |
|
parser
Package parser converts Telegram HTML and Markdown markup into plain text accompanied by MessageEntity slices suitable for the MTProto API.
|
Package parser converts Telegram HTML and Markdown markup into plain text accompanied by MessageEntity slices suitable for the MTProto API. |
|
types
Package types defines Telegram API domain types used throughout the mtgo framework.
|
Package types defines Telegram API domain types used throughout the mtgo framework. |
|
Package tg provides auto-generated Go types for the Telegram MTProto TL schema.
|
Package tg provides auto-generated Go types for the Telegram MTProto TL schema. |
|
e2e
Package e2e provides auto-generated Go types for the Telegram end-to-end encrypted (secret chat) TL schema.
|
Package e2e provides auto-generated Go types for the Telegram end-to-end encrypted (secret chat) TL schema. |
|
Package tgerr provides types and helpers for working with Telegram RPC errors, including typed error matching, flood-wait handling, and security-check assertions.
|
Package tgerr provides types and helpers for working with Telegram RPC errors, including typed error matching, flood-wait handling, and security-check assertions. |
Click to show internal directories.
Click to hide internal directories.