scripts

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseAllStates

func CloseAllStates()

CloseAllStates() closes all Lua states (at program end)

func LoadScripts

func LoadScripts(scriptsDir string, tm *core.TaskManager) error

LoadScripts() loads all *.lua scripts from scriptsDir in a sandboxed Lua enviroment and registers tasks with the TaskManager.

func NewScriptEngine

func NewScriptEngine(name string) *scriptEngine

Types

type DataStore

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

DataStore defines a global data store for the scripts to use

var GlobalDataStore *DataStore

func NewDataStore

func NewDataStore(groolpDir string) (*DataStore, error)

func (*DataStore) Close

func (ds *DataStore) Close()

func (*DataStore) GetData

func (ds *DataStore) GetData(key string) (interface{}, bool)

func (*DataStore) SetData

func (ds *DataStore) SetData(key string, val interface{})

type InstallerInterface

type InstallerInterface interface {
	InstallScript(scriptUrl, scriptDir string) error
}

InstallInterface

var LuaInstaller InstallerInterface = &luaInstaller{}

Jump to

Keyboard shortcuts

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