xep0202

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: 7 Imported by: 0

Documentation

Index

Constants

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

	// XEPNumber represents time XEP number.
	XEPNumber = "0202"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Time

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

Time represents a last activity (XEP-0202) module type.

func New

func New(
	router router.Router,
) *Time

New returns a new initialized Time instance.

func (*Time) AccountFeatures

func (m *Time) AccountFeatures(_ context.Context) ([]string, error)

AccountFeatures returns time account disco features.

func (*Time) MatchesNamespace

func (m *Time) MatchesNamespace(namespace string, serverTarget bool) bool

MatchesNamespace tells whether namespace matches time module.

func (*Time) Name

func (m *Time) Name() string

Name returns time module name.

func (*Time) ProcessIQ

func (m *Time) ProcessIQ(ctx context.Context, iq *stravaganza.IQ) error

ProcessIQ process a time iq.

func (*Time) ServerFeatures

func (m *Time) ServerFeatures(_ context.Context) ([]string, error)

ServerFeatures returns time server disco features.

func (*Time) Start

func (m *Time) Start(_ context.Context) error

Start starts time module.

func (*Time) Stop

func (m *Time) Stop(_ context.Context) error

Stop stops time module.

func (*Time) StreamFeature

func (m *Time) StreamFeature(_ context.Context, _ string) (stravaganza.Element, error)

StreamFeature returns time module stream feature.

Jump to

Keyboard shortcuts

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