Documentation ¶
Index ¶
- type EntityCaps
- func (x *EntityCaps) MatchesIQ(iq *xmpp.IQ) bool
- func (x *EntityCaps) PresencesMatchingJID(ctx context.Context, jid *jid.JID) ([]capsmodel.PresenceCaps, error)
- func (x *EntityCaps) ProcessIQ(ctx context.Context, iq *xmpp.IQ)
- func (x *EntityCaps) RegisterPresence(ctx context.Context, presence *xmpp.Presence) (alreadyRegistered bool, err error)
- func (x *EntityCaps) Shutdown() error
- func (x *EntityCaps) UnregisterPresence(ctx context.Context, jid *jid.JID) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityCaps ¶
type EntityCaps struct {
// contains filtered or unexported fields
}
EntityCaps represents global entity capabilities module
func New ¶
func New(router router.Router, presencesRep repository.Presences, allocationID string) *EntityCaps
New returns a new presence hub instance.
func (*EntityCaps) MatchesIQ ¶
func (x *EntityCaps) MatchesIQ(iq *xmpp.IQ) bool
MatchesIQ returns whether or not an IQ should be processed by the roster module.
func (*EntityCaps) PresencesMatchingJID ¶
func (x *EntityCaps) PresencesMatchingJID(ctx context.Context, jid *jid.JID) ([]capsmodel.PresenceCaps, error)
PresencesMatchingJID returns current online presences matching a given JID.
func (*EntityCaps) ProcessIQ ¶
func (x *EntityCaps) ProcessIQ(ctx context.Context, iq *xmpp.IQ)
ProcessIQ processes a roster IQ taking according actions over the associated stream.
func (*EntityCaps) RegisterPresence ¶
func (x *EntityCaps) RegisterPresence(ctx context.Context, presence *xmpp.Presence) (alreadyRegistered bool, err error)
RegisterPresence keeps track of a new client presence, requesting capabilities when necessary.
func (*EntityCaps) Shutdown ¶
func (x *EntityCaps) Shutdown() error
Shutdown shuts down blocking module.
func (*EntityCaps) UnregisterPresence ¶
UnregisterPresence removes a presence from the hub.
Click to show internal directories.
Click to hide internal directories.