// Code generated by Wire. DO NOT EDIT.

//go:generate go run github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject

package main

import (
	"context"
	"github.com/go-kratos/kratos/v2"
	"github.com/luminosita/common-bee/pkg/log"
	documents2 "github.com/luminosita/docrepo-bee/internal/app/documents"
	"github.com/luminosita/docrepo-bee/internal/conf"
	"github.com/luminosita/docrepo-bee/internal/data/db/mongodb"
	"github.com/luminosita/docrepo-bee/internal/data/db/mongodb/documents"
	"github.com/luminosita/docrepo-bee/internal/server"
	"github.com/luminosita/docrepo-bee/internal/service"
)

import (
	_ "go.uber.org/automaxprocs"
)

// Injectors from wire.go:

// wireApp init kratos application.
func wireApp(contextContext context.Context, confServer *conf.Server, data *conf.Data, logger log.Logger) (*kratos.App, func(), error) {
	mongodbData, cleanup := mongodb.NewData(contextContext, data)
	getDocumentInfoRepository := documents.NewGetDocumentInfoRepository(contextContext, mongodbData)
	getDocumentInfo := documents2.NewGetDocumentInfo(getDocumentInfoRepository)
	getDocumentRepository := documents.NewGetDocumentRepository(contextContext, mongodbData)
	getDocument := documents2.NewGetDocument(getDocumentRepository)
	putDocumentRepository := documents.NewPutDocumentRepository(contextContext, mongodbData)
	putDocument := documents2.NewPutDocument(putDocumentRepository)
	serviceDocuments := service.NewDocumentsServer(getDocumentInfo, getDocument, putDocument)
	grpcServer := server.NewGRPCServer(confServer, serviceDocuments)
	httpServer := server.NewHTTPServer(confServer, serviceDocuments)
	app := newApp(logger, grpcServer, httpServer)
	return app, func() {
		cleanup()
	}, nil
}
