bot

package
v0.0.0-...-7131cb1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notification

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

func NewNotification

func NewNotification(telegram *Telegram, subscriptions *db.Subscriptions, nodes *db.Persistence) *Notification

func (*Notification) Notify

func (n *Notification) Notify(node db.Node, failed []string, recovered []string)

type Ntfy

type Ntfy struct {
}

func (*Ntfy) Send

func (n *Ntfy) Send(destination string, msg string) error

type Robot

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

func NewRobot

func NewRobot(nodes *db.Persistence, subscriptions *db.Subscriptions) *Robot

func (*Robot) Handle

func (r *Robot) Handle(targetType int, target string, message string) (string, error)

type Telegram

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

func NewTelegram

func NewTelegram(token string, robot *Robot) (*Telegram, error)

func (*Telegram) Run

func (t *Telegram) Run() error

func (*Telegram) Send

func (t *Telegram) Send(target string, msg string) error

Jump to

Keyboard shortcuts

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