telegram

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Telegram

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

func NewTelegram

func NewTelegram(cfg *TelegramConfig, updateChatId func(chatId int64)) (*Telegram, error)

func (*Telegram) SendMsg

func (c *Telegram) SendMsg(body string, channels []string) error

func (*Telegram) Stop

func (c *Telegram) Stop()

type TelegramConfig

type TelegramConfig struct {
	Token  string `json:"token"`
	ChatId *int64 `json:"chat_id"`
}

func NewTelegramConfig

func NewTelegramConfig(token string, chatId *int64) *TelegramConfig

Jump to

Keyboard shortcuts

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