runtime

package
v0.0.0-...-1babcc1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HookRegister map[string]HookHandler

Functions

func Notify

func Notify(client xmpp.Sender, hook Hook, text, html string)

func NotifyImage

func NotifyImage(client xmpp.Sender, hook Hook, url string, desc string)

Types

type Config

type Config struct {
	LogLevel      logger.Level `toml:"log_level"`
	WebserverBind string       `toml:"webserver_bind"`

	XMPP struct {
		Address  string `toml:"address"`
		JID      string `toml:"jid"`
		Password string `toml:"password"`
	} `toml:"xmpp"`

	Nickname string `toml:"nickname"`

	StartupNotifyUser []string `toml:"startup_notify_user"`
	StartupNotifyMuc  []string `toml:"startup_notify_muc"`

	Hooks map[string][]Hook `toml:"hooks"`
}

type Hook

type Hook struct {
	Secret     string   `toml:"secret"`
	NotifyUser []string `toml:"notify_user"`
	NotifyMuc  []string `toml:"notify_muc"`
}

type HookHandler

type HookHandler func(xmpp.Sender, []Hook) func(http.ResponseWriter, *http.Request)

Jump to

Keyboard shortcuts

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