package
0.0.0-20231024184245-d3a02e60ad94
Repository: https://github.com/bbuck/dragon-mud.git
Documentation: pkg.go.dev

# Functions

NewEngine creates a new engine containing a new lua.LState.
NewEnginePool constructs a new pool with the specific maximum size and the engine mutator.
NewREPL creates a REPL struct and seeds it with the necessary values to prepare it for use.
NewREPLWithConfig creates a REPL from the provided configuration.

# Constants

EnginePoolMetaKey is a string value for associating the pool with an engine.
ExportedNames converts Go names into Go-exported type case normally (essentially meaning the exported name is unchanged when transitioning to Lua).
SnakeCaseExportedNames converts all Go names to both their snake_case and Exported styles (ex for 'HelloWorld' you get 'hello_world' and 'HelloWorld').
SnakeCaseNames converts Go names into snake_case only.

# Structs

Engine struct stores a pointer to a gluaLState providing a simplified API.
EngineOptions allows for customization of a lua.Engine such as altering the names of fields and methods as well as whether or not to open all libraries.
EnginePool represents a grouping of predefined/preloaded engines that can be grabbed for use when Lua scripts need to run.
PooledEngine wraps a Lua engine.
REPL represent a Read-Eval-Print-Loop.
REPLConfig provides a mean for configuring a lua.REPL value.
Value is a utility wrapper for lua.LValue that provies conveinient methods for casting.

# Interfaces

Inspecter defines an type that can respond to the Inspect function.
ScriptableObject defines an interface that returns an object to represent it in a script.

# Type aliases

EngineMutator will modify an Engine before it goes into the pool.
NamingConvention defines how Go names should be converted into the Lua.
ScriptFunction is a type alias for a function that receives an Engine and returns an int.
TableMap interface to speed along the creation of table defining maps when creating Go modueles for use in Lua.