Versions in this module Expand all Collapse all v0 v0.0.2 Dec 7, 2022 v0.0.1 May 4, 2022 Changes in this version + var ErrAlreadyRunning = errors.New("already running asynchronously, stop the running instance first") + type Client struct + func New(appID int, appHash string, opts ...Option) (*Client, error) + func (c *Client) CreateChat(ctx context.Context, title string, userIDs ...int64) error + func (c *Client) DeleteMessages(ctx context.Context, dlg Entity, messages []messages.Elem) (int, error) + func (c *Client) GetChannels(ctx context.Context) ([]Entity, error) + func (c *Client) GetChats(ctx context.Context) ([]Entity, error) + func (c *Client) GetEntities(ctx context.Context, filterFn FilterFunc) ([]Entity, error) + func (c *Client) Run(ctx context.Context, fn func(context.Context, *telegram.Client) error) error + func (c *Client) SearchAllMessages(ctx context.Context, dlg Entity, who tg.InputPeerClass, cb func(n int)) ([]messages.Elem, error) + func (c *Client) SearchAllMyMessages(ctx context.Context, dlg Entity, cb func(n int)) ([]messages.Elem, error) + func (c *Client) Start(ctx context.Context) error + func (c *Client) Stop() error + type Entity interface + GetID func() int64 + GetTitle func() string + TypeInfo func() tdp.Type + Zero func() bool + type FilterFunc func(storage.Peer) (ent Entity, ok bool) + func FilterChannel() FilterFunc + func FilterChat() FilterFunc + type MemStorage struct + func NewMemStorage() *MemStorage + func (ms *MemStorage) Add(_ context.Context, value storage.Peer) error + func (ms *MemStorage) Assign(_ context.Context, key string, value storage.Peer) error + func (ms *MemStorage) Close() error + func (ms *MemStorage) Err() error + func (ms *MemStorage) Find(ctx context.Context, key storage.PeerKey) (storage.Peer, error) + func (ms *MemStorage) IsIterating() bool + func (ms *MemStorage) Iterate(ctx context.Context) (storage.PeerIterator, error) + func (ms *MemStorage) Next(ctx context.Context) bool + func (ms *MemStorage) Resolve(_ context.Context, key string) (storage.Peer, error) + func (ms *MemStorage) Value() storage.Peer + type Option func(c *Client) + func WithApiCredsFile(path string, passphrase []byte) Option + func WithAuth(flow authflow.FullAuthFlow) Option + func WithDebug(enable bool) Option + func WithMTPOptions(opts telegram.Options) Option + func WithPeerStorage(s storage.PeerStorage) Option + func WithStorage(path string) Option