Software /
code /
prosody
Comparison
plugins/mod_storage_none.lua @ 8060:71bdfdf6565d
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 04 Apr 2017 01:41:09 +0200 |
parent | 8059:6a725b242804 |
child | 8061:ef671d337577 |
comparison
equal
deleted
inserted
replaced
8051:b2681397bafa | 8060:71bdfdf6565d |
---|---|
1 -- luacheck: ignore 212 | |
2 | |
1 local driver = {}; | 3 local driver = {}; |
2 local driver_mt = { __index = driver }; | 4 local driver_mt = { __index = driver }; |
3 | 5 |
4 function driver:open(store, typ) | 6 function driver:open(store, typ) |
5 if typ and typ ~= "keyval" then | 7 if typ and typ ~= "keyval" and typ ~= "archive" then |
6 return nil, "unsupported-store"; | 8 return nil, "unsupported-store"; |
7 end | 9 end |
8 return setmetatable({ store = store, type = typ }, driver_mt); | 10 return setmetatable({ store = store, type = typ }, driver_mt); |
9 end | 11 end |
10 function driver:get(user) | 12 function driver:get(user) |
21 | 23 |
22 function driver:purge(user) | 24 function driver:purge(user) |
23 return true; | 25 return true; |
24 end | 26 end |
25 | 27 |
28 function driver:append() | |
29 return nil, "Storage disabled"; | |
30 end | |
31 | |
32 function driver:find() | |
33 return function () end, 0; | |
34 end | |
35 | |
26 module:provides("storage", driver); | 36 module:provides("storage", driver); |