rspamd_config:add_map('http://example.com/map', "settings map", process_map)
*/
+/***
+* @method rspamd_config:get_maps()
+* Get all maps defined as an array of rspamd{map} objects
+ *
+* @return {table|rspamd{map}}
+*/
/***
* @method rspamd_config:get_classifier(name)
* Returns classifier config.
LUA_INTERFACE_DEF (config, add_hash_map),
LUA_INTERFACE_DEF (config, add_kv_map),
LUA_INTERFACE_DEF (config, add_map),
+ LUA_INTERFACE_DEF (config, get_maps),
LUA_INTERFACE_DEF (config, get_classifier),
LUA_INTERFACE_DEF (config, register_symbol),
LUA_INTERFACE_DEF (config, register_symbols),
}
map->map = m;
+ m->lua_map = map;
pmap = lua_newuserdata (L, sizeof (void *));
*pmap = map;
rspamd_lua_setclass (L, "rspamd{map}", -1);
ucl_object_unref (fake_obj);
pmap = lua_newuserdata (L, sizeof (void *));
map->map = m;
+ m->lua_map = map;
*pmap = map;
rspamd_lua_setclass (L, "rspamd{map}", -1);
}
ucl_object_unref (fake_obj);
pmap = lua_newuserdata (L, sizeof (void *));
map->map = m;
+ m->lua_map = map;
*pmap = map;
rspamd_lua_setclass (L, "rspamd{map}", -1);
}
map->map = m;
+ m->lua_map = map;
pmap = lua_newuserdata (L, sizeof (void *));
*pmap = map;
rspamd_lua_setclass (L, "rspamd{map}", -1);
}
map->map = m;
+ m->lua_map = map;
pmap = lua_newuserdata (L, sizeof (void *));
*pmap = map;
rspamd_lua_setclass (L, "rspamd{map}", -1);
return 1;
}
+ m->lua_map = map;
}
else if (strcmp (type, "set") == 0) {
map = rspamd_mempool_alloc0 (cfg->cfg_pool, sizeof (*map));
return 1;
}
+ m->lua_map = map;
}
else if (strcmp (type, "map") == 0 || strcmp (type, "hash") == 0) {
map = rspamd_mempool_alloc0 (cfg->cfg_pool, sizeof (*map));
return 1;
}
+ m->lua_map = map;
}
else if (strcmp (type, "radix") == 0) {
map = rspamd_mempool_alloc0 (cfg->cfg_pool, sizeof (*map));
return 1;
}
+ m->lua_map = map;
}
else if (strcmp (type, "regexp") == 0) {
map = rspamd_mempool_alloc0 (cfg->cfg_pool, sizeof (*map));
return 1;
}
+ m->lua_map = map;
}
else if (strcmp (type, "regexp_multi") == 0) {
map = rspamd_mempool_alloc0 (cfg->cfg_pool, sizeof (*map));
return 1;
}
+ m->lua_map = map;
}
else if (strcmp (type, "glob") == 0) {
map = rspamd_mempool_alloc0 (cfg->cfg_pool, sizeof (*map));
return 1;
}
+ m->lua_map = map;
}
else {
ret = luaL_error (L, "invalid arguments: unknown type '%s'", type);