shoutrrr: Index | Files

package xmpp

import ""


Package Files

xmpp.go xmpp_config.go


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

type Config Uses

type Config struct {
    Port       uint16
    Username   string
    Password   string
    Host       string
    ServerHost string
    ToAddress  string
    Subject    string

Config is the configuration needed to send notifications over XMPP

func (*Config) Get Uses

func (config *Config) Get(key string) (string, error)

Get returns the value of a Query field

func (*Config) GetURL Uses

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

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

func (*Config) QueryFields Uses

func (config *Config) QueryFields() []string

QueryFields returns the fields that are part of the Query of the service URL

func (*Config) Set Uses

func (config *Config) Set(key string, value string) error

Set updates the value of a Query field

func (*Config) SetURL Uses

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

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

type Service Uses

type Service struct {
    // contains filtered or unexported fields

Service sends notifications via XMPP

func (*Service) Initialize Uses

func (service *Service) Initialize(configURL *url.URL, logger *log.Logger) error

Initialize loads ServiceConfig from configURL and sets logger for this Service

func (*Service) Send Uses

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

Send a notification message to the configured recipient

Package xmpp imports 11 packages (graph) and is imported by 1 packages. Updated 2019-09-16. Refresh now. Tools for package owners.