Skip to content
Clone

feat(project): add project config types

zhenyi committed
parent 8011f88 commit 3e4f692 Browse files

1 file changed

+24 −0

Added lib/project/config.rs View lib/project/config.rs
@@ -0,0 +1,24 @@
1use std::sync::Arc;
2
3#[derive(Debug, Clone)]
4pub struct ProjectConfig {
5 pub cache_ttl_project_secs: u64,
6 pub cache_ttl_member_role_secs: u64,
7 pub cache_ttl_favorites_secs: u64,
8 pub default_page_size: u64,
9 pub max_page_size: u64,
10}
11
12impl Default for ProjectConfig {
13 fn default() -> Self {
14 Self {
15 cache_ttl_project_secs: 300,
16 cache_ttl_member_role_secs: 60,
17 cache_ttl_favorites_secs: 600,
18 default_page_size: 20,
19 max_page_size: 100,
20 }
21 }
22}
23
24pub type SharedProjectConfig = Arc<ProjectConfig>;