Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Dependency Injection using Google Wire #5

Open
indrayyana opened this issue Sep 30, 2024 · 5 comments
Open

Implement Dependency Injection using Google Wire #5

indrayyana opened this issue Sep 30, 2024 · 5 comments
Labels
good first issue Good for newcomers

Comments

@indrayyana
Copy link
Owner

indrayyana commented Sep 30, 2024

Currently, the application manually initializes and wires dependencies in the Routes file. This approach can become difficult to maintain as the application grows and dependencies become more complex.

Implementation Plan:

  1. Each service (EmailService, UserService, TokenService, AuthService, etc) will have a provider defined in a new wire.go file, specifying how these services are initialized.
  2. A wire_gen.go file will be automatically generated by Google Wire to manage dependencies.
@indrayyana indrayyana added the good first issue Good for newcomers label Sep 30, 2024
@dhfherna
Copy link

dhfherna commented Oct 1, 2024

Can you provide more details about the need for this issue?

@indrayyana
Copy link
Owner Author

Hi @dhfherna,

I've added a detailed description above.

Please review the updated description and let me know if you need any additional clarification.

@Abiji-2020
Copy link

@indrayyana I would like to work on this issue. By creating a new file wire.go which will wires dependencies in the services currently mentioned in them. Shall I implement the file in router package?

@indrayyana
Copy link
Owner Author

@Abiji-2020 Yes, that covers the requirements for now.

@Abiji-2020
Copy link

Then. I am working on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants