aboutsummaryrefslogtreecommitdiff
path: root/apps/dreki/src/world/dreki_world_store.erl
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dreki/src/world/dreki_world_store.erl')
-rw-r--r--apps/dreki/src/world/dreki_world_store.erl48
1 files changed, 48 insertions, 0 deletions
diff --git a/apps/dreki/src/world/dreki_world_store.erl b/apps/dreki/src/world/dreki_world_store.erl
new file mode 100644
index 0000000..050efd0
--- /dev/null
+++ b/apps/dreki/src/world/dreki_world_store.erl
@@ -0,0 +1,48 @@
+-module(dreki_world_store).
+-include("dreki.hrl").
+-behaviour(dradis_store_backend).
+
+%% Types
+
+-record(store, {}).
+-type db() :: #store{}.
+-type args() :: #{}.
+
+-export([start/0, start/5, checkout/1, checkin/1, stop/0, stop/1]).
+-export([valid_store/5]).
+-export([list/1, count/1, exists/2, get/2, create/2, update/2, delete/2]).
+
+valid_store(_Namespace, Location, _Name, _NSMod, _Args) ->
+ case Location =:= dreki_world:root_path() of
+ true -> ok;
+ false -> {error, {dreki_world_store_invalid_location, Location, dreki_world:root_path()}}
+ end.
+
+start() -> ok.
+start(_, _, _, _, _) -> {ok, dreki_world_store}.
+
+checkout(_) -> {ok, #store{}}.
+checkin(_) -> ok.
+stop() -> ok.
+stop(_) -> ok.
+
+list(_) ->
+ {error, not_implemented}.
+
+count(_) ->
+ {error, not_implemented}.
+
+exists(_, _) ->
+ {error, not_implemented}.
+
+get(_, _) ->
+ {error, not_implemented}.
+
+delete(_, _) ->
+ {error, not_implemented}.
+
+create(_, _) ->
+ {error, not_implemented}.
+
+update(_Tab, _) ->
+ {error, not_implemented}.