Documentation ¶
Index ¶
- type Downloader
- func (d *Downloader) DownloadFileParts(file io.Writer, fileLocation mtproto.TL, dcID int32, ...) (*FilePartsResult, error)
- func (d *Downloader) DownloadFileToPath(fpath string, fileLocation mtproto.TL, dcID int32, size int64, ...) (*FilePartsResult, error)
- func (d *Downloader) ReqestFilePart(dcID int32, fileLocation mtproto.TL, offset, limit int64) chan *FileResponse
- func (d *Downloader) Start(tg *TGClient)
- func (d *Downloader) Stop() error
- type FilePartsResult
- type FileProgressHandler
- type FileResponse
- type NoopFileProgressHandler
- type TGClient
- func (c *TGClient) AuthAndInitEvents(authData mtproto.AuthDataProvider) error
- func (c *TGClient) AuthExt(authData mtproto.AuthDataProvider, message mtproto.TLReq) (mtproto.TL, error)
- func (c *TGClient) Disconnect() error
- func (e *TGClient) FindExtraChannel(channelID int64) *mtproto.TL_channel
- func (e *TGClient) FindExtraChat(chatID int64) *mtproto.TL_chat
- func (e *TGClient) FindExtraUser(userID int64) *mtproto.TL_user
- func (c *TGClient) InitAndConnect() error
- func (c *TGClient) SendSync(msg mtproto.TLReq) mtproto.TL
- func (c *TGClient) SendSyncRetry(msg mtproto.TLReq, failRetryInterval time.Duration, floodNumShortRetries int, ...) mtproto.TL
- func (c *TGClient) SetUpdateHandler(handleUpdate UpdateHandler)
- type UpdateHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func (*Downloader) DownloadFileParts ¶
func (d *Downloader) DownloadFileParts( file io.Writer, fileLocation mtproto.TL, dcID int32, size, partSize, offset int64, progressHnd FileProgressHandler, ) (*FilePartsResult, error)
func (*Downloader) DownloadFileToPath ¶
func (d *Downloader) DownloadFileToPath( fpath string, fileLocation mtproto.TL, dcID int32, size int64, progressHnd FileProgressHandler, ) (*FilePartsResult, error)
func (*Downloader) ReqestFilePart ¶
func (d *Downloader) ReqestFilePart(dcID int32, fileLocation mtproto.TL, offset, limit int64) chan *FileResponse
func (*Downloader) Start ¶
func (d *Downloader) Start(tg *TGClient)
func (*Downloader) Stop ¶
func (d *Downloader) Stop() error
type FilePartsResult ¶
type FileProgressHandler ¶
type FileResponse ¶
type NoopFileProgressHandler ¶
type NoopFileProgressHandler struct{}
func (NoopFileProgressHandler) OnProgress ¶
func (h NoopFileProgressHandler) OnProgress(fileLocation mtproto.TL, offset, size int64)
type TGClient ¶
type TGClient struct { Downloader // contains filtered or unexported fields }
func NewTGClient ¶
func NewTGClient(appID int32, appHash string, logHnd mtproto.LogHandler) *TGClient
func NewTGClientExt ¶
func NewTGClientExt(cfg *mtproto.AppConfig, sessStore mtproto.SessionStore, logHnd mtproto.LogHandler, daler proxy.Dialer) *TGClient
func (*TGClient) AuthAndInitEvents ¶
func (c *TGClient) AuthAndInitEvents(authData mtproto.AuthDataProvider) error
func (*TGClient) Disconnect ¶
func (*TGClient) FindExtraChannel ¶
func (e *TGClient) FindExtraChannel(channelID int64) *mtproto.TL_channel
func (*TGClient) FindExtraChat ¶
func (*TGClient) FindExtraUser ¶
func (*TGClient) InitAndConnect ¶
func (*TGClient) SendSyncRetry ¶
func (*TGClient) SetUpdateHandler ¶
func (c *TGClient) SetUpdateHandler(handleUpdate UpdateHandler)
type UpdateHandler ¶
Click to show internal directories.
Click to hide internal directories.