summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2020-01-28 21:04:40 +0300
committerMichael Klishin <michael@clojurewerkz.org>2020-01-28 21:06:14 +0300
commitd621ec907a4b7f33e85e4bc61f10d1c6e1ef0601 (patch)
tree09408c7e63837c26f79469c2604a7841d03a5cbe /src
parent3f866531061a3c6fc2b9ce8556b3b228b7db71a9 (diff)
downloadrabbitmq-server-git-d621ec907a4b7f33e85e4bc61f10d1c6e1ef0601.tar.gz
rabbit_definitions: introduce a few types
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_definitions.erl20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/rabbit_definitions.erl b/src/rabbit_definitions.erl
index 81d07b1140..8c70b5aa6c 100644
--- a/src/rabbit_definitions.erl
+++ b/src/rabbit_definitions.erl
@@ -37,6 +37,26 @@
%% API
%%
+-type definition_category() :: 'users' |
+ 'vhosts' |
+ 'permissions' |
+ 'topic_permissions' |
+ 'parameters' |
+ 'global_parameters' |
+ 'policies' |
+ 'queues' |
+ 'bindings' |
+ 'exchanges'.
+
+-type definition_object() :: #{binary() => any()}.
+-type definition_list() :: [definition_object()].
+
+-type definitions() :: #{
+ definition_category() => definition_list()
+}.
+
+-export_type([definition_object/0, definition_list/0, definition_category/0, definitions/0]).
+
maybe_load_definitions() ->
%% this feature was a part of rabbitmq-management for a long time,
%% so we check rabbit_management.load_definitions for backward compatibility.