Skip to content

Commit

Permalink
remove handler dependecy interface
Browse files Browse the repository at this point in the history
  • Loading branch information
aidantrabs committed Dec 15, 2024
1 parent 05929b9 commit c1ea811
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions backend/internal/interfaces/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,3 @@ type CoreServer interface {
GetAPILimiter() *middleware.RateLimiter
GetEcho() *echo.Echo
}

/*
HandlerDependencies defines a minimal interface for individual handlers.
This interface provides only the essential services needed for most handlers,
reducing coupling and making handlers easier to test.
Usage:
- Used by individual route handlers
- Provides minimal required dependencies
- Makes handlers more testable with minimal mocking
Example:
func (h *Handler) HandleCreateUser(deps HandlerDependencies) echo.HandlerFunc {
return func(c echo.Context) error {
// Use deps.GetQueries() for database operations
// Use deps.GetStorage() for file operations
}
}
*/
type HandlerDependencies interface {
GetQueries() *db.Queries
GetStorage() *storage.Storage
}

0 comments on commit c1ea811

Please sign in to comment.