refactor: move Firebase implementation to adapters/firebase, drop pexels interface

- Create internal/adapters/firebase/auth.go with Auth, noopAuth, NewAuthOrNoop
  (renamed from FirebaseAuth, noopTokenVerifier, NewFirebaseAuthOrNoop)
- Reduce internal/auth/firebase.go to TokenVerifier interface only
- Remove PhotoSearcher interface from adapters/pexels (belongs to consumers)
- Update wire.go and wire_gen.go to use firebase.NewAuthOrNoop

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
dbastrikin
2026-03-15 21:40:18 +02:00
parent fee240da7d
commit 5dc398f0d6
5 changed files with 93 additions and 89 deletions

View File

@@ -8,6 +8,7 @@ package main
import (
"github.com/food-ai/backend/internal/auth"
"github.com/food-ai/backend/internal/adapters/firebase"
"github.com/food-ai/backend/internal/infra/config"
"github.com/food-ai/backend/internal/diary"
"github.com/food-ai/backend/internal/dish"
@@ -28,7 +29,7 @@ import (
func initRouter(appConfig *config.Config, pool *pgxpool.Pool) (http.Handler, error) {
string2 := newFirebaseCredentialsFile(appConfig)
tokenVerifier, err := auth.NewFirebaseAuthOrNoop(string2)
tokenVerifier, err := firebase.NewAuthOrNoop(string2)
if err != nil {
return nil, err
}