diff --git a/cmd/survey/init.go b/cmd/survey/init.go new file mode 100644 index 0000000..84f7609 --- /dev/null +++ b/cmd/survey/init.go @@ -0,0 +1,32 @@ +package main + +import ( + "context" + + "github.com/LazyBachelor/LazyPM/cmd/survey/tasks" + "github.com/LazyBachelor/LazyPM/internal/service" + "github.com/LazyBachelor/LazyPM/pkg/cli/repl" + "github.com/LazyBachelor/LazyPM/pkg/tui" + "github.com/LazyBachelor/LazyPM/pkg/web" +) + +func initializeServices(ctx context.Context) (*service.Services, func(), error) { + config := service.Config{ + IssuePrefix: "pm", + BeadsDBPath: "./.pm/db.db", + StatisticsStoragePath: "./.pm/stats.json", + WebAddress: "localhost:8080", + } + return service.NewServices(ctx, config) +} + +func initTasks() []*tasks.Task { + return []*tasks.Task{ + tasks.NewCreateIssueTask(), + tasks.NewCreateIssueTask(), + } +} + +func initInterfaces() []tasks.Interface { + return []tasks.Interface{repl.NewRepl(), tui.NewTui(), web.NewWeb()} +}