luamanager

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const JsonLibName = "json"

Variables

This section is empty.

Functions

func Decode

func Decode(L *lua.LState, data []byte) (lua.LValue, error)

Decode converts the JSON encoded data to Lua values.

func DecodeValue

func DecodeValue(L *lua.LState, value interface{}) lua.LValue

DecodeValue converts the value to a Lua value.

This function only converts values that the encoding/json package decodes to. All other values will return lua.LNil.

func Encode

func Encode(value lua.LValue) ([]byte, error)

Encode returns the JSON encoding of value.

func OpenJson

func OpenJson(L *lua.LState) int

OpenJson is the module loader function.

Types

type LuaManager

type LuaManager struct{}

func (*LuaManager) RunLuaScript

func (m *LuaManager) RunLuaScript(obj *unstructured.Unstructured, script string) (*lua.LState, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL