Skip to content

NewServer should accept interfaces instead of concrete service types #47

Description

@koinsaari

Background

NewServer in internal/http/server.go takes *auth.Service and *media.Service as concrete types but immediately assigns them to authService and libraryService interface fields. The constructor signature leaks implementation details that the rest of the package never needs.

What changes

  • Change NewServer signature to accept authService and libraryService interfaces directly instead of *auth.Service and *media.Service
  • Update call site in cmd/api-proxy/main.go accordingly

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions