1pub mod cache;
2pub mod cleanup;
3pub mod config;
4pub mod context;
5pub mod groups;
6pub mod marker;
7pub mod model;
8pub mod mutation;
9pub mod query;
10pub mod roles;
11pub mod schema;
12pub mod worker;
13
14#[macro_export]
15macro_rules! database {
16 ($database:ty) => {
17 impl $crate::cache::customer::CustomerCacheDB for $database {}
18 impl $crate::cache::user::UserCacheDB for $database {}
19 impl $crate::cache::CacheDB for $database {}
20 };
21}
22
23#[macro_export]
24macro_rules! storage {
25 ($storage:ty) => {
26 impl $crate::context::RelatedStorage for $storage {}
27 };
28}
29
30#[macro_export]
31macro_rules! cache {
32 ($storage:ty) => {
33 impl $crate::context::InMemoryCache for $storage {
34 fn cache_db(&self) -> &$crate::cache::CacheDB {
35 &self.inner.cache_db
36 }
37 }
38 };
39}
40
41#[macro_export]
42macro_rules! mutation_event_producer {
43 ($storage:ty) => {
44 impl $crate::context::MutationEventProducer for $storage {
45 fn mutation_event_producer(&self) -> Option<&$crate::context::Producer> {
46 Some(&self.inner.mutation_event_producer)
47 }
48 }
49 };
50}
51
52#[macro_export]
53macro_rules! cleanup_task_producer {
54 ($storage:ty) => {
55 impl $crate::worker::CleanupTaskProducer for $storage {
56 fn cleanup_task_producer(&self) -> &$crate::worker::Producer {
57 self.inner.cleanup_task_producer.as_ref()
58 }
59 }
60 };
61}