35 lines
867 B
Go
35 lines
867 B
Go
//go:build wireinject
|
|
// +build wireinject
|
|
|
|
// The build tag makes sure the stub is not built in the final build.
|
|
|
|
package main
|
|
|
|
import (
|
|
"github.com/go-kratos/kratos/v2"
|
|
"github.com/go-kratos/kratos/v2/log"
|
|
"github.com/google/wire"
|
|
"voucher/internal/biz"
|
|
"voucher/internal/conf"
|
|
"voucher/internal/data"
|
|
"voucher/internal/data/repositoryimpl"
|
|
"voucher/internal/data/thirdrepositoryimpl"
|
|
log2 "voucher/internal/pkg/log"
|
|
"voucher/internal/server"
|
|
"voucher/internal/service"
|
|
)
|
|
|
|
// wireApp init kratos application.
|
|
func wireApp(*conf.Bootstrap, log.Logger, *log2.AccessLogger) (*kratos.App, func(), error) {
|
|
panic(wire.Build(
|
|
server.ProviderSetServer,
|
|
service.ProviderSetService,
|
|
biz.ProviderSetBiz,
|
|
repositoryimpl.ProviderRepoImplSet,
|
|
thirdrepositoryimpl.ProviderThirdRepositoryImplSet,
|
|
data.ProviderDataSet,
|
|
log2.NewLogHelper,
|
|
newApp,
|
|
))
|
|
}
|