xep0280

package
v0.52.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

func (p *Carbons) AccountFeatures(_ context.Context) ([]string, error)

AccountFeatures returns ping account disco features.

func (*Carbons) MatchesNamespace

func (p *Carbons) MatchesNamespace(namespace string) bool

MatchesNamespace tells whether namespace matches carbons module.

func (*Carbons) Name

func (p *Carbons) Name() string

Name returns carbons module name.

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) ProcessIQ

func (p *Carbons) ProcessIQ(ctx context.Context, iq *stravaganza.IQ) error

ProcessIQ process a carbons iq.

func (*Carbons) ServerFeatures

func (p *Carbons) ServerFeatures(_ context.Context) ([]string, error)

ServerFeatures returns carbons server disco features.

func (*Carbons) Start

func (p *Carbons) Start(_ context.Context) error

Start starts carbons module.

func (*Carbons) Stop

func (p *Carbons) Stop(_ context.Context) error

Stop stops carbons module.

func (*Carbons) StreamFeature

func (p *Carbons) StreamFeature(_ context.Context, _ string) (stravaganza.Element, error)

StreamFeature returns carbons module stream feature.

Jump to

Keyboard shortcuts

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