extension

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extension

type Extension interface {
	Init() error

	Run() error

	InitSpace(s Space)
	DeinitSpace(s Space)
	RunSpace(s Space)

	InitUser(u User)
	DeinitUser(u User)
	RunUser(u User)

	SortSpaces(s []uuid.UUID, t uuid.UUID)
}

type Loader

type Loader interface {
	Get(name string) (LoaderFunc, bool)
	Set(name string, provider LoaderFunc)
}

func NewLoader

func NewLoader() Loader

type LoaderFunc added in v0.1.13

type LoaderFunc func(wc WorldController) Extension

type Space

type Space interface {
}

type User

type User interface {
	// TODO
	Send(m *websocket.PreparedMessage)
}

type WorldController

type WorldController interface {
	GetConfig() *config.World
	GetBuilder() *message.Builder
	GetStorage() *storage.Database
	GetID() uuid.UUID
	GetExtensionStorage() string
	GetSpacePosition(id uuid.UUID) (cmath.Vec3, error)
	GetSpacePresent(id uuid.UUID) bool
	Broadcast(websocketMessage *websocket.PreparedMessage)
	SafeSubscribe(topic string, qos byte, callback mqtt.MessageHandler)
	SetSpaceTitle(clock uuid.UUID, title string) error
}

Jump to

Keyboard shortcuts

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