Documentation
¶
Overview ¶
Package binder allows to easily bind to Lua. Based on https://github.com/yuin/gopher-lua
Write less, do more.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Argument ¶
type Argument struct {
// contains filtered or unexported fields
}
Argument is a call function argument
func (*Argument) Any ¶
func (a *Argument) Any() interface{}
Any returns function argument as interface{}
func (*Argument) Bool ¶
Bool checks if function argument is bool and return it
func (*Argument) Data ¶
func (a *Argument) Data() interface{}
Data checks if function argument is UserData and return it
func (*Argument) Number ¶
Number checks if function argument is number (float64) and return it
type Binder ¶
type Binder struct {
*Loader
// contains filtered or unexported fields
}
Binder is a binder... that's all
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context function context
func (*Context) Arg ¶
Arg returns function argument by number
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader is basic loader object
func (*Loader) Func ¶
Func assign handler with specified alias
func (*Loader) Module ¶
Module creates new module and returns it
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module is a lua module wrapper
func (*Module) Func ¶
Func sets module function with specified name
func (*Module) Number ¶
Number sets module number (float64) constant
type Options ¶
type Options struct {
// CallStackSize is call stack size
CallStackSize int
// RegistrySize is data stack size
RegistrySize int
// SkipOpenLibs controls whether or not libraries are opened by default
SkipOpenLibs bool
// IncludeGoStackTrace tells whether a Go stacktrace should be included in a Lua stacktrace when panics occur.
IncludeGoStackTrace bool
}
Options binder options object
type Push ¶
type Push struct {
// contains filtered or unexported fields
}
Push function result wrapper
func (*Push) Data ¶
Data pushes UserData function result
Source Files
¶
- argument.go
- binder.go
- context.go
- doc.go
- error.go
- loader.go
- module.go
- options.go
- push.go
- table.go
Directories
¶
| Path | Synopsis |
|---|---|
|
_example
|
|
|
01-functions
command
|
|
|
02-modules
command
|
|
|
03-tables
command
|
|
|
04-highlight-errors
command
|
