lots of changes and reducing dependency imports

This commit is contained in:
Robin Olsen
2026-02-28 16:39:50 +01:00
parent 697b17e890
commit ba0115d1bc
54 changed files with 458 additions and 327 deletions

View File

@@ -9,17 +9,18 @@ import (
"strings"
"time"
"github.com/LazyBachelor/LazyPM/internal/models"
"github.com/LazyBachelor/LazyPM/internal/service"
"github.com/LazyBachelor/LazyPM/internal/utils"
"github.com/LazyBachelor/LazyPM/pkg/task"
"github.com/LazyBachelor/LazyPM/pkg/web/handler"
"github.com/LazyBachelor/LazyPM/pkg/web/server"
)
type Config = service.Config
type Config = models.Config
type ValidationFeedback = models.ValidationFeedback
type Web struct {
feedbackChan chan task.ValidationFeedback
feedbackChan chan ValidationFeedback
quitChan chan bool
}
@@ -31,7 +32,7 @@ func NewWeb() *Web {
var assets embed.FS
func (w *Web) Run(ctx context.Context, config Config) error {
app, cleanup, err := service.NewServices(ctx, config)
app, cleanup, err := service.NewApp(ctx, config)
if err != nil {
return err
}
@@ -84,7 +85,7 @@ func (w *Web) Run(ctx context.Context, config Config) error {
}
}
func (w *Web) SetChannels(feedbackChan chan task.ValidationFeedback, quitChan chan bool) {
func (w *Web) SetChannels(feedbackChan chan ValidationFeedback, quitChan chan bool) {
w.feedbackChan = feedbackChan
w.quitChan = quitChan
}