package tdesktop

Import Path
	github.com/gotd/td/session/tdesktop (on go.dev)

Dependency Relation
	imports 21 packages, and imported by one package

Involved Source Files constant.go dbi.go errors.go file.go key_data.go local_key.go md5.go mtp_authorization.go mtp_config.go mtp_dcoptions.go Package tdesktop contains Telegram Desktop session decoder.
Package-Level Type Names (total 10, in which 7 are exported)
/* sort exporteds by: | */
Account is a Telegram user account representation in Telegram Desktop storage. Authorization contains Telegram user and MTProto sessions. Config contains Telegram config. IDx is an internal Telegram Desktop account ID. func Read(root string, passcode []byte) ([]Account, error) func ReadFS(root fs.FS, passcode []byte) ([]Account, error) func github.com/gotd/td/session.TDesktopSession(account Account) (*session.Data, error)
MTPAuthorization is a Telegram Desktop storage structure which stores MTProto session info. See https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/main/main_account.cpp#L359. Key is a map of keys per DC ID. // DC ID -> Key MainDC is a main DC ID of this user. UserID is a Telegram user ID.
MTPConfig is a Telegram Desktop storage structure which stores MTProto config info. See https://github.com/telegramdesktop/tdesktop/blob/v2.9.8/Telegram/SourceFiles/mtproto/mtproto_config.h. // default: false // default: 30000 // default: 10000 // default: 20000 // default: 90000 // default: 1024 // default: 86400 * 7 // default: 200 DCOptions MTPDCOptions // default: 172800 Environment MTPConfigEnvironment // default: 100 // default: "https://t.me/" // default: 10000 // default: 30000 // default: 1500 // default: 5000 // default: 30000 // default: 300000 // default: 1000 // default: 120000 // default: true // default: 5 // default: 100 // default: false // default: 172800 // default: 172800 // default: 200 // default: 5 // default: 30 // default: "" // default: 4
MTPConfigEnvironment is enum of config environment. String implements fmt.Stringer. Test denotes that environment is test. MTPConfigEnvironment : fmt.Stringer
MTPDCOption is a Telegram Desktop storage structure which stores DC info. See https://github.com/telegramdesktop/tdesktop/blob/v2.9.8/Telegram/SourceFiles/mtproto/mtproto_dc_options.h. Flags bin.Fields ID int32 IP string Port int32 Secret []byte CDN denotes that this is a CDN DC. IPv6 denotes that the specified IP is an IPv6 address. MediaOnly denotes that this DC should only be used to download or upload files. Static denotes that this IP should be used when connecting through a proxy. TCPOOnly denotes that this DC only supports connection with transport obfuscation.
MTPDCOptions is a Telegram Desktop storage structure which stores DCs info. See https://github.com/telegramdesktop/tdesktop/blob/v2.9.8/Telegram/SourceFiles/mtproto/mtproto_dc_options.cpp#L479. Options []MTPDCOption
WrongMagicError is returned when tdesktop data file has wrong magic header. Magic [4]byte Error implements error. *WrongMagicError : error
Package-Level Functions (total 18, in which 2 are exported)
Read reads accounts info from given Telegram Desktop tdata root. Shorthand for: ReadFS(os.DirFS(root), passcode)
ReadFS reads Telegram Desktop accounts info from given FS root.
Package-Level Variables (total 3, in which 2 are exported)
ErrKeyInfoDecrypt is returned when key data decrypt fails. It can happen if passed passcode is wrong.
ErrNoAccounts reports that decoded tdata does not contain any accounts info.
Package-Level Constants (total 78, none are exported)