block-accounting/backend/internal/factory/wire.go

35 lines
835 B
Go
Raw Permalink Normal View History

2024-05-24 17:44:24 +00:00
//go:build wireinject
// +build wireinject
package factory
import (
"github.com/emochka2007/block-accounting/internal/pkg/config"
"github.com/emochka2007/block-accounting/internal/service"
"github.com/emochka2007/block-accounting/internal/usecase/repository"
"github.com/google/wire"
)
func ProvideService(c config.Config) (service.Service, func(), error) {
wire.Build(
repository.ProvideDatabaseConnection,
provideRedisConnection,
provideLogger,
provideRedisCache,
provideUsersRepository,
provideUsersInteractor,
provideTxRepository,
provideOrganizationsRepository,
provideOrganizationsInteractor,
provideTxInteractor,
2024-05-25 13:00:21 +00:00
provideChainInteractor,
2024-05-24 17:44:24 +00:00
provideAuthRepository,
provideJWTInteractor,
interfaceSet,
provideRestServer,
service.NewService,
)
return &service.ServiceImpl{}, func() {}, nil
}