telegram

package
v0.0.0-...-e86f03a Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: MIT Imports: 3 Imported by: 0

README

Telegram

官方网站

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNotifier

func NewNotifier(opts ...Option) notifier.Notifier

Types

type Notifier

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

Notifier Telegram客户端

func (*Notifier) Send

func (c *Notifier) Send(_ context.Context, _, content string) error

Send 发送聊天消息

type Option

type Option func(o *Notifier)

func BotToken

func BotToken(token string) Option

BotToken Telegram授权Token

func ChatId

func ChatId(id int64) Option

ChatId Telegram聊天ID

func Debug

func Debug(debug bool) Option

func Logger

func Logger(logger notifier.Logger) Option

Logger 日志记录器

Jump to

Keyboard shortcuts

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