feat: complete Task 7 - end-to-end integration and full test suite

This commit is contained in:
2026-08-13 21:01:53 +03:00
parent 6f69da0761
commit 2101362d31
9 changed files with 635 additions and 27 deletions

View File

@@ -13,19 +13,19 @@ import (
// HandlerContext holds the dependencies for API handlers.
type HandlerContext struct {
Cache cache.Cache
Redis *redis.Client
Router *routing.Graph
Yandex *yandex.Client
Cache cache.Cache
Redis *redis.Client
Router *routing.Graph
Yandex *yandex.Client
}
// NewHandlerContext creates a new HandlerContext with initialized services.
func NewHandlerContext(redisClient *redis.Client, router *routing.Graph, yandex *yandex.Client) *HandlerContext {
return &HandlerContext{
Cache: cache.NewCacheStore(redisClient),
Redis: redisClient,
Router: router,
Yandex: yandex,
Cache: cache.NewCacheStore(redisClient),
Redis: redisClient,
Router: router,
Yandex: yandex,
}
}
@@ -345,4 +345,4 @@ func splitBySlash(s string) []string {
parts = append(parts, s[start:])
}
return parts
}
}