telegram

package
v0.5.21 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bold added in v0.5.15

func Bold(v any) string

func Italic added in v0.5.15

func Italic(v any) string

func Monospace added in v0.5.15

func Monospace(v any) string

func Ref added in v0.5.17

func Ref(v any, url string) string

Types

type AlertBot

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

func NewAlertBot

func NewAlertBot(token string, chatId string, version string) *AlertBot

func (*AlertBot) Send

func (o *AlertBot) Send(message string)

func (*AlertBot) SendLog

func (o *AlertBot) SendLog(m ulog.Message)

func (*AlertBot) Sendf added in v0.2.79

func (o *AlertBot) Sendf(f string, v ...any)

func (*AlertBot) Shutdown

func (o *AlertBot) Shutdown(ts time.Duration)

func (*AlertBot) Startup

func (o *AlertBot) Startup()

func (*AlertBot) WithPrePop

func (o *AlertBot) WithPrePop(prepop func(func() (string, bool)) (string, bool)) *AlertBot

type Limiter

type Limiter[T any] struct {
	// contains filtered or unexported fields
}

func NewLimiter

func NewLimiter[T any](send func(T)) *Limiter[T]

func (*Limiter[T]) Capacity added in v0.3.24

func (o *Limiter[T]) Capacity() int

func (*Limiter[T]) Close

func (o *Limiter[T]) Close()

func (*Limiter[T]) Push

func (o *Limiter[T]) Push(text T) bool

func (*Limiter[T]) Reset added in v0.3.28

func (o *Limiter[T]) Reset()

func (*Limiter[T]) Size added in v0.3.24

func (o *Limiter[T]) Size() int

func (*Limiter[T]) WithCapacity

func (o *Limiter[T]) WithCapacity(capacity int) *Limiter[T]

func (*Limiter[T]) WithInterval

func (o *Limiter[T]) WithInterval(interval time.Duration) *Limiter[T]

func (*Limiter[T]) WithPrePop

func (o *Limiter[T]) WithPrePop(prepop func(func() (T, bool)) (T, bool)) *Limiter[T]

Jump to

Keyboard shortcuts

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