Documentation
¶
Index ¶
- Variables
- func ConvertGoValueToLua(L *lua.LState, value interface{}) lua.LValue
- func ConvertGoValueToLuaType(L *lua.LState, t reflect.Type) string
- func ConvertLuaValueToGo(L *lua.LState, value lua.LValue) interface{}
- func ConvertNumericType(value int64, kind reflect.Kind) interface{}
- func Register(rpc clientrpc.MaliceRPCClient)
- func RegisterBuiltinFunc(rpc clientrpc.MaliceRPCClient)
- func RegisterFunction(name string, fn interface{})
- func RegisterGRPCFunc(rpc clientrpc.MaliceRPCClient)
- func RegisterInternalFunc(name string, fn *InternalFunc, callback ImplantCallback) error
- func WrapFuncForLua(fn *InternalFunc) lua.LGFunction
- type ImplantCallback
- type InternalFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var InternalFunctions = make(map[string]*InternalFunc)
Functions ¶
func ConvertGoValueToLua ¶
将 Lua 的 lua.LValue 转换为 Go 的 interface{}
func ConvertNumericType ¶
func Register ¶
func Register(rpc clientrpc.MaliceRPCClient)
func RegisterBuiltinFunc ¶
func RegisterBuiltinFunc(rpc clientrpc.MaliceRPCClient)
func RegisterFunction ¶
func RegisterFunction(name string, fn interface{})
func RegisterGRPCFunc ¶
func RegisterGRPCFunc(rpc clientrpc.MaliceRPCClient)
func RegisterInternalFunc ¶
func RegisterInternalFunc(name string, fn *InternalFunc, callback ImplantCallback) error
RegisterInternalFunc 注册并生成 Lua 定义文件
func WrapFuncForLua ¶
func WrapFuncForLua(fn *InternalFunc) lua.LGFunction
Types ¶
type ImplantCallback ¶
type ImplantCallback func(content *clientpb.TaskContext) (string, error)
type InternalFunc ¶
type InternalFunc struct {
Name string
Raw interface{}
Func func(...interface{}) (interface{}, error)
FinishCallback ImplantCallback // implant callback
DoneCallback ImplantCallback
ArgTypes []reflect.Type
ReturnTypes []reflect.Type
}
func GetInternalFuncSignature ¶
func GetInternalFuncSignature(fn interface{}) *InternalFunc
获取函数的参数和返回值类型
func WrapInternalFunc ¶
func WrapInternalFunc(fun interface{}) *InternalFunc
Click to show internal directories.
Click to hide internal directories.