move around types for better understanding

This commit is contained in:
Robin Olsen
2026-02-12 22:06:10 +01:00
parent 18eb113f71
commit 7dc6420854

View File

@@ -4,26 +4,14 @@ import (
"context"
"github.com/LazyBachelor/LazyPM/internal/service"
tea "github.com/charmbracelet/bubbletea"
)
type TaskConfig = service.Config
type Interface interface {
Run(context.Context, service.Config) error
Run(context.Context, TaskConfig) error
}
type ConfigFunc func() TaskConfig
type ValidateFunc func(context.Context, *service.Services) (ok bool, err error)
type DbStateFunc func(context.Context, *service.Services) error
type Task struct {
interfaceType Interface
aboutScreen tea.Model
questionnaire tea.Model
validateFunc ValidateFunc
dbStateFunc DbStateFunc
}
type TaskList struct {
Todo []*Task
Done []*Task
}