xep0049

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

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

	// XEPNumber represents private XEP number.
	XEPNumber = "0049"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Private

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

Private represents a private (XEP-0049) module type.

func New

func New(
	router router.Router,
	rep repository.Private,
	hk *hook.Hooks,
	logger kitlog.Logger,
) *Private

New returns a new initialized Private instance.

func (*Private) AccountFeatures

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

AccountFeatures returns private account disco features.

func (*Private) MatchesNamespace

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

MatchesNamespace tells whether namespace matches private module.

func (*Private) Name

func (m *Private) Name() string

Name returns private module name.

func (*Private) ProcessIQ

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

ProcessIQ process a private iq.

func (*Private) ServerFeatures

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

ServerFeatures returns private server disco features.

func (*Private) Start

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

Start starts private module.

func (*Private) Stop

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

Stop stops private module.

func (*Private) StreamFeature

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

StreamFeature returns private module stream feature.

Jump to

Keyboard shortcuts

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