service

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCoreMemoryService

func NewCoreMemoryService(logger logging.Logger, planner interfaces.TaskPlanner) interfaces.TaskService

NewCoreMemoryService creates a new in-memory service for core tasks

Types

type CoreMemoryService

type CoreMemoryService struct {
	// contains filtered or unexported fields
}

CoreMemoryService implements the interfaces.TaskService interface with in-memory storage

func (*CoreMemoryService) AddTaskLog

func (s *CoreMemoryService) AddTaskLog(ctx context.Context, taskID string, message string, level string) error

AddTaskLog adds a log entry to a task

func (*CoreMemoryService) ApproveTaskPlan

func (s *CoreMemoryService) ApproveTaskPlan(ctx context.Context, taskID string, reqObj interface{}) (interface{}, error)

ApproveTaskPlan approves or rejects a task plan

func (*CoreMemoryService) CreateTask

func (s *CoreMemoryService) CreateTask(ctx context.Context, reqObj interface{}) (interface{}, error)

CreateTask creates a new task

func (*CoreMemoryService) GetTask

func (s *CoreMemoryService) GetTask(ctx context.Context, taskID string) (interface{}, error)

GetTask gets a task by ID

func (*CoreMemoryService) GetTaskLogs

func (s *CoreMemoryService) GetTaskLogs(ctx context.Context, taskID string) ([]*core.Log, error)

GetTaskLogs returns all logs for a task

func (*CoreMemoryService) ListTasks

func (s *CoreMemoryService) ListTasks(ctx context.Context, filterObj interface{}) ([]interface{}, error)

ListTasks returns tasks based on the filter

func (*CoreMemoryService) UpdateTask

func (s *CoreMemoryService) UpdateTask(ctx context.Context, taskID string, updatesObj interface{}) (interface{}, error)

UpdateTask updates a task

type InMemoryTaskService

type InMemoryTaskService struct {
	// contains filtered or unexported fields
}

InMemoryTaskService implements the Service interface with an in-memory storage

func NewInMemoryTaskService

func NewInMemoryTaskService(logger logging.Logger, planner interfaces.TaskPlanner, executor interfaces.TaskExecutor) *InMemoryTaskService

NewInMemoryTaskService creates a new in-memory task service

func (*InMemoryTaskService) AddTaskLog

func (s *InMemoryTaskService) AddTaskLog(ctx context.Context, taskID string, message string, level string) error

AddTaskLog adds a log entry to a task

func (*InMemoryTaskService) ApproveTaskPlan

func (s *InMemoryTaskService) ApproveTaskPlan(ctx context.Context, taskID string, req task.ApproveTaskPlanRequest) (*task.Task, error)

ApproveTaskPlan approves or rejects a task plan

func (*InMemoryTaskService) CreateTask

CreateTask creates a new task

func (*InMemoryTaskService) GetTask

func (s *InMemoryTaskService) GetTask(ctx context.Context, taskID string) (*task.Task, error)

GetTask gets a task by ID

func (*InMemoryTaskService) ListTasks

func (s *InMemoryTaskService) ListTasks(ctx context.Context, filter task.TaskFilter) ([]*task.Task, error)

ListTasks returns tasks filtered by the provided criteria

func (*InMemoryTaskService) UpdateTask

func (s *InMemoryTaskService) UpdateTask(ctx context.Context, taskID string, updates []task.TaskUpdate) (*task.Task, error)

UpdateTask updates an existing task with new steps or modifications

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL