adminserver

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package adminserver provides XMPP functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindAddr string `fig:"bind_addr"`
	Port     int    `fig:"port" default:"15280"`
	Disabled bool   `fig:"disabled"`
	MUCHost  string `fig:"muc_host" default:"conference.localhost"`
}

Config contains Server configuration parameters.

type MUCAdmin

type MUCAdmin interface {
	KickOccupant(ctx context.Context, host, roomName, nick, reason string) error
	DestroyRoom(ctx context.Context, host, roomName, reason string) error
}

MUCAdmin is implemented by the XEP-0045 module for operator actions.

type Server

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

Server represents an admin server type.

func New

func New(
	cfg Config,
	rep repository.Repository,
	peppers *pepper.Keys,
	hk *hook.Hooks,
	hosts *host.Hosts,
	router router.Router,
	mucAdmin MUCAdmin,
	logger kitlog.Logger,
) *Server

New returns a new initialized admin server.

func (*Server) Start

func (s *Server) Start(_ context.Context) error

Start starts admin server.

func (*Server) Stop

func (s *Server) Stop(_ context.Context) error

Stop stops admin server.

Jump to

Keyboard shortcuts

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