extension

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 24, 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() bool

	InitSpace(s Space)
	DeinitSpace(s Space)

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

	RunSpace(s Space)
	Run()

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

type Loader

type Loader interface {
	Get(name string) func(wc WorldController) Extension
	Set(name string, provider func(wc WorldController) Extension)
	IsInitialized() bool
	SetInitialized()
}

func NewLoader

func NewLoader() Loader

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
	GetSpacePresent(id uuid.UUID) bool
	BroadcastObjects(array []message.ObjectDefinition)
	Broadcast(websocketMessage *websocket.PreparedMessage)
	SafeSubscribe(topic string, qos byte, callback func(client mqtt.Client, msg mqtt.Message))
	SetSpaceTitle(clock uuid.UUID, title string)
}

Jump to

Keyboard shortcuts

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