Commit Graph
97 Commits
Author SHA1 Message Date
nutcas3 6d0c0ced1b feat: Add charging handler with credit management endpoints for IP-based operations
- Add ChargingHandler struct with ChargingEngineClient dependency
- Add NewChargingHandler constructor
- Add CheckCredit endpoint to validate sufficient credit for requested bytes
- Add GetBalance endpoint to retrieve current balance for an IP
- Add AddCredit endpoint to add bytes to an IP's credit
- Add DeductCredit endpoint to deduct bytes from an IP's credit
- Add IP parameter validation and JSON request binding
2026-04-25 03:28:51 +03:00
nutcas3 79f217ff1b feat: Fix formatting, type conversion, and test assertions in middleware and monitoring modules
- Add fmt import and fix X-RateLimit-Limit header conversion from rune to string in ratelimit middleware
- Fix whitespace alignment for rate limiter variable declarations and JSON error responses
- Update mock expectations in redis_ratelimit_test to use explicit argument type matchers
- Add severity validation check in alerting_test rule validation
- Fix health_test assertions for degraded/unhealthy counts
2026-04-25 01:07:52 +03:00
nutcas3 9d3b8428bd feat: Remove unused imports across charging engine modules
- Remove unused IntoResponse/warn/error/ChargingError/validate_* imports from api
- Remove unused AsyncCommands/error/ChargingSession/ErrorContext imports from credit_management
- Remove unused ErrorContext/ChargingError imports from engine
- Remove unused ErrorContext import from rating_billing and prefix unused variables with underscore
- Remove unused ErrorContext import from rating_plans_repo
- Remove unused log_error/validate_amount/validate_im
2026-04-25 01:06:30 +03:00
nutcas3 c0034b195a feat: Refactor api-server main.go to extract route setup and handlers into separate packages for improved modularity
- Move route registration logic to registerV1Routes with dependency injection pattern
- Extract metrics collector initialization to buildMetricsCollector helper function
- Extract service/handler dependency initialization to buildDeps helper function
- Remove all inline handler implementations (auth/services/monitoring/deployments/plugins/automation/config/chaos/billing routes)
- Remove all metrics collection helper functions (startMetricsCollection/
2026-04-24 08:58:53 +03:00
nutcas3 000640149d feat: Remove package documentation from platform.go and normalize imports formatting
- Remove package-level documentation comment mapping handler files to domains (services/monitoring/deployments/plugins/automation/config/chaos/billing)
- Normalize imports from inline to block format (net/http, strconv, github.com/gin-gonic/gin)
- Retain ErrorResponse struct and shared helper functions
2026-04-24 08:56:31 +03:00
nutcas3 85ed3e1598 feat: Refactor GraphQL resolvers to extract domain methods into separate files and retain only shared helpers
- Add package documentation mapping resolver files to domains (subscriber/usage/billing/mutations/esim/alerts/subscriptions)
- Remove models package import and add blank imports for context/base64 to preserve helper function dependencies
- Remove all resolver method implementations (Subscriber/SubscriberByImsi/Subscribers/SubscriberAccount/UsageEvents/UsageStats/RealTimeUsage/Invoices/Invoice
2026-04-24 08:55:28 +03:00
nutcas3 d99109386b feat: Refactor platform.go to extract domain handlers into separate files and retain only shared helpers
- Add package documentation mapping handler files to domains (services/monitoring/deployments/plugins/automation/config/chaos/billing)
- Remove gorm.io/gorm, models, monitoring, and services package imports
- Remove ServicesHandler struct and all methods (List/Get/Restart/Start/Stop/Scale/Logs/Health/PodStatus/Events)
- Remove MonitoringHandler struct and all methods (Metrics/Alerts/Health/Logs)
2026-04-24 08:54:23 +03:00
nutcas3 cb1d7171e0 feat: Add PaymentController with modular handlers for payment operations, refunds, and webhook processing
- Add PaymentController struct with paymentService/db dependencies and NewPaymentController constructor
- Add SetupRoutes with /payments endpoints (POST /top-up, POST/DELETE/GET /payment-methods, GET /transactions/:id, POST /transactions/:id/refund) and /webhooks/stripe endpoint
- Add ProcessTopUp handler with amount/paymentMethodId validation, subscriberID authentication, and PaymentService.
2026-04-24 08:53:34 +03:00
nutcas3 26731d4390 feat: Extract Stripe gateway types to separate file for improved code organization and maintainability
- Move StripeGateway struct from stripe.go to types.go
- Move PaymentRequest/PaymentResponse/CustomerResponse/RefundResponse/PaymentStatusResponse/WebhookEvent/InvoiceItem/InvoiceResponse structs to types.go
- Remove encoding/json import from stripe.go (moved to types.go)
- Remove PaymentRequest comment from types.go for consistency with other type definitions
2026-04-24 08:51:37 +03:00
nutcas3 1889e78db2 feat: Refactor SubscriberService to split monolithic service into modular files with method organization by domain
- Remove all method implementations from subscriber.go (CreateSubscriber/GetSubscriber/GetSubscriberByIMSI/UpdateSubscriber/SuspendSubscriber/TerminateSubscriber/ListSubscribers/terminateSubscriberSessions/GetAccount/ListInvoices/GetInvoice/ListRatingPlans/GetRatingPlan/ListAlerts/SearchSubscribers/ResolveAlert/CreateAlert and all other methods)
- Update SubscriberService struct comment
2026-04-24 08:51:13 +03:00
nutcas3 d9c2ad1f71 feat: Add structured JSON logging to PerformanceMiddleware slow request handler with comprehensive request metadata
- Replace fmt.Appendf with json.Marshal for structured log output
- Add logData map with level/type/method/path/query/response_time/status/user_agent/ip/timestamp fields
- Update logSlowRequest to output JSON-formatted logs with newline terminator for better log parsing and monitoring integration
2026-04-24 07:35:32 +03:00
nutcas3 3b338b0e20 feat: Add comprehensive ETag middleware with content-based generation, validation, and cache invalidation support
- Add ResponseWriterWrapper struct with Write/Body methods for response body capture
- Add ETagData/ETagGenerator structs with GenerateETag/GenerateWeakETag/GetCachedETag/CacheETag/InvalidateCache methods for sophisticated ETag generation and caching
- Add generateETag/generateContentETag/generateWeakETag helper functions with path/method/content/timestamp/user context hashing
- Add ETagValid
2026-04-24 07:34:14 +03:00
nutcas3 7ee875c544 feat: Remove ETag generation and validation middleware, simplify CacheMiddleware to basic Cache-Control header
- Remove ResponseWriterWrapper struct with Write/Body methods for response body capture
- Remove ETagData/ETagGenerator structs and all ETag generation/validation/caching logic
- Remove generateETag/generateContentETag/generateWeakETag/etagMatches helper functions
- Remove ETagValidationMiddleware/ContentBasedETagMiddleware/CacheInvalidationMiddleware/AdvancedCacheMiddleware handlers
2026-04-24 07:33:07 +03:00
nutcas3 8909126612 feat: Refactor Redis rate limiter to use interface for improved testability and remove mock client replacement pattern
- Add RedisClientInterface with Eval/Del/ZCount methods for Redis operation abstraction
- Update RedisRateLimiter/NewRedisRateLimiter/NewMultiTierRateLimiter to accept RedisClientInterface instead of concrete redis.Client
- Update MockRedisClient.Eval to properly construct call arguments with script and keys
- Update MockRedisClient.Del to accept keys as slice instead of variadic parameters
2026-04-23 03:16:00 +03:00
nutcas3 857ca98382 feat: Add comprehensive Redis rate limiter tests with mock client, middleware validation, and multi-tier support
- Add MockRedisClient struct with Eval/Del/ZCount methods for Redis operation mocking
- Add TestRedisRateLimiter_Allow with under/over limit scenarios and mock Redis response validation
- Add TestRedisRateLimitMiddleware with IP-based rate limiting and empty key bypass tests
- Add TestIPKeyExtractor/TestUserKeyExtractor/TestAPIKeyExtractor with valid/invalid input validation
- Add TestEnd
2026-04-23 03:02:00 +03:00
nutcas3 85926ee377 feat: Add distributed Redis-based rate limiting with sliding window, token bucket, and multi-tier support
- Add RedisRateLimiter struct with client/prefix/limit/window fields for distributed rate limit tracking
- Add RateLimitResult struct with allowed/remaining/reset_time/total_limit/retry_after fields
- Add NewRedisRateLimiter constructor and Allow method with Lua script for atomic sliding window operations
- Add AllowTokenBucket method with token bucket algorithm using Redis HMSET for refill rate
2026-04-23 03:00:33 +03:00
nutcas3 5a3f08829f feat: Add response body capture to ContentBasedETagMiddleware for accurate content-based ETag generation
- Add ResponseWriterWrapper struct with gin.ResponseWriter and body buffer fields to capture response content
- Add Write method to ResponseWriterWrapper that captures response body while writing to original writer
- Add Body method to ResponseWriterWrapper that returns captured response bytes
- Update ContentBasedETagMiddleware to wrap response writer with ResponseWriterWrapper before calling
2026-04-23 02:59:18 +03:00
nutcas3 cae53ebd17 feat: Add comprehensive rate limiting middleware with IP-based, user-based, and endpoint-specific throttling strategies
- Add SimpleRateLimiter struct with requests map, mutex, limit, window fields for in-memory rate limit tracking
- Add NewSimpleRateLimiter constructor and Allow method with time-based request cleanup and limit validation
- Add global rate limiters: authRateLimiter (10/min), apiRateLimiter (100/min), readRateLimiter (200/min), adminRateLimiter (50/min)
- Add RateLimit middleware
2026-04-23 02:59:03 +03:00
nutcas3 e2e39d8b37 feat: Add comprehensive API integration tests with authentication, RBAC, and endpoint coverage for all platform handlers
- Add TestSetup struct with DB/Router/AuthService/test users/JWT tokens for test environment initialization
- Add setupTest function with SQLite in-memory database, user/plugin/automation/config/auth session migrations, and test user creation with admin/operator/viewer/user roles
- Add makeRequest helper for authenticated HTTP requests with Bearer token and JSON body support
2026-04-23 02:58:34 +03:00
nutcas3 546c9cd69f feat: Add authentication configuration with JWT secret and reorganize environment variables with categorized sections
- Add AuthConfig struct with JWTSecret field to config package
- Add Auth field to Config struct with JSON tag for authentication settings
- Add JWT_SECRET to Auth config with default value "change-me-in-production"
- Replace MONGODB_URI with DATABASE_URL using PostgreSQL connection string in .env.example
- Add categorized sections in .env.example: Database/Server/Authentication/
2026-04-23 02:58:01 +03:00
nutcas3 bda6c5931c feat: Add comprehensive alerting system with rule evaluation, multi-channel notifications, and health-based alert triggers
- Add AlertSeverity enum with info/warning/critical levels and AlertStatus enum with firing/resolved/silenced states
- Add Alert struct with id/name/description/severity/status/timestamp/labels/annotations/last_evaluated fields
- Add AlertRule struct with id/name/description/severity/query/threshold/duration/labels/enabled fields for rule definitions
- Add AlertManager struct with rules
2026-04-23 02:57:44 +03:00
nutcas3 dd7ff85da6 feat: Add comprehensive health monitoring system with component checks, system metrics, and HTTP handlers
- Add HealthStatus enum with healthy/degraded/unhealthy states and HealthCheck struct with name/status/message/last_checked/response_time/metadata fields
- Add SystemHealth struct with status/timestamp/uptime/version/environment/checks/summary fields and HealthSummary with total/healthy/degraded/unhealthy counts
- Add HealthMonitor struct with checks map, mutex, startTime, version, env fields
2026-04-23 02:57:31 +03:00
nutcas3 d905478e89 feat: Add authentication models with User, Role, Permission, AuthSession, and APIKey structs
- Add User struct with username/email/password/first_name/last_name/role/is_active/last_login fields and GORM tags
- Add Role struct with name/description/permissions many2many relationship and GORM tags
- Add Permission struct with name/resource/action/description fields for RBAC
- Add AuthSession struct with user_id/token/refresh_token/expires_at/ip_address/user_agent/is_active fields
- Add APIKey struct with name
2026-04-23 02:57:12 +03:00
nutcas3 cf62b79932 feat: Add platform handlers for services, monitoring, deployments, plugins, automations, chaos experiments, and configuration management
- Add ServicesHandler with List/Get/Restart/Start/Stop/Scale/Logs/Health/PodStatus/Events methods and Kubernetes service integration
- Add MonitoringHandler with Metrics/Alerts/Health/Logs methods and Prometheus service integration
- Add DeploymentsHandler with Status/Start/Rollback/History methods and deployment service integration
- Add PluginsHandler with List
2026-04-23 02:56:57 +03:00
nutcas3 8b619577c8 feat: Add database connection pool optimization, statistics monitoring, and platform model migrations
- Update connection pool config with SetMaxIdleConns(25), SetConnMaxIdleTime(30min), and descriptive comments
- Add AutoMigrate for Plugin/Automation/AutomationRun/ConfigEntry/DeploymentRecord/ChaosExperimentRecord models
- Add PoolStats method with max_open_connections/open_connections/in_use/idle/wait_count/wait_duration/max_idle_closed/max_idle_time_closed/max_lifetime_closed fields
- Add Ping method
2026-04-23 02:56:43 +03:00
nutcas3 d114f1960f refactor: Replace interface{} with any alias and optimize string formatting with fmt.Appendf
- Replace map[string]interface{} with map[string]any in GraphQL, metrics, payment gateway, and webhook handlers
- Replace []byte(fmt.Sprintf()) with fmt.Appendf(nil, ...) for cursor encoding in GraphQL resolvers and tests
- Replace strings.HasPrefix/TrimPrefix with strings.CutPrefix for webhook signature parsing
- Replace stripe.Int64/Bool with new() constructor for Stripe payment parameters
- Rename Error
2026-04-23 02:56:24 +03:00
nutcas3 a839b1cde5 feat: Add platform models for plugins, automations, config, deployments, and chaos experiments
- Add Plugin struct with name/version/description/author/type/category/license/homepage/repository/enabled/status/config fields and GORM tags
- Add Automation struct with name/description/type/enabled/schedule_type/schedule_cron/schedule_interval_sec/timezone/definition/last_run_at/next_run_at fields
- Add AutomationRun struct with automation_id/status/started_at/ended_at/duration_ms/output/error/details fields for execution
2026-04-23 02:55:34 +03:00
nutcas3 5773cf00bb feat: Add sophisticated ETag generation with SHA-256 hashing, cache storage, validation middleware, and content-based caching
- Add ETagData struct with Path/Method/Content/Timestamp/UserID/Params fields for ETag generation
- Add ETagGenerator struct with secretKey/cacheStorage fields and NewETagGenerator constructor
- Add GenerateETag method with SHA-256 hashing, path/method/content/timestamp/userID/params/secretKey composition
- Add GenerateWeakETag for dynamic content, GetCachedETag/CacheETag for cache operations,
2026-04-23 02:53:01 +03:00
nutcas3 6f3a4e2690 feat: Add performance middleware with request tracking, metrics collection, and optimization utilities
- Add PerformanceMetrics struct with requestCount/totalResponseTime/slowRequests/fastRequests/errorRequests fields and sync.RWMutex
- Add PerformanceMiddleware struct with metrics/slowThreshold fields and NewPerformanceMiddleware constructor
- Add Middleware method with request timing, metrics updates, X-Response-Time/X-Request-ID headers, and slow request logging
- Add updateMetrics with request
2026-04-23 02:51:20 +03:00
nutcas3 bb8bd808f5 feat: Add comprehensive test suite for authentication service and update charging service tests with SQLite in-memory database
- Add auth_test.go with setupTestDB/setupAuthService helpers using SQLite in-memory database and GORM AutoMigrate
- Add TestAuthService_Register with duplicate username/email validation and invalid role handling
- Add TestAuthService_Login with invalid username/password checks and inactive user validation
- Add TestJWTService_GenerateToken with database session verification and token storage validation
- Add TestJWTService_ValidateToken with invalid
2026-04-23 02:50:48 +03:00
nutcas3 ede12f0abd feat: Add automation service with workflow execution, scheduling, run history, and comprehensive test coverage
- Add AutomationService struct with database dependency and NewAutomationService constructor
- Add AutomationFilter struct with enabled/type fields for filtering automations
- Add List method with enabled/type filtering, created_at DESC ordering, and context support
- Add Get method with ID lookup, gorm.ErrRecordNotFound handling, and error wrapping
- Add CreateAutomationInput struct with name/description/type/enabled
2026-04-23 02:50:23 +03:00
nutcas3 3eab9c7d60 feat: Add authentication middleware with JWT validation, RBAC permission checks, and role-based access control
- Add AuthMiddleware with Authorization header parsing, Bearer token extraction, JWT validation, user lookup, and context storage
- Add RequirePermission middleware with user authentication check, database context retrieval, and permission validation
- Add RequireCasbinPermission middleware with user_id context check, Casbin permission validation, and error handling
- Add RequireRole middleware
2026-04-23 02:38:13 +03:00
nutcas3 115a10ed66 feat: Add authentication service with JWT token management, session handling, and user operations
- Add JWTService struct with db/secretKey fields and NewJWTService constructor
- Add Claims struct with UserID/Username/Role fields and jwt.RegisteredClaims embedding
- Add GenerateToken method with 15-minute access token, 7-day refresh token, session storage, and inactive session cleanup
- Add ValidateToken method with JWT parsing, HMAC signature verification, and active session validation
- Add validateTokenWithoutSessionCheck for token parsing
2026-04-23 01:55:21 +03:00
nutcas3 c39ea181bf feat: Add authentication handler with login, registration, user management, and JWT token operations
- Add AuthHandler struct with authService dependency and NewAuthHandler constructor
- Add LoginRequest/LoginResponse/RegisterRequest/ChangePasswordRequest structs with validation tags
- Add Login method with username/password validation, token generation, and user response
- Add Register method with email/password/role validation and user creation
- Add RefreshToken method with JWT refresh token validation
2026-04-22 20:57:34 +03:00
nutcas3 721f4450c2 feat: Update dependencies with JWT auth, Swagger docs, Kubernetes client, Casbin RBAC, and testing utilities
- Add golang-jwt/jwt/v5 v5.2.2, stretchr/testify v1.11.1, and vektah/gqlparser/v2 v2.5.32
- Add swaggo/swag v1.16.6, swaggo/gin-swagger v1.6.1, and swaggo/files v1.0.1 for API documentation
- Add k8s.io/client-go v0.35.4, k8s.io/api v0.35.4, and k8s.io/apimachinery v0.35.4 for Kubernetes integration
- Add casbin/casbin/v3 v3.8.1, casbin/gorm-adapter/v3 v3.41.0, and casbin/govaluate v1.10
2026-04-22 13:44:09 +03:00
nutcas3 ae24b7a1c6 feat: Add millisToDuration utility function for converting milliseconds to time.Duration with zero handling 2026-04-22 13:35:20 +03:00
nutcas3 1fd8a9db18 feat: Add cached database wrapper with query caching, invalidation, and statistics support
- Add CachedDatabase struct wrapping Database with cache.Cache field and NewCachedDatabase constructor
- Add CachedFind method with cache key generation from query/args, cache hit deserialization, database fallback on miss, and 5-minute TTL
- Add CachedFirst method with same caching pattern as CachedFind for single record queries
- Add InvalidateCache method for clearing all cache entries and InvalidateCacheKey
2026-04-22 13:20:04 +03:00
nutcas3 9e1a508769 feat: Add configuration store service with database-backed runtime settings, validation, and sensitive value masking
- Add ConfigStoreService struct with database dependency and NewConfigStoreService constructor
- Add List method with optional section filtering, section/key ordering, and sensitive value masking (********)
- Add UpsertConfigInput struct with section/key/value/type/sensitive/description/updated_by fields and required validation
- Add Upsert method with section+key lookup, default
2026-04-21 11:08:06 +03:00
nutcas3 648f7e59f5 feat: Add centralized error handling with typed error codes, validation support, and enhanced parsing utilities
- Add error code constants for validation/auth/resource/system/business logic errors (VALIDATION_FAILED/UNAUTHORIZED/NOT_FOUND/INTERNAL_ERROR/etc)
- Add EnhancedErrorResponse with error/code/details/context/timestamp/request_id fields and ValidationErrorResponse with field-specific errors array
- Add handleError function with gorm.ErrRecordNotFound/ErrDuplicatedKey/ErrInvalidData handling
2026-04-21 11:07:29 +03:00
nutcas3 021742a488 feat: Add Casbin RBAC service with policy management, permission checking, and default role configurations
- Add CasbinService struct with enforcer/db fields and NewCasbinService constructor with GORM adapter initialization
- Add Casbin model configuration with request_definition/policy_definition/role_definition/policy_effect/matchers for RBAC
- Add initializeDefaultPolicies with admin (full access), operator (manage services/monitoring), and viewer (read-only) role permissions
- Add CheckPermission method
2026-04-21 11:06:24 +03:00
nutcas3 f8d218448d refactor: Replace interface{} with any and add comprehensive plugin service tests with benchmarks
- Replace interface{} with any in sendDeactivationRequest method signature in es2_helpers.go
- Add plugin_service_test.go with setupPluginTest helper using in-memory SQLite and gorm.AutoMigrate
- Add TestPluginService_List with test cases for all/enabled/disabled/by-type filtering and no matches
- Add TestPluginService_Install with tests for successful install, duplicate prevention, and missing fields
2026-04-20 20:08:23 +03:00
nutcas3 f42a753372 feat: Add Swagger documentation models for API endpoints with comprehensive field annotations
- Add Subscriber model with IMSI/MSISDN/email/status/plan_id/profile_status fields and validation examples
- Add Service model with name/namespace/replicas/ready_replicas/available_replicas/creation_timestamp fields
- Add Deployment model with service/version/status/started_at/completed_at/metadata fields and status enum
- Add Plugin model with name/version/author/description/enabled/config fields
- Add Automation model with name/description/trigger/
2026-04-20 20:06:37 +03:00
nutcas3 14ca3d00e7 feat: Add deployment service with CRUD operations, rollback support, and status tracking
- Add DeploymentService struct with database dependency and NewDeploymentService constructor
- Add DeploymentFilter struct with Service/Environment/Status/Limit/Offset fields for query filtering
- Add List method with context support, filter application (service/environment/status), pagination (default limit: 20), and DESC ordering by created_at
- Add Get method with gorm.ErrRecordNotFound handling and formatted
2026-04-20 20:06:09 +03:00
nutcas3 dfa23fde3c feat: Add WebSocket handler with hub management, client connections, and real-time broadcasting
- Add websocket.Upgrader with CheckOrigin allowing all origins in development
- Add Message struct with type/data/timestamp fields for WebSocket messages
- Add Client struct with conn/send/mutex/closed fields and readPump/writePump/Close methods
- Add Hub struct with clients map, broadcast/register/unregister channels, and sync.RWMutex
- Add NewHub constructor and Run method with client registration/
2026-04-20 20:05:40 +03:00
nutcas3 4875fa7c88 feat: Add Kubernetes service with deployment management, scaling, restart, logs, and pod status monitoring
- Add KubernetesService struct with kubernetes.Clientset/namespace and NewKubernetesService constructor with in-cluster/kubeconfig fallback
- Add getInClusterNamespace helper with /var/run/secrets/kubernetes.io/serviceaccount/namespace reading
- Add Deployment struct with name/namespace/creationTimestamp/labels/replicas/readyReplicas/availableReplicas/updatedReplicas/unavailableReplicas fields
- Add ListDeployments method with AppsV1().Deployments().
2026-04-20 20:05:23 +03:00
nutcas3 501c558b9f feat: Add plugin service with CRUD operations, filtering, and enable/disable functionality
- Add PluginService struct with database dependency and NewPluginService constructor
- Add PluginFilter struct with Enabled/Type/Category fields for query filtering
- Add List method with context support, filter application (enabled/type/category), and DESC ordering by installed_at
- Add Get method with gorm.ErrRecordNotFound handling and formatted error messages
- Add InstallPluginInput struct with name/
2026-04-20 20:04:19 +03:00
nutcas3 a6ec720df3 feat: Add Prometheus service client with instant query execution, alert retrieval, and health checking
- Add PrometheusService struct with baseURL/http.Client (10s timeout) and PROMETHEUS_URL env config (default: http://prometheus:9090)
- Add Available method with /-/ready endpoint health check
- Add Query method with instant PromQL execution via /api/v1/query, URL escaping, error handling
- Add promResponse/promVectorData/PromVectorSample structs for query result parsing with metric/value fields
2026-04-20 18:10:36 +03:00
nutcas3 0e28b8a1ac feat: Add comprehensive API server with REST endpoints, WebSocket support, RBAC, monitoring, and service integrations
- Add server.go with Swagger documentation endpoint, WebSocket handler, health/ready/live monitoring endpoints
- Add global middleware: rate limiting, performance optimization, security headers, CORS, request size (10MB), timeout (30s)
- Add performance metrics endpoint with 100ms threshold monitoring
- Add authentication service initialization with JWT, WebSocket hub, health monitor
2026-04-20 18:09:53 +03:00
nutcas3 4a74483044 feat: Add cache package with in-memory implementation, LRU eviction, and multi-cache management
- Add CacheItem struct with key/value/expiration/createdAt/accessCount/lastAccess fields and IsExpired method
- Add Cache interface with Get/Set/Delete/Clear/Keys/Size/Stats methods
- Add CacheStats struct with hits/misses/hitRate/size/evictions/totalItems metrics
- Add MemoryCache with sync.RWMutex, maxSize limit, automatic cleanup goroutine, LRU eviction, and access tracking
- Add RedisCache placeholder
2026-04-20 18:09:26 +03:00
NutcaseandGitHub 1b2b9d2412 Revert "Revert "App layer"" (#5) 2026-04-17 16:08:27 +03:00