Documentation
¶
Index ¶
- Constants
- type BlockList
- func (m *BlockList) AccountFeatures(_ context.Context) ([]string, error)
- func (m *BlockList) InterceptStanza(ctx context.Context, stanza stravaganza.Stanza, id int) (stravaganza.Stanza, error)
- func (m *BlockList) Interceptors() []module.StanzaInterceptor
- func (m *BlockList) MatchesNamespace(namespace string, serverTarget bool) bool
- func (m *BlockList) Name() string
- func (m *BlockList) ProcessIQ(ctx context.Context, iq *stravaganza.IQ) error
- func (m *BlockList) ServerFeatures(_ context.Context) ([]string, error)
- func (m *BlockList) Start(_ context.Context) error
- func (m *BlockList) Stop(_ context.Context) error
- func (m *BlockList) StreamFeature(_ context.Context, _ string) (stravaganza.Element, error)
Constants ¶
View Source
const ( // ModuleName represents blocklist module name. ModuleName = "blocklist" // XEPNumber represents blocklist XEP number. XEPNumber = "0191" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockList ¶ added in v0.53.0
type BlockList struct {
// contains filtered or unexported fields
}
BlockList represents blocklist (XEP-0191) module type.
func New ¶
func New( router router.Router, hosts *host.Hosts, resMng *c2s.ResourceManager, rep repository.Repository, sn *sonar.Sonar, ) *BlockList
New returns a new initialized BlockList instance.
func (*BlockList) AccountFeatures ¶ added in v0.53.0
AccountFeatures returns blocklist account disco features.
func (*BlockList) InterceptStanza ¶ added in v0.53.0
func (m *BlockList) InterceptStanza(ctx context.Context, stanza stravaganza.Stanza, id int) (stravaganza.Stanza, error)
InterceptStanza will be used by blocklist module to determine whether a stanza should be blocked.
func (*BlockList) Interceptors ¶ added in v0.53.0
func (m *BlockList) Interceptors() []module.StanzaInterceptor
Interceptors returns blocklist stanza interceptors.
func (*BlockList) MatchesNamespace ¶ added in v0.53.0
MatchesNamespace tells whether namespace matches blocklist module.
func (*BlockList) ServerFeatures ¶ added in v0.53.0
ServerFeatures returns blocklist server disco features.
Click to show internal directories.
Click to hide internal directories.