35 lines
823 B
Go
35 lines
823 B
Go
// Code generated by Wire. DO NOT EDIT.
|
|
|
|
//go:generate wire
|
|
//+build !wireinject
|
|
|
|
package handler
|
|
|
|
import (
|
|
"github.com/ollien/updown/config"
|
|
"github.com/ollien/updown/repository"
|
|
)
|
|
|
|
// Injectors from wire_stubs.go:
|
|
|
|
func initPasteService() *PasteService {
|
|
configConfig := config.Get()
|
|
databaseConnector := repository.GetConnector()
|
|
pasteRepository := providePasteRepository(databaseConnector)
|
|
pasteService := providePasteService(configConfig, pasteRepository)
|
|
return pasteService
|
|
}
|
|
|
|
// wire_stubs.go:
|
|
|
|
func providePasteService(appConfig config.Config, repo repository.PasteRepository) *PasteService {
|
|
return &PasteService{
|
|
db: repo,
|
|
pasteDir: appConfig.StoragePath,
|
|
}
|
|
}
|
|
|
|
func providePasteRepository(db *repository.DatabaseConnector) repository.PasteRepository {
|
|
return repository.PasteRepository(db)
|
|
}
|