telegram

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package telegram is the telegram notification package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotifyConfig

type NotifyConfig struct {
	base.DefaultNotify `yaml:",inline"`
	Token              string `yaml:"token" json:"token" jsonschema:"required,title=Telegram Bot Token,description=Telegram Bot Token"`
	ChatID             string `yaml:"chat_id" json:"chat_id" jsonschema:"required,title=Telegram Chat ID,description=Telegram Group ID or Channel ID"`
}

NotifyConfig is the telegram notification configuration

func (*NotifyConfig) Config

func (c *NotifyConfig) Config(gConf global.NotifySettings) error

Config configures the telegram configuration

func (*NotifyConfig) SendTelegram added in v1.3.0

func (c *NotifyConfig) SendTelegram(title, text string) error

SendTelegram is the wrapper for SendTelegramNotification

func (*NotifyConfig) SendTelegramNotification

func (c *NotifyConfig) SendTelegramNotification(text string) error

SendTelegramNotification will send the notification to telegram.

Jump to

Keyboard shortcuts

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