integration

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = map[string]Integration{
	"telegram": &Telegram{},
	"gotify":   &Gotify{},
}

Functions

func Flags

func Flags(cmd *cobra.Command) error

func Send

func Send(message string)

func Setup

func Setup() error

func TelegramTestSetup

func TelegramTestSetup() (err error)

Types

type Gotify

type Gotify struct {
	URL *url.URL
	// contains filtered or unexported fields
}

func (*Gotify) Flags

func (g *Gotify) Flags(cmd *cobra.Command) error

func (*Gotify) Login

func (g *Gotify) Login() error

func (*Gotify) Send

func (g *Gotify) Send(text string) error

func (*Gotify) Setup

func (g *Gotify) Setup() (err error)

type Integration

type Integration interface {
	Flags(*cobra.Command) error
	Setup() error
	Send(string) error
}

func Get

func Get(key string) Integration

type Telegram

type Telegram struct {
	ChatId int64
	Bot    *tgbotapi.BotAPI
}

func (*Telegram) Flags

func (t *Telegram) Flags(cmd *cobra.Command) error

func (*Telegram) Login

func (t *Telegram) Login(token string) (err error)

func (*Telegram) Send

func (t *Telegram) Send(message string) error

func (*Telegram) Setup

func (t *Telegram) Setup() error

Jump to

Keyboard shortcuts

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