xep0030

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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(router *router.Router) *DiscoInfo

New returns a disco info IQ handler module.

func (*DiscoInfo) MatchesIQ

func (x *DiscoInfo) MatchesIQ(iq *xmpp.IQ) bool

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

func (*DiscoInfo) ProcessIQ

func (x *DiscoInfo) ProcessIQ(iq *xmpp.IQ)

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

func (*DiscoInfo) RegisterAccountFeature added in v0.3.2

func (x *DiscoInfo) RegisterAccountFeature(feature string)

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

func (x *DiscoInfo) RegisterServerFeature(feature string)

RegisterServerFeature registers a new feature associated to server domain.

func (*DiscoInfo) RegisterServerItem added in v0.3.3

func (x *DiscoInfo) RegisterServerItem(item Item)

RegisterServerItem registers a new item associated to server domain.

func (*DiscoInfo) Shutdown added in v0.4.0

func (x *DiscoInfo) Shutdown() error

Shutdown shuts down disco info module.

func (*DiscoInfo) UnregisterAccountFeature added in v0.3.2

func (x *DiscoInfo) UnregisterAccountFeature(feature string)

UnregisterAccountFeature unregisters a previously registered account feature.

func (*DiscoInfo) UnregisterProvider added in v0.3.2

func (x *DiscoInfo) UnregisterProvider(domain string)

UnregisterProvider unregisters a previously registered disco info provider.

func (*DiscoInfo) UnregisterServerFeature added in v0.3.2

func (x *DiscoInfo) UnregisterServerFeature(feature string)

UnregisterServerFeature unregisters a previously registered server feature.

func (*DiscoInfo) UnregisterServerItem added in v0.3.3

func (x *DiscoInfo) UnregisterServerItem(item Item)

UnregisterServerItem unregisters a previously registered server item.

type Feature

type Feature = string

Feature represents a disco info feature entity.

type Identity

type Identity struct {
	Category string
	Type     string
	Name     string
}

Identity represents a disco info identity entity.

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.

type Item

type Item struct {
	Jid  string
	Name string
	Node string
}

Item represents a disco info item entity.

Jump to

Keyboard shortcuts

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