Documentation
¶
Index ¶
- type DiscoInfo
- func (di *DiscoInfo) MatchesIQ(iq *xmpp.IQ) bool
- func (di *DiscoInfo) ProcessIQ(iq *xmpp.IQ, stm stream.C2S)
- func (di *DiscoInfo) RegisterAccountFeature(feature string)
- func (di *DiscoInfo) RegisterProvider(domain string, provider Provider)
- func (di *DiscoInfo) RegisterServerFeature(feature string)
- func (di *DiscoInfo) UnregisterAccountFeature(feature string)
- func (di *DiscoInfo) UnregisterProvider(domain string)
- func (di *DiscoInfo) UnregisterServerFeature(feature string)
- type Feature
- type Identity
- type Item
- type Provider
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 New ¶
func New(shutdownCh <-chan struct{}) *DiscoInfo
New returns a disco info IQ handler 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
RegisterProvider registers a new disco info provider given a domain name.
func (*DiscoInfo) RegisterServerFeature ¶ added in v0.3.2
RegisterServerFeature registers a new feature associated to server domain.
func (*DiscoInfo) UnregisterAccountFeature ¶ added in v0.3.2
UnregisterAccountFeature unregisters a previous 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 previous registered server feature.
type Provider ¶ added in v0.3.2
type Provider 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) }
Provider represents a generic disco info domain provider.