Documentation
¶
Overview ¶
Package xep0433 implements XEP-0433: Extended Channel Search. Clients can search for public MUC rooms hosted on this server using keyword filters. The service is exposed at the server JID and responds to IQ-get/set queries with namespace urn:xmpp:channel-search:0.
Index ¶
- Constants
- type ChannelSearch
- func (c *ChannelSearch) AccountFeatures(_ context.Context) ([]string, error)
- func (c *ChannelSearch) MatchesNamespace(namespace string, serverTarget bool) bool
- func (c *ChannelSearch) Name() string
- func (c *ChannelSearch) ProcessIQ(ctx context.Context, iq *stravaganza.IQ) error
- func (c *ChannelSearch) ServerFeatures(_ context.Context) ([]string, error)
- func (c *ChannelSearch) Start(_ context.Context) error
- func (c *ChannelSearch) Stop(_ context.Context) error
- func (c *ChannelSearch) StreamFeature(_ context.Context, _ string) (stravaganza.Element, error)
Constants ¶
View Source
const ( // ModuleName is the module registration name. ModuleName = "xep0433" // XEPNumber is the XEP number. XEPNumber = "0433" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelSearch ¶
type ChannelSearch struct {
// contains filtered or unexported fields
}
ChannelSearch is the XEP-0433 module.
func New ¶
func New(mucHost string, rep repository.Repository, rtr router.Router, logger kitlog.Logger) *ChannelSearch
New returns a new ChannelSearch instance.
func (*ChannelSearch) AccountFeatures ¶
func (c *ChannelSearch) AccountFeatures(_ context.Context) ([]string, error)
AccountFeatures returns nil.
func (*ChannelSearch) MatchesNamespace ¶
func (c *ChannelSearch) MatchesNamespace(namespace string, serverTarget bool) bool
MatchesNamespace returns true for the channel-search namespace on server targets.
func (*ChannelSearch) ProcessIQ ¶
func (c *ChannelSearch) ProcessIQ(ctx context.Context, iq *stravaganza.IQ) error
ProcessIQ handles channel search IQ queries.
func (*ChannelSearch) ServerFeatures ¶
func (c *ChannelSearch) ServerFeatures(_ context.Context) ([]string, error)
ServerFeatures returns the XEP-0433 feature string.
func (*ChannelSearch) Start ¶
func (c *ChannelSearch) Start(_ context.Context) error
Start is a no-op — this module only handles IQs.
func (*ChannelSearch) StreamFeature ¶
func (c *ChannelSearch) StreamFeature(_ context.Context, _ string) (stravaganza.Element, error)
StreamFeature returns nil.
Click to show internal directories.
Click to hide internal directories.