Documentation ¶
Index ¶
- Variables
- func BuildCleanupMessage(count int64) string
- func BuildMessage(entry model.IEntry) string
- func BuildMsgFooter() string
- func BuildMsgHeader() string
- func CalculeSendInterval(count int) time.Duration
- type Resume
- type ResumeSource
- type SendCleanupNotifyOptions
- type SendFileOptions
- type SendResumeOptions
- type Serder
- type Story
- type TelegramOptions
- type TelegramSerder
- func (s TelegramSerder[T]) Send(ctx context.Context, entry T) error
- func (s TelegramSerder[T]) SendCleanupNotify(ctx context.Context, opt SendCleanupNotifyOptions) error
- func (s TelegramSerder[T]) SendCollection(ctx context.Context, entries []T) error
- func (s TelegramSerder[T]) SendFile(ctx context.Context, opt SendFileOptions) error
- func (s TelegramSerder[T]) SendResume(ctx context.Context, opt SendResumeOptions) error
- func (s TelegramSerder[T]) SendStory(ctx context.Context, story Story[T]) error
- func (s TelegramSerder[T]) WithChats(ids []int64) Serder[T]
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func BuildCleanupMessage ¶
func BuildMessage ¶
func BuildMsgFooter ¶
func BuildMsgFooter() string
func BuildMsgHeader ¶
func BuildMsgHeader() string
func CalculeSendInterval ¶
Types ¶
type Resume ¶
type Resume struct { Loaded int Filtered int Sources []ResumeSource }
type ResumeSource ¶
func (ResumeSource) HTML ¶
func (r ResumeSource) HTML() string
type SendCleanupNotifyOptions ¶
type SendCleanupNotifyOptions struct {
Count int64
}
type SendFileOptions ¶
type SendResumeOptions ¶
type Serder ¶
type Serder[T model.IEntry] interface { Send(ctx context.Context, entry T) error SendCollection(ctx context.Context, entry []T) error SendResume(ctx context.Context, opt SendResumeOptions) error SendCleanupNotify(ctx context.Context, opt SendCleanupNotifyOptions) error SendFile(ctx context.Context, opt SendFileOptions) error SendStory(ctx context.Context, story Story[T]) error WithChats(ids []int64) Serder[T] }
type TelegramOptions ¶
type TelegramSerder ¶
func NewTelegramSerder ¶
func NewTelegramSerder[T model.IEntry](bot *telebot.Bot, opts TelegramOptions[T]) TelegramSerder[T]
func (TelegramSerder[T]) SendCleanupNotify ¶
func (s TelegramSerder[T]) SendCleanupNotify(ctx context.Context, opt SendCleanupNotifyOptions) error
func (TelegramSerder[T]) SendCollection ¶
func (s TelegramSerder[T]) SendCollection(ctx context.Context, entries []T) error
func (TelegramSerder[T]) SendFile ¶
func (s TelegramSerder[T]) SendFile(ctx context.Context, opt SendFileOptions) error
func (TelegramSerder[T]) SendResume ¶
func (s TelegramSerder[T]) SendResume(ctx context.Context, opt SendResumeOptions) error
func (TelegramSerder[T]) SendStory ¶
func (s TelegramSerder[T]) SendStory(ctx context.Context, story Story[T]) error
func (TelegramSerder[T]) WithChats ¶
func (s TelegramSerder[T]) WithChats(ids []int64) Serder[T]
WithChats add chats to send messages.
Click to show internal directories.
Click to hide internal directories.