emqx_dashboard.hrl 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. %%--------------------------------------------------------------------
  2. %% Copyright (c) 2020-2022 EMQ Technologies Co., Ltd. All Rights Reserved.
  3. %%
  4. %% Licensed under the Apache License, Version 2.0 (the "License");
  5. %% you may not use this file except in compliance with the License.
  6. %% You may obtain a copy of the License at
  7. %%
  8. %% http://www.apache.org/licenses/LICENSE-2.0
  9. %%
  10. %% Unless required by applicable law or agreed to in writing, software
  11. %% distributed under the License is distributed on an "AS IS" BASIS,
  12. %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. %% See the License for the specific language governing permissions and
  14. %% limitations under the License.
  15. %%--------------------------------------------------------------------
  16. -define(ADMIN, emqx_admin).
  17. -record(?ADMIN, {
  18. username :: binary(),
  19. pwdhash :: binary(),
  20. description :: binary(),
  21. role = undefined :: atom(),
  22. extra = [] :: term() %% not used so far, for future extension
  23. }).
  24. -define(ADMIN_JWT, emqx_admin_jwt).
  25. -record(?ADMIN_JWT, {
  26. token :: binary(),
  27. username :: binary(),
  28. exptime :: integer(),
  29. extra = [] :: term() %% not used so far, fur future extension
  30. }).
  31. -define(TAB_COLLECT, emqx_collect).
  32. -define(EMPTY_KEY(Key), ((Key == undefined) orelse (Key == <<>>))).
  33. -define(DASHBOARD_SHARD, emqx_dashboard_shard).
  34. -record(mqtt_collect, {
  35. timestamp :: integer(),
  36. collect
  37. }).