matrix

package
v0.0.0-...-41daae6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendMessage

func SendMessage(client *mautrix.Client, channel string, webhook *types.GrafanaWebhook) error

func SendPhoto

func SendPhoto(client *mautrix.Client, channel string, webhook *types.GrafanaWebhook) error

func Setup

func Setup(c Config) *mautrix.Client

Types

type Config

type Config struct {
	Username   string `json:"username"`
	Password   string `json:"password"`
	Homeserver string `json:"homeserver"`
	ChannelId  string `json:"channel_id"`
	SecretKey  string `json:"secret_key"`
	Port       int    `json:"port"`
}

func ConfigFromFile

func ConfigFromFile(filepath string) (Config, error)

Jump to

Keyboard shortcuts

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