mirror of
https://github.com/hay-kot/homebox.git
synced 2024-12-23 23:36:30 +00:00
2867a05c92
* use new httpkit runner * refactor out last httpkit changes * fix timeout defaults * fix wrong time input - closes #819
35 lines
844 B
Go
35 lines
844 B
Go
package main
|
|
|
|
import (
|
|
"github.com/hay-kot/homebox/backend/internal/core/services"
|
|
"github.com/hay-kot/homebox/backend/internal/core/services/reporting/eventbus"
|
|
"github.com/hay-kot/homebox/backend/internal/data/ent"
|
|
"github.com/hay-kot/homebox/backend/internal/data/repo"
|
|
"github.com/hay-kot/homebox/backend/internal/sys/config"
|
|
"github.com/hay-kot/homebox/backend/pkgs/mailer"
|
|
)
|
|
|
|
type app struct {
|
|
conf *config.Config
|
|
mailer mailer.Mailer
|
|
db *ent.Client
|
|
repos *repo.AllRepos
|
|
services *services.AllServices
|
|
bus *eventbus.EventBus
|
|
}
|
|
|
|
func new(conf *config.Config) *app {
|
|
s := &app{
|
|
conf: conf,
|
|
}
|
|
|
|
s.mailer = mailer.Mailer{
|
|
Host: s.conf.Mailer.Host,
|
|
Port: s.conf.Mailer.Port,
|
|
Username: s.conf.Mailer.Username,
|
|
Password: s.conf.Mailer.Password,
|
|
From: s.conf.Mailer.From,
|
|
}
|
|
|
|
return s
|
|
}
|