Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is used to maintain the underlying state for the lua vm
func NewAppConfig ¶
NewAppConfig creates a lua vm session and app config using an application name (used to create the root table), filename/path and some globals (optional). The passed file may have any extension as long as it is a valid lua script. You may prefer to use a .lua extension for automatic syntax highlighting in editors.
func (*App) Cleanup ¶
func (a *App) Cleanup()
Cleanup closes and cleans up the lua VM, this must be called when all interaction with the config app is complete
func (*App) GetGlobal ¶
GetGlobal retrieves a global object from the lua vm and maps it to the provided mapping pointer. This seems to only work when the object matching the provided key is a table.
func (*App) ParseFunction ¶
ParseFunction runs the method by provided method name, app name and maps the result to the provided 'mapping' pointer. The mapping must be a ptr of a struct or map type.