xmpp

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Scheme is the identifying part of this service's configuration URL
	Scheme string = "xmpp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	standard.EnumlessConfig
	Port       uint16
	Username   string
	Password   string
	Host       string
	ServerHost string `key:"serverhost"`
	ToAddress  string `key:"toaddress"`
	Subject    string `key:"subject"`
}

Config is the configuration needed to send notifications over XMPP

func (*Config) GetURL

func (config *Config) GetURL() *url.URL

GetURL returns a URL representation of it's current field values

func (*Config) SetURL

func (config *Config) SetURL(url *url.URL) error

SetURL updates a ServiceConfig from a URL representation of it's field values

type Service

type Service struct {
	standard.Standard
	// contains filtered or unexported fields
}

Service sends notifications via XMPP

func (*Service) Initialize

func (service *Service) Initialize(configURL *url.URL, logger types.StdLogger) error

Initialize loads ServiceConfig from configURL and sets logger for this Service

func (*Service) Send

func (service *Service) Send(message string, params *types.Params) error

Send a notification message to the configured recipient

Jump to

Keyboard shortcuts

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