telegram

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiID int, apiHash, sessionFile, botToken, proxyAddr string, log *zap.Logger) *Client

func (*Client) GetChatInfo

func (c *Client) GetChatInfo(ctx context.Context, chatID string) (domain.ChatInfo, error)

func (*Client) IterateMessages

func (c *Client) IterateMessages(ctx context.Context, chatID string, since time.Time, limit int) ([]domain.Message, error)

func (*Client) SendMessage

func (c *Client) SendMessage(ctx context.Context, chatID, text string) (int, error)

func (*Client) Start

func (c *Client) Start(ctx context.Context) error

func (*Client) Stop

func (c *Client) Stop(ctx context.Context) error

func (*Client) WaitReady

func (c *Client) WaitReady() <-chan struct{}

type ClientInterface

type ClientInterface interface {
	SendMessage(ctx context.Context, chatID string, text string) (int, error)
	GetChatInfo(ctx context.Context, chatID string) (domain.ChatInfo, error)
	IterateMessages(ctx context.Context, chatID string, since time.Time, limit int) ([]domain.Message, error)
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	WaitReady() <-chan struct{}
}

Jump to

Keyboard shortcuts

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