Documentation
¶
Index ¶
- type DiscoFeature
- type DiscoIdentity
- type DiscoItem
- type IQHandler
- type ModOffline
- type ModRoster
- func (r *ModRoster) AssociatedNamespaces() []string
- func (r *ModRoster) BroadcastPresence(presence *xml.Presence)
- func (r *ModRoster) BroadcastPresenceAndWait(presence *xml.Presence)
- func (r *ModRoster) DeliverPendingApprovalNotifications()
- func (r *ModRoster) Done()
- func (r *ModRoster) IsRequested() bool
- func (r *ModRoster) MatchesIQ(iq *xml.IQ) bool
- func (r *ModRoster) ProcessIQ(iq *xml.IQ)
- func (r *ModRoster) ProcessPresence(presence *xml.Presence)
- func (r *ModRoster) ReceivePresences()
- type Module
- type XEPDiscoInfo
- func (x *XEPDiscoInfo) AssociatedNamespaces() []string
- func (x *XEPDiscoInfo) Done()
- func (x *XEPDiscoInfo) Features() []DiscoFeature
- func (x *XEPDiscoInfo) Identities() []DiscoIdentity
- func (x *XEPDiscoInfo) Items() []DiscoItem
- func (x *XEPDiscoInfo) MatchesIQ(iq *xml.IQ) bool
- func (x *XEPDiscoInfo) ProcessIQ(iq *xml.IQ)
- func (x *XEPDiscoInfo) SetFeatures(features []DiscoFeature)
- func (x *XEPDiscoInfo) SetIdentities(identities []DiscoIdentity)
- func (x *XEPDiscoInfo) SetItems(items []DiscoItem)
- type XEPPing
- type XEPPrivateStorage
- type XEPRegister
- type XEPVCard
- type XEPVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscoIdentity ¶
DiscoIdentity represents a disco info identity 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.
type ModRoster ¶
type ModRoster struct {
// contains filtered or unexported fields
}
ModRoster represents a roster server stream module.
func (*ModRoster) AssociatedNamespaces ¶
AssociatedNamespaces returns namespaces associated with roster module.
func (*ModRoster) BroadcastPresence ¶
BroadcastPresence broadcasts presence to all outbound roster contacts.
func (*ModRoster) BroadcastPresenceAndWait ¶
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) IsRequested ¶
IsRequested returns whether or not the user roster has been requested.
func (*ModRoster) MatchesIQ ¶
MatchesIQ returns whether or not an IQ should be processed by the roster module.
func (*ModRoster) ProcessIQ ¶
ProcessIQ processes a roster IQ taking according actions over the associated stream.
func (*ModRoster) ProcessPresence ¶
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) 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 ¶
NewXEPPing returns an ping IQ handler module.
func (*XEPPing) AssociatedNamespaces ¶
AssociatedNamespaces returns namespaces associated with ping module.
func (*XEPPing) MatchesIQ ¶
MatchesIQ returns whether or not an IQ should be processed by the ping module.
func (*XEPPing) ProcessIQ ¶
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) 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 ¶
NewXEPVCard returns a vCard IQ handler module.
func (*XEPVCard) AssociatedNamespaces ¶
AssociatedNamespaces returns namespaces associated with vCard module.
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) 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.