refactor(services): Move staticservice to struct and interface

This commit is contained in:
2024-12-12 17:11:59 +01:00
parent 2a4f126377
commit b9e550d6f5
7 changed files with 23 additions and 12 deletions

View File

@@ -74,11 +74,14 @@ func main() {
}
barcodeGenerator := &services.DefaultBarcodeService{}
staticService := &services.DefaultStaticService{}
handler := handlers.DefaultHandler{
Config: config,
BarcodeService: barcodeGenerator,
StaticService: staticService,
Templater: &services.DefaultTemplater{
BarcodeService: barcodeGenerator,
StaticService: staticService,
},
Converter: &services.GotenbergConverter{
BaseUrl: config.GotenbergBaseUrl,