Documentation
¶
Index ¶
- Constants
- type Carbons
- func (p *Carbons) AccountFeatures(_ context.Context) ([]string, error)
- func (p *Carbons) MatchesNamespace(namespace string) bool
- func (p *Carbons) Name() string
- func (p *Carbons) PreRouteMessage(_ context.Context, msg *stravaganza.Message) (*stravaganza.Message, error)
- func (p *Carbons) ProcessIQ(ctx context.Context, iq *stravaganza.IQ) error
- func (p *Carbons) ServerFeatures(_ context.Context) ([]string, error)
- func (p *Carbons) Start(_ context.Context) error
- func (p *Carbons) Stop(_ context.Context) error
- func (p *Carbons) StreamFeature(_ context.Context, _ string) (stravaganza.Element, error)
Constants ¶
View Source
const ( // ModuleName represents carbons module name. ModuleName = "carbons" // XEPNumber represents carbons XEP number. XEPNumber = "0280" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Carbons ¶
type Carbons struct {
// contains filtered or unexported fields
}
Carbons represents carbons (XEP-0280) module type.
func New ¶
func New(hosts *host.Hosts, router router.Router, resMng *c2s.ResourceManager, sn *sonar.Sonar) *Carbons
New returns a new initialized carbons instance.
func (*Carbons) AccountFeatures ¶
AccountFeatures returns ping account disco features.
func (*Carbons) MatchesNamespace ¶
MatchesNamespace tells whether namespace matches carbons module.
func (*Carbons) PreRouteMessage ¶
func (p *Carbons) PreRouteMessage(_ context.Context, msg *stravaganza.Message) (*stravaganza.Message, error)
PreRouteMessage will be invoked before a message stanza is routed a over a C2S stream.
func (*Carbons) ServerFeatures ¶
ServerFeatures returns carbons server disco features.
func (*Carbons) StreamFeature ¶
StreamFeature returns carbons module stream feature.
Click to show internal directories.
Click to hide internal directories.