summaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/constants.go51
1 files changed, 51 insertions, 0 deletions
diff --git a/internal/config/constants.go b/internal/config/constants.go
new file mode 100644
index 0000000..a199404
--- /dev/null
+++ b/internal/config/constants.go
@@ -0,0 +1,51 @@
+package config
+
+import "time"
+
+// Concurrency limits
+const (
+ // MaxConcurrentTrelloRequests limits parallel Trello API calls
+ MaxConcurrentTrelloRequests = 5
+)
+
+// Timeouts
+const (
+ // HTTPClientTimeout is the default timeout for HTTP clients
+ HTTPClientTimeout = 15 * time.Second
+
+ // GoogleCalendarInitTimeout is the timeout for Google Calendar initialization
+ GoogleCalendarInitTimeout = 30 * time.Second
+
+ // GracefulShutdownTimeout is the timeout for server graceful shutdown
+ GracefulShutdownTimeout = 10 * time.Second
+
+ // RequestTimeout is the timeout for individual HTTP requests
+ RequestTimeout = 60 * time.Second
+)
+
+// Default meal times (24-hour format)
+const (
+ BreakfastHour = 8
+ LunchHour = 12
+ DinnerHour = 19
+)
+
+// Database connection pool settings
+const (
+ SQLiteMaxOpenConns = 5
+ SQLiteMaxIdleConns = 2
+ SQLiteConnMaxLifetime = time.Hour
+)
+
+// Session settings
+const (
+ SessionLifetime = 24 * time.Hour
+)
+
+// Rate limiting
+const (
+ // AuthRateLimitRequests is max login attempts per window
+ AuthRateLimitRequests = 5
+ // AuthRateLimitWindow is the time window for rate limiting
+ AuthRateLimitWindow = 15 * time.Minute
+)