Documentation ¶
Index ¶
- type DiscoInfo
- func (x *DiscoInfo) MatchesIQ(iq *xmpp.IQ) bool
- func (x *DiscoInfo) ProcessIQ(iq *xmpp.IQ)
- func (x *DiscoInfo) RegisterAccountFeature(feature string)
- func (x *DiscoInfo) RegisterProvider(domain string, provider InfoProvider)
- func (x *DiscoInfo) RegisterServerFeature(feature string)
- func (x *DiscoInfo) RegisterServerItem(item Item)
- func (x *DiscoInfo) Shutdown() error
- func (x *DiscoInfo) UnregisterAccountFeature(feature string)
- func (x *DiscoInfo) UnregisterProvider(domain string)
- func (x *DiscoInfo) UnregisterServerFeature(feature string)
- func (x *DiscoInfo) UnregisterServerItem(item Item)
- type Feature
- type Identity
- type InfoProvider
- type Item
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscoInfo ¶
type DiscoInfo struct {
// contains filtered or unexported fields
}
DiscoInfo represents a disco info server stream module.
func (*DiscoInfo) MatchesIQ ¶
MatchesIQ returns whether or not an IQ should be processed by the disco info module.
func (*DiscoInfo) ProcessIQ ¶
ProcessIQ processes a disco info IQ taking according actions over the associated stream.
func (*DiscoInfo) RegisterAccountFeature ¶ added in v0.3.2
RegisterAccountFeature registers a new feature associated to all account domains.
func (*DiscoInfo) RegisterProvider ¶ added in v0.3.2
func (x *DiscoInfo) RegisterProvider(domain string, provider InfoProvider)
RegisterProvider registers a new disco info provider associated to a domain.
func (*DiscoInfo) RegisterServerFeature ¶ added in v0.3.2
RegisterServerFeature registers a new feature associated to server domain.
func (*DiscoInfo) RegisterServerItem ¶ added in v0.3.3
RegisterServerItem registers a new item associated to server domain.
func (*DiscoInfo) UnregisterAccountFeature ¶ added in v0.3.2
UnregisterAccountFeature unregisters a previously registered account feature.
func (*DiscoInfo) UnregisterProvider ¶ added in v0.3.2
UnregisterProvider unregisters a previously registered disco info provider.
func (*DiscoInfo) UnregisterServerFeature ¶ added in v0.3.2
UnregisterServerFeature unregisters a previously registered server feature.
func (*DiscoInfo) UnregisterServerItem ¶ added in v0.3.3
UnregisterServerItem unregisters a previously registered server item.
type InfoProvider ¶ added in v0.3.3
type InfoProvider interface { // Identities returns all identities associated to the provider. Identities(toJID, fromJID *jid.JID, node string) []Identity // Items returns all items associated to the provider. // A proper stanza error should be returned in case an error occurs. Items(toJID, fromJID *jid.JID, node string) ([]Item, *xmpp.StanzaError) // Features returns all features associated to the provider. // A proper stanza error should be returned in case an error occurs. Features(toJID, fromJID *jid.JID, node string) ([]Feature, *xmpp.StanzaError) // ResultForm returns the data form associated to the provider. // A proper stanza error should be returned in case an error occurs. Form(toJID, fromJID *jid.JID, node string) (*xep0004.DataForm, *xmpp.StanzaError) }
InfoProvider represents a generic disco info domain provider.