Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTelegramConfig = TelegramConfig{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: true, }, DisableNotifications: false, Message: `{{ template "telegram.default.message" . }}`, ParseMode: "HTML", }
Functions ¶
This section is empty.
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier implements a Notifier for telegram notifications.
type TelegramConfig ¶ added in v0.34.0
type TelegramConfig struct {
amcommoncfg.NotifierConfig `yaml:",inline" json:",inline"`
HTTPConfig *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"`
APIUrl *amcommoncfg.URL `yaml:"api_url" json:"api_url,omitempty"`
BotToken commoncfg.Secret `yaml:"bot_token,omitempty" json:"token,omitempty"`
BotTokenFile string `yaml:"bot_token_file,omitempty" json:"token_file,omitempty"`
ChatID int64 `yaml:"chat_id,omitempty" json:"chat,omitempty"`
ChatIDFile string `yaml:"chat_id_file,omitempty" json:"chat_file,omitempty"`
MessageThreadID int `yaml:"message_thread_id,omitempty" json:"message_thread_id,omitempty"`
Message string `yaml:"message,omitempty" json:"message,omitempty"`
DisableNotifications bool `yaml:"disable_notifications,omitempty" json:"disable_notifications,omitempty"`
ParseMode string `yaml:"parse_mode,omitempty" json:"parse_mode,omitempty"`
}
TelegramConfig configures notifications via Telegram.
func (*TelegramConfig) UnmarshalYAML ¶ added in v0.34.0
func (c *TelegramConfig) UnmarshalYAML(unmarshal func(any) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.