mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 17:47:03 +00:00
Signed-off-by: James Hillyerd <james@hillyerd.com> Signed-off-by: James Hillyerd <james@hillyerd.com>
18 lines
339 B
Go
18 lines
339 B
Go
package luahost
|
|
|
|
import (
|
|
lua "github.com/yuin/gopher-lua"
|
|
)
|
|
|
|
const policyName = "policy"
|
|
|
|
func registerPolicyType(ls *lua.LState) {
|
|
mt := ls.NewTypeMetatable(policyName)
|
|
ls.SetGlobal(policyName, mt)
|
|
|
|
// Static attributes.
|
|
ls.SetField(mt, "allow", lua.LTrue)
|
|
ls.SetField(mt, "deny", lua.LFalse)
|
|
ls.SetField(mt, "defer", lua.LNil)
|
|
}
|