Documentation ¶
Index ¶
- Constants
- Variables
- func DeepPush(l *lua.State, v interface{}) int
- func EnvGetArgs(l *lua.State) int
- func EnvGetEnv(l *lua.State) int
- func LoadFile(l *lua.State, fileName, mode string) error
- func LoadLuaFile(l *lua.State, f LuaFile) error
- func MustPullVarargs(l *lua.State, startIndex int) []interface{}
- func PackageOpen(l *lua.State) int
- func Parse(l *lua.State) int
- func ParseJson(l *lua.State) int
- func PullStringTable(l *lua.State, idx int) (map[string]string, error)
- func PullTable(l *lua.State, idx int) (interface{}, error)
- func PullVarargs(l *lua.State, startIndex int) ([]interface{}, error)
- func Repr(l *lua.State) int
- func ReprJson(l *lua.State) int
- func ScanLibs(libDir string) (map[string]LuaFile, error)
- func SetEnvironment(l *lua.State, environment *Environment)
- func SyscallOpen(l *lua.State) int
- type Environment
- type FileInfo
- type Filesystem
- type FsError
- type Log
- type LuaFile
- type VFS
- type WriteSyncer
Constants ¶
View Source
const EReadonly = FsError("readonly filesystem")
View Source
const EnvKey = "LUABOX_ENV"
Variables ¶
View Source
var BaseLibs map[string]LuaFile
Functions ¶
func EnvGetArgs ¶
func EnvGetArgs(l *lua.State) int
func LoadLuaFile ¶
func MustPullVarargs ¶
func MustPullVarargs(l *lua.State, startIndex int) []interface{}
func PackageOpen ¶
func PackageOpen(l *lua.State) int
PackageOpen opens the package library. Usually passed to Require.
func PullVarargs ¶
func SetEnvironment ¶
func SetEnvironment(l *lua.State, environment *Environment)
func SyscallOpen ¶
func SyscallOpen(l *lua.State) int
Types ¶
type Environment ¶
type Environment struct { Fs Filesystem Input io.Reader Output WriteSyncer Log Log Env map[string]string Args []string Context context.Context GoLibs []lua.RegistryFunction LuaLibs map[string]LuaFile PreInitLua []LuaFile }
func GetEnvironment ¶
func GetEnvironment(l *lua.State) (*Environment, error)
func (*Environment) Init ¶
func (e *Environment) Init() (*lua.State, error)
type Filesystem ¶
type Log ¶
type Log interface { WithFields(context map[string]interface{}) Log Debug(msg string, context map[string]interface{}) Info(msg string, context map[string]interface{}) Warn(msg string, context map[string]interface{}) Error(msg string, context map[string]interface{}) Fatal(msg string, context map[string]interface{}) }
type VFS ¶
type VFS struct { BaseFs Filesystem Prefixes map[string]Filesystem }
type WriteSyncer ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.