diff --git a/cmd/ciam-rebac/wire_gen.go b/cmd/ciam-rebac/wire_gen.go index 4021149..d538c54 100644 --- a/cmd/ciam-rebac/wire_gen.go +++ b/cmd/ciam-rebac/wire_gen.go @@ -29,7 +29,9 @@ func wireApp(confServer *conf.Server, confData *conf.Data, logger log.Logger) (* return nil, nil, err } createRelationshipsUsecase := biz.NewCreateRelationshipsUsecase(spiceDbRepository, logger) - relationshipsService := service.NewRelationshipsService(logger, createRelationshipsUsecase) + readRelationshipsUsecase := biz.NewReadRelationshipsUsecase(spiceDbRepository, logger) + deleteRelationshipsUsecase := biz.NewDeleteRelationshipsUsecase(spiceDbRepository, logger) + relationshipsService := service.NewRelationshipsService(logger, createRelationshipsUsecase, readRelationshipsUsecase, deleteRelationshipsUsecase) healthService := service.NewHealthService() grpcServer := server.NewGRPCServer(confServer, relationshipsService, healthService, logger) httpServer := server.NewHTTPServer(confServer, relationshipsService, healthService, logger) diff --git a/internal/service/relationships.go b/internal/service/relationships.go index 60a9738..511595a 100644 --- a/internal/service/relationships.go +++ b/internal/service/relationships.go @@ -17,8 +17,13 @@ type RelationshipsService struct { log *log.Helper } -func NewRelationshipsService(logger log.Logger, createUseCase *biz.CreateRelationshipsUsecase) *RelationshipsService { - return &RelationshipsService{log: log.NewHelper(logger), createUsecase: createUseCase} +func NewRelationshipsService(logger log.Logger, createUseCase *biz.CreateRelationshipsUsecase, readUsecase *biz.ReadRelationshipsUsecase, deleteUsecase *biz.DeleteRelationshipsUsecase) *RelationshipsService { + return &RelationshipsService{ + log: log.NewHelper(logger), + createUsecase: createUseCase, + readUsecase: readUsecase, + deleteUsecase: deleteUsecase, + } } func (s *RelationshipsService) CreateRelationships(ctx context.Context, req *pb.CreateRelationshipsRequest) (*pb.CreateRelationshipsResponse, error) {