xep0115

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName represents entity capabilities module name.
	ModuleName = "caps"

	// XEPNumber represents entity capabilities XEP number.
	XEPNumber = "0115"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Capabilities

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

Capabilities represents entity capabilities (XEP-0115) module type.

func New

func New(
	router router.Router,
	rep repository.Capabilities,
	hk *hook.Hooks,
) *Capabilities

New creates and initializes a new Capabilities instance.

func (*Capabilities) AccountFeatures

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

AccountFeatures returns entity capabilities module account disco features.

func (*Capabilities) Name

func (m *Capabilities) Name() string

Name returns entity capabilities module name.

func (*Capabilities) ServerFeatures

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

ServerFeatures returns entity capabilities module server disco features.

func (*Capabilities) Start

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

Start starts entity capabilities module.

func (*Capabilities) Stop

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

Stop stops entity capabilities module.

func (*Capabilities) StreamFeature

func (m *Capabilities) StreamFeature(ctx context.Context, domain string) (stravaganza.Element, error)

StreamFeature returns entity capabilities module stream feature.

Jump to

Keyboard shortcuts

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