module

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2018 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoFeature

type DiscoFeature = string

DiscoFeature represents a disco info feature entity.

type DiscoIdentity

type DiscoIdentity struct {
	Category string
	Type     string
	Name     string
}

DiscoIdentity represents a disco info identity entity.

type DiscoItem

type DiscoItem struct {
	Jid  string
	Name string
	Node string
}

DiscoItem represents a disco info item entity.

type IQHandler

type IQHandler interface {
	Module

	// MatchesIQ returns whether or not an IQ should be
	// processed by this module.
	MatchesIQ(iq *xml.IQ) bool

	// ProcessIQ processes a module IQ taking according actions
	// over the associated stream.
	ProcessIQ(iq *xml.IQ)
}

IQHandler represents an IQ handler module.

type ModOffline

type ModOffline struct {
	// contains filtered or unexported fields
}

ModOffline represents an offline server stream module.

func NewOffline

func NewOffline(config *config.ModOffline, strm c2s.Stream) *ModOffline

NewOffline returns an offline server stream module.

func (*ModOffline) ArchiveMessage

func (o *ModOffline) ArchiveMessage(message *xml.Message)

ArchiveMessage archives a new offline messages into the storage.

func (*ModOffline) AssociatedNamespaces

func (o *ModOffline) AssociatedNamespaces() []string

AssociatedNamespaces returns namespaces associated with offline module.

func (*ModOffline) DeliverOfflineMessages

func (o *ModOffline) DeliverOfflineMessages()

DeliverOfflineMessages delivers every archived offline messages to the peer deleting them from storage.

func (*ModOffline) Done

func (o *ModOffline) Done()

Done signals stream termination.

type ModRoster

type ModRoster struct {
	// contains filtered or unexported fields
}

ModRoster represents a roster server stream module.

func NewRoster

func NewRoster(stm c2s.Stream) *ModRoster

NewRoster returns a roster server stream module.

func (*ModRoster) AssociatedNamespaces

func (r *ModRoster) AssociatedNamespaces() []string

AssociatedNamespaces returns namespaces associated with roster module.

func (*ModRoster) BroadcastPresence

func (r *ModRoster) BroadcastPresence(presence *xml.Presence)

BroadcastPresence broadcasts presence to all outbound roster contacts.

func (*ModRoster) BroadcastPresenceAndWait

func (r *ModRoster) BroadcastPresenceAndWait(presence *xml.Presence)

BroadcastPresenceAndWait broadcasts presence to all outbound roster contacts in a synchronous manner.

func (*ModRoster) DeliverPendingApprovalNotifications

func (r *ModRoster) DeliverPendingApprovalNotifications()

DeliverPendingApprovalNotifications delivers any pending roster notification to the associated stream.

func (*ModRoster) Done

func (r *ModRoster) Done()

Done signals stream termination.

func (*ModRoster) IsRequested

func (r *ModRoster) IsRequested() bool

IsRequested returns whether or not the user roster has been requested.

func (*ModRoster) MatchesIQ

func (r *ModRoster) MatchesIQ(iq *xml.IQ) bool

MatchesIQ returns whether or not an IQ should be processed by the roster module.

func (*ModRoster) ProcessIQ

func (r *ModRoster) ProcessIQ(iq *xml.IQ)

ProcessIQ processes a roster IQ taking according actions over the associated stream.

func (*ModRoster) ProcessPresence

func (r *ModRoster) ProcessPresence(presence *xml.Presence)

ProcessPresence process an incoming roster presence.

func (*ModRoster) ReceivePresences

func (r *ModRoster) ReceivePresences()

ReceivePresences delivers all inbound roster available presences to the associated module stream.

type Module

type Module interface {
	// AssociatedNamespaces returns namespaces associated
	// with this module.
	AssociatedNamespaces() []string

	// Done signals stream termination.
	Done()
}

Module represents an XMPP module.

type XEPDiscoInfo

type XEPDiscoInfo struct {
	// contains filtered or unexported fields
}

XEPDiscoInfo represents a disco info server stream module.

func NewXEPDiscoInfo

func NewXEPDiscoInfo(strm c2s.Stream) *XEPDiscoInfo

NewXEPDiscoInfo returns a disco info IQ handler module.

func (*XEPDiscoInfo) AssociatedNamespaces

func (x *XEPDiscoInfo) AssociatedNamespaces() []string

AssociatedNamespaces returns namespaces associated with disco info module.

func (*XEPDiscoInfo) Done

func (x *XEPDiscoInfo) Done()

Done signals stream termination.

func (*XEPDiscoInfo) Features

func (x *XEPDiscoInfo) Features() []DiscoFeature

Features returns disco info module's features.

func (*XEPDiscoInfo) Identities

func (x *XEPDiscoInfo) Identities() []DiscoIdentity

Identities returns disco info module's identities.

func (*XEPDiscoInfo) Items

func (x *XEPDiscoInfo) Items() []DiscoItem

Items returns disco info module's items.

func (*XEPDiscoInfo) MatchesIQ

func (x *XEPDiscoInfo) MatchesIQ(iq *xml.IQ) bool

MatchesIQ returns whether or not an IQ should be processed by the disco info module.

func (*XEPDiscoInfo) ProcessIQ

func (x *XEPDiscoInfo) ProcessIQ(iq *xml.IQ)

ProcessIQ processes a disco info IQ taking according actions over the associated stream.

func (*XEPDiscoInfo) SetFeatures

func (x *XEPDiscoInfo) SetFeatures(features []DiscoFeature)

SetFeatures sets disco info module's features.

func (*XEPDiscoInfo) SetIdentities

func (x *XEPDiscoInfo) SetIdentities(identities []DiscoIdentity)

SetIdentities sets disco info module's identities.

func (*XEPDiscoInfo) SetItems

func (x *XEPDiscoInfo) SetItems(items []DiscoItem)

SetItems sets disco info module's items.

type XEPPing

type XEPPing struct {
	// contains filtered or unexported fields
}

XEPPing represents a ping server stream module.

func NewXEPPing

func NewXEPPing(config *config.ModPing, strm c2s.Stream) *XEPPing

NewXEPPing returns an ping IQ handler module.

func (*XEPPing) AssociatedNamespaces

func (x *XEPPing) AssociatedNamespaces() []string

AssociatedNamespaces returns namespaces associated with ping module.

func (*XEPPing) Done

func (x *XEPPing) Done()

Done signals stream termination.

func (*XEPPing) MatchesIQ

func (x *XEPPing) MatchesIQ(iq *xml.IQ) bool

MatchesIQ returns whether or not an IQ should be processed by the ping module.

func (*XEPPing) ProcessIQ

func (x *XEPPing) ProcessIQ(iq *xml.IQ)

ProcessIQ processes a ping IQ taking according actions over the associated stream.

func (*XEPPing) ResetDeadline

func (x *XEPPing) ResetDeadline()

ResetDeadline resets send ping deadline.

func (*XEPPing) StartPinging

func (x *XEPPing) StartPinging()

StartPinging starts pinging peer every 'send interval' period.

type XEPPrivateStorage

type XEPPrivateStorage struct {
	// contains filtered or unexported fields
}

XEPPrivateStorage represents a private storage server stream module.

func NewXEPPrivateStorage

func NewXEPPrivateStorage(strm c2s.Stream) *XEPPrivateStorage

NewXEPPrivateStorage returns a private storage IQ handler module.

func (*XEPPrivateStorage) AssociatedNamespaces

func (x *XEPPrivateStorage) AssociatedNamespaces() []string

AssociatedNamespaces returns namespaces associated with private storage module.

func (*XEPPrivateStorage) Done

func (x *XEPPrivateStorage) Done()

Done signals stream termination.

func (*XEPPrivateStorage) MatchesIQ

func (x *XEPPrivateStorage) MatchesIQ(iq *xml.IQ) bool

MatchesIQ returns whether or not an IQ should be processed by the private storage module.

func (*XEPPrivateStorage) ProcessIQ

func (x *XEPPrivateStorage) ProcessIQ(iq *xml.IQ)

ProcessIQ processes a private storage IQ taking according actions over the associated stream.

type XEPRegister

type XEPRegister struct {
	// contains filtered or unexported fields
}

XEPRegister represents an in-band server stream module.

func NewXEPRegister

func NewXEPRegister(config *config.ModRegistration, strm c2s.Stream) *XEPRegister

NewXEPRegister returns an in-band registration IQ handler.

func (*XEPRegister) AssociatedNamespaces

func (x *XEPRegister) AssociatedNamespaces() []string

AssociatedNamespaces returns namespaces associated with in-band registration module.

func (*XEPRegister) Done

func (x *XEPRegister) Done()

Done signals stream termination.

func (*XEPRegister) MatchesIQ

func (x *XEPRegister) MatchesIQ(iq *xml.IQ) bool

MatchesIQ returns whether or not an IQ should be processed by the in-band registration module.

func (*XEPRegister) ProcessIQ

func (x *XEPRegister) ProcessIQ(iq *xml.IQ)

ProcessIQ processes an in-band registration IQ taking according actions over the associated stream.

type XEPVCard

type XEPVCard struct {
	// contains filtered or unexported fields
}

XEPVCard represents a vCard server stream module.

func NewXEPVCard

func NewXEPVCard(strm c2s.Stream) *XEPVCard

NewXEPVCard returns a vCard IQ handler module.

func (*XEPVCard) AssociatedNamespaces

func (x *XEPVCard) AssociatedNamespaces() []string

AssociatedNamespaces returns namespaces associated with vCard module.

func (*XEPVCard) Done

func (x *XEPVCard) Done()

Done signals stream termination.

func (*XEPVCard) MatchesIQ

func (x *XEPVCard) MatchesIQ(iq *xml.IQ) bool

MatchesIQ returns whether or not an IQ should be processed by the vCard module.

func (*XEPVCard) ProcessIQ

func (x *XEPVCard) ProcessIQ(iq *xml.IQ)

ProcessIQ processes a vCard IQ taking according actions over the associated stream.

type XEPVersion

type XEPVersion struct {
	// contains filtered or unexported fields
}

XEPVersion represents a version server stream module.

func NewXEPVersion

func NewXEPVersion(config *config.ModVersion, strm c2s.Stream) *XEPVersion

NewXEPVersion returns a version IQ handler module.

func (*XEPVersion) AssociatedNamespaces

func (x *XEPVersion) AssociatedNamespaces() []string

AssociatedNamespaces returns namespaces associated with version module.

func (*XEPVersion) Done

func (x *XEPVersion) Done()

Done signals stream termination.

func (*XEPVersion) MatchesIQ

func (x *XEPVersion) MatchesIQ(iq *xml.IQ) bool

MatchesIQ returns whether or not an IQ should be processed by the version module.

func (*XEPVersion) ProcessIQ

func (x *XEPVersion) ProcessIQ(iq *xml.IQ)

ProcessIQ processes a version IQ taking according actions over the associated stream.

Jump to

Keyboard shortcuts

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