xep0092

package
v0.54.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName represents version module name.
	ModuleName = "version"

	// XEPNumber represents version XEP number.
	XEPNumber = "0092"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// ShowOS tells whether OS info should be revealed or not.
	ShowOS bool
}

Config contains version module configuration options.

type Version

type Version struct {
	// contains filtered or unexported fields
}

Version represents a version (XEP-0092) module type.

func New

func New(router router.Router, cfg Config) *Version

New returns a new initialized version instance.

func (*Version) AccountFeatures

func (v *Version) AccountFeatures(_ context.Context) ([]string, error)

AccountFeatures returns version account disco features.

func (*Version) MatchesNamespace

func (v *Version) MatchesNamespace(namespace string, serverTarget bool) bool

MatchesNamespace tells whether namespace matches version module.

func (*Version) Name

func (v *Version) Name() string

Name returns version module name.

func (*Version) ProcessIQ

func (v *Version) ProcessIQ(ctx context.Context, iq *stravaganza.IQ) error

ProcessIQ process a version iq.

func (*Version) ServerFeatures

func (v *Version) ServerFeatures(_ context.Context) ([]string, error)

ServerFeatures returns version server disco features.

func (*Version) Start

func (v *Version) Start(ctx context.Context) error

Start starts version module.

func (*Version) Stop

func (v *Version) Stop(_ context.Context) error

Stop stops version module.

func (*Version) StreamFeature

func (v *Version) StreamFeature(_ context.Context, _ string) (stravaganza.Element, error)

StreamFeature returns version module stream feature.

Jump to

Keyboard shortcuts

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