(l *lua.LState, ctx *gin.Context)
| 39 | } |
| 40 | |
| 41 | func initHttpLua(l *lua.LState, ctx *gin.Context) { |
| 42 | l.SetField(l.NewTypeMetatable("Request"), "__index", l.SetFuncs(l.NewTable(), luaRequestMethods)) |
| 43 | |
| 44 | mt := l.NewTypeMetatable("Context") |
| 45 | l.SetField(mt, "__index", l.SetFuncs(l.NewTable(), luaContextMethods)) |
| 46 | |
| 47 | lc := l.NewUserData() |
| 48 | lc.Value = ctx |
| 49 | lc.Metatable = mt |
| 50 | l.SetGlobal("ctx", lc) |
| 51 | } |
| 52 | |
| 53 | func getHttpLuaReturn(l *lua.LState) (int, string, string) { |
| 54 | code := http.StatusOK |
no outgoing calls