task

package
v0.2.34 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 8 Imported by: 0

README

Task Execution Package

The task execution package provides functionality for executing tasks synchronously and asynchronously, including API calls and Temporal workflows.

Features

  • Execute tasks synchronously and asynchronously
  • Built-in retry mechanism with configurable retry policies
  • API client for making HTTP requests
  • Temporal workflow integration
  • Task cancellation and status tracking
  • Task adapter pattern for integrating with agent-specific models

Usage

Basic Task Execution
// Create a task executor
executor := agentsdk.NewTaskExecutor()

// Register a task
executor.RegisterTask("hello", func(ctx context.Context, params interface{}) (interface{}, error) {
    name, ok := params.(string)
    if !ok {
        name = "World"
    }
    return fmt.Sprintf("Hello, %s!", name), nil
})

// Execute the task synchronously
result, err := executor.ExecuteSync(context.Background(), "hello", "John", nil)
if err != nil {
    fmt.Printf("Error: %v\n", err)
} else {
    fmt.Printf("Result: %v\n", result.Data)
}

// Execute the task asynchronously
resultChan, err := executor.ExecuteAsync(context.Background(), "hello", "Jane", nil)
if err != nil {
    fmt.Printf("Error: %v\n", err)
} else {
    result := <-resultChan
    fmt.Printf("Result: %v\n", result.Data)
}
API Task Execution
// Create an API client
apiClient := agentsdk.NewAPIClient("https://api.example.com", 10*time.Second)

// Register an API task
executor.RegisterTask("get_data", agentsdk.APITask(apiClient, task.APIRequest{
    Method: "GET",
    Path:   "/data",
    Query:  map[string]string{"limit": "10"},
}))

// Execute the API task with retry policy
timeout := 5 * time.Second
retryPolicy := &interfaces.RetryPolicy{
    MaxRetries:        3,
    InitialBackoff:    100 * time.Millisecond,
    MaxBackoff:        1 * time.Second,
    BackoffMultiplier: 2.0,
}

result, err := executor.ExecuteSync(context.Background(), "get_data", nil, &interfaces.TaskOptions{
    Timeout:     &timeout,
    RetryPolicy: retryPolicy,
})
Using the Task Adapter Pattern

The task adapter pattern allows you to use your own agent-specific models while still leveraging the SDK's task management functionality. This pattern separates the concerns of the SDK from your agent-specific implementations.

Default Implementation

The SDK provides a default implementation of the task models and adapter that you can use directly:

package main

import (
    "context"
    "fmt"
    "github.com/Ingenimax/agent-sdk-go/pkg/logging"
    "github.com/Ingenimax/agent-sdk-go/pkg/task"
)

func main() {
    ctx := context.Background()
    logger := logging.New()

    // Create the SDK task service
    sdkTaskService := task.NewInMemoryTaskService(logger, nil, nil)

    // Create the default adapter
    adapter := task.NewDefaultTaskAdapter(logger)

    // Create the agent task service with default models
    taskService := task.NewAgentTaskService(
        logger,
        sdkTaskService,
        adapter,
    )

    // Create a task using the default models
    newTask, err := taskService.CreateTask(ctx, task.DefaultCreateRequest{
        Description: "Deploy a new service",
        UserID:      "user123",
        Title:       "Service Deployment",
        TaskKind:    "deployment",
    })

    if err != nil {
        panic(err)
    }

    fmt.Printf("Created task: %s\n", newTask.ID)
}
Custom Implementation

Alternatively, you can create your own models and adapter:

// Define your agent-specific task models
type MyTask struct {
    ID          string
    Name        string
    Status      string
    CreatedAt   time.Time
    CompletedAt *time.Time
}

type MyCreateRequest struct {
    Name   string
    UserID string
}

type MyApprovalRequest struct {
    Approved bool
    Comment  string
}

type MyTaskUpdate struct {
    Type   string
    ID     string
    Status string
}

// Implement the TaskAdapter interface
type MyTaskAdapter struct {
    logger logging.Logger
}

// Create a new adapter
func NewMyTaskAdapter(logger logging.Logger) task.TaskAdapter[MyTask, MyCreateRequest, MyApprovalRequest, MyTaskUpdate] {
    return &MyTaskAdapter{
        logger: logger,
    }
}

// Implement conversion methods
func (a *MyTaskAdapter) ConvertCreateRequest(req MyCreateRequest) task.CreateTaskRequest {
    return task.CreateTaskRequest{
        Description: req.Name,
        UserID:      req.UserID,
        Metadata:    make(map[string]interface{}),
    }
}

func (a *MyTaskAdapter) ConvertApproveRequest(req MyApprovalRequest) task.ApproveTaskPlanRequest {
    return task.ApproveTaskPlanRequest{
        Approved: req.Approved,
        Feedback: req.Comment,
    }
}

func (a *MyTaskAdapter) ConvertTaskUpdates(updates []MyTaskUpdate) []task.TaskUpdate {
    sdkUpdates := make([]task.TaskUpdate, len(updates))
    for i, update := range updates {
        sdkUpdates[i] = task.TaskUpdate{
            Type:   update.Type,
            StepID: update.ID,
            Status: update.Status,
        }
    }
    return sdkUpdates
}

func (a *MyTaskAdapter) ConvertTask(sdkTask *task.Task) MyTask {
    if sdkTask == nil {
        return MyTask{}
    }

    return MyTask{
        ID:          sdkTask.ID,
        Name:        sdkTask.Description,
        Status:      string(sdkTask.Status),
        CreatedAt:   sdkTask.CreatedAt,
        CompletedAt: sdkTask.CompletedAt,
    }
}

func (a *MyTaskAdapter) ConvertTasks(sdkTasks []*task.Task) []MyTask {
    tasks := make([]MyTask, len(sdkTasks))
    for i, sdkTask := range sdkTasks {
        tasks[i] = a.ConvertTask(sdkTask)
    }
    return tasks
}

// Use the adapter with a task service
type MyTaskService struct {
    sdkService task.Service
    adapter    task.TaskAdapter[MyTask, MyCreateRequest, MyApprovalRequest, MyTaskUpdate]
}

func NewMyTaskService(sdkService task.Service, adapter task.TaskAdapter[MyTask, MyCreateRequest, MyApprovalRequest, MyTaskUpdate]) *MyTaskService {
    return &MyTaskService{
        sdkService: sdkService,
        adapter:    adapter,
    }
}

// Create a task using your own models
func (s *MyTaskService) CreateTask(ctx context.Context, req MyCreateRequest) (MyTask, error) {
    // Convert to SDK request
    sdkReq := s.adapter.ConvertCreateRequest(req)

    // Create task using SDK service
    sdkTask, err := s.sdkService.CreateTask(ctx, sdkReq)
    if err != nil {
        return MyTask{}, err
    }

    // Convert back to your model
    return s.adapter.ConvertTask(sdkTask), nil
}
Using the Agent Task Service

The SDK provides an AgentTaskService that you can use to work with your agent-specific models. It wraps the adapter service and provides a simpler interface:

// Create the agent task service
taskService := task.NewAgentTaskService(
    ctx,
    logger,
    sdkTaskService,
    myAdapter,
)

// Use the service with your agent-specific models
myTask, err := taskService.CreateTask(ctx, myCreateRequest)
if err != nil {
    // Handle error
}

// Get a task
myTask, err = taskService.GetTask(ctx, "task-123")
if err != nil {
    // Handle error
}

// List tasks for a user
myTasks, err := taskService.ListTasks(ctx, "user-456")
if err != nil {
    // Handle error
}

// Approve a task plan
myTask, err = taskService.ApproveTaskPlan(ctx, "task-123", myApproveRequest)
if err != nil {
    // Handle error
}

// Update a task
myTask, err = taskService.UpdateTask(ctx, "task-123", "conversation-789", myTaskUpdates)
if err != nil {
    // Handle error
}

// Add a log entry to a task
err = taskService.AddTaskLog(ctx, "task-123", "Starting deployment", "info")
if err != nil {
    // Handle error
}
Temporal Workflow Execution
// Create a Temporal client
temporalClient := agentsdk.NewTemporalClient(task.TemporalConfig{
    HostPort:                 "localhost:7233",
    Namespace:                "default",
    TaskQueue:                "example",
    WorkflowIDPrefix:         "example-",
    WorkflowExecutionTimeout: 10 * time.Minute,
    WorkflowRunTimeout:       5 * time.Minute,
    WorkflowTaskTimeout:      10 * time.Second,
})

// Register a Temporal workflow task
executor.RegisterTask("example_workflow", agentsdk.TemporalWorkflowTask(temporalClient, "ExampleWorkflow"))

// Execute the Temporal workflow task
result, err := executor.ExecuteSync(context.Background(), "example_workflow", map[string]interface{}{
    "input": "example input",
}, nil)

Task Options

You can configure task execution with the following options:

options := &interfaces.TaskOptions{
    // Timeout specifies the maximum duration for task execution
    Timeout: &timeout,

    // RetryPolicy specifies the retry policy for the task
    RetryPolicy: &interfaces.RetryPolicy{
        MaxRetries:        3,
        InitialBackoff:    100 * time.Millisecond,
        MaxBackoff:        1 * time.Second,
        BackoffMultiplier: 2.0,
    },

    // Metadata contains additional information for the task execution
    Metadata: map[string]interface{}{
        "purpose": "example",
    },
}

Task Result

The task result contains the following information:

type TaskResult struct {
    // Data contains the result data
    Data interface{}

    // Error contains any error that occurred during task execution
    Error error

    // Metadata contains additional information about the task execution
    Metadata map[string]interface{}
}

Task Package

The task package provides comprehensive task management functionality for agents. It includes models, interfaces, and services for creating, retrieving, and managing tasks.

Concepts

A task represents a unit of work that an agent needs to perform. Tasks have a lifecycle, starting from creation, through planning, execution, and finally completion. Each task can have multiple steps, which are executed sequentially.

Core Components

Task Model

The Task struct represents a task in the system:

type Task struct {
	ID             string                 // Unique identifier
	Description    string                 // Task description
	Status         Status                 // Current status (pending, planning, awaiting_approval, executing, completed, failed)
	Title          string                 // Task title
	TaskKind       string                 // Type of task
	ConversationID string                 // Associated conversation ID
	Plan           *Plan                  // Execution plan
	Steps          []Step                 // Task steps
	CreatedAt      time.Time              // Creation timestamp
	UpdatedAt      time.Time              // Last update timestamp
	StartedAt      *time.Time             // When execution started
	CompletedAt    *time.Time             // When execution completed
	UserID         string                 // Owner user ID
	Logs           []LogEntry             // Activity logs
	Requirements   interface{}            // Task requirements
	Feedback       string                 // User feedback
	Metadata       map[string]interface{} // Additional metadata
}
Task Service

The Service interface defines methods for interacting with tasks:

type Service interface {
	CreateTask(ctx context.Context, req CreateTaskRequest) (*Task, error)
	GetTask(ctx context.Context, taskID string) (*Task, error)
	ListTasks(ctx context.Context, filter TaskFilter) ([]*Task, error)
	ApproveTaskPlan(ctx context.Context, taskID string, req ApproveTaskPlanRequest) (*Task, error)
	UpdateTask(ctx context.Context, taskID string, updates []TaskUpdate) (*Task, error)
	AddTaskLog(ctx context.Context, taskID string, message string, level string) error
}

Task Adapter Pattern

The task package supports the adapter pattern to allow agents to work with their own domain-specific task models while leveraging the SDK's task management capabilities.

File Organization

The package is organized into the following key files:

  • models.go: Contains all the data structures used in the task package
  • service.go: Defines the core Service interface and provides both InMemoryTaskService and AgentTaskService implementations
  • adapter.go: Implements the TaskAdapter interface and AdapterService for working with agent-specific models, including the default implementation

This compact organization helps keep related functionality together while still maintaining clean separation of concerns.

TaskAdapter Interface

The TaskAdapter is a generic interface that allows you to define custom conversion methods between SDK and agent-specific models:

type TaskAdapter[AgentTask any, AgentCreateRequest any, AgentApprovalRequest any, AgentTaskUpdate any] interface {
	// ToSDK conversions (Agent -> SDK)
	ConvertCreateRequest(req AgentCreateRequest) CreateTaskRequest
	ConvertApproveRequest(req AgentApprovalRequest) ApproveTaskPlanRequest
	ConvertTaskUpdates(updates []AgentTaskUpdate) []TaskUpdate

	// FromSDK conversions (SDK -> Agent)
	ConvertTask(sdkTask *Task) AgentTask
	ConvertTasks(sdkTasks []*Task) []AgentTask
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentAdapterService added in v0.0.3

type AgentAdapterService interface {
	CreateTask(ctx context.Context, req CreateTaskRequest) (*Task, error)
	GetTask(ctx context.Context, taskID string) (*Task, error)
	ListTasks(ctx context.Context, filter TaskFilter) ([]*Task, error)
	ApproveTaskPlan(ctx context.Context, taskID string, req ApproveTaskPlanRequest) (*Task, error)
	UpdateTask(ctx context.Context, taskID string, updates []TaskUpdate) (*Task, error)
	AddTaskLog(ctx context.Context, taskID string, message string, level string) error
}

AgentAdapterService is the interface used by the AgentTaskService This is defined here to avoid import cycles

type AgentTaskAdapter added in v0.0.3

type AgentTaskAdapter interface {
	CreateTaskRequestToCore(req CreateTaskRequest) core.CreateTaskRequest
	CoreTaskToTask(coreTask *core.Task) *Task
}

AgentTaskAdapter is the interface used by the AgentTaskService to convert requests This is defined here to avoid import cycles

type AgentTaskService

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

AgentTaskService provides a complete implementation for the AgentTaskServiceInterface Agents can use this directly without additional wrapper.

func NewAgentTaskService

func NewAgentTaskService(logger logging.Logger) (*AgentTaskService, error)

NewAgentTaskService creates a new TaskService for agents

func NewAgentTaskServiceWithAdapter added in v0.0.3

func NewAgentTaskServiceWithAdapter(logger logging.Logger, service AgentAdapterService) *AgentTaskService

NewAgentTaskServiceWithAdapter creates a new TaskService for agents using a custom service adapter

func (*AgentTaskService) AddTaskStep added in v0.0.3

func (s *AgentTaskService) AddTaskStep(ctx context.Context, description string) error

AddTaskStep adds a step to the current task

func (*AgentTaskService) CreateTask

func (s *AgentTaskService) CreateTask(ctx context.Context, title, desc string, userID string, metadata map[string]interface{}) (*Task, error)

CreateTask creates a new task with the given parameters

func (*AgentTaskService) CurrentTask added in v0.0.3

func (s *AgentTaskService) CurrentTask() *Task

CurrentTask returns the current task being worked on, if any

func (*AgentTaskService) FormatTaskProgress added in v0.0.3

func (s *AgentTaskService) FormatTaskProgress() string

FormatTaskProgress formats a string with the task progress

func (*AgentTaskService) GetTask

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

GetTask gets a task by ID

func (*AgentTaskService) ListTasks

func (s *AgentTaskService) ListTasks(ctx context.Context, userID string) ([]*Task, error)

ListTasks returns all tasks for the current user

func (*AgentTaskService) LogTaskDebug added in v0.0.3

func (s *AgentTaskService) LogTaskDebug(ctx context.Context, message string) error

LogTaskDebug adds a debug log entry to the current task

func (*AgentTaskService) LogTaskError added in v0.0.3

func (s *AgentTaskService) LogTaskError(ctx context.Context, message string) error

LogTaskError adds an error log entry to the current task

func (*AgentTaskService) LogTaskInfo added in v0.0.3

func (s *AgentTaskService) LogTaskInfo(ctx context.Context, message string) error

LogTaskInfo adds an info log entry to the current task

func (*AgentTaskService) ResetCurrentTask added in v0.0.3

func (s *AgentTaskService) ResetCurrentTask()

ResetCurrentTask clears the current task

func (*AgentTaskService) StartTask added in v0.0.3

func (s *AgentTaskService) StartTask(ctx context.Context, taskID string) (*Task, error)

StartTask sets the current task to a specific task ID

func (*AgentTaskService) UpdateTaskStatus added in v0.0.3

func (s *AgentTaskService) UpdateTaskStatus(ctx context.Context, status Status) error

UpdateTaskStatus updates the status of the current task

func (*AgentTaskService) UpdateTaskStep added in v0.0.3

func (s *AgentTaskService) UpdateTaskStep(ctx context.Context, stepID string, status Status, output string, err error) error

UpdateTaskStep updates a step in the current task

type ApproveTaskPlanRequest

type ApproveTaskPlanRequest struct {
	Approved bool   `json:"approved"`
	Feedback string `json:"feedback,omitempty"`
}

ApproveTaskPlanRequest represents the request to approve a task plan

type CreateTaskRequest

type CreateTaskRequest struct {
	Description string                 `json:"description"`
	UserID      string                 `json:"user_id"`
	Title       string                 `json:"title,omitempty"`
	TaskKind    string                 `json:"task_kind,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

CreateTaskRequest represents the request to create a new task

type LogEntry

type LogEntry struct {
	ID        string    `json:"id"`
	TaskID    string    `json:"task_id"`
	StepID    string    `json:"step_id,omitempty"` // Optional reference to a specific step
	Message   string    `json:"message"`
	Level     string    `json:"level"` // info, warning, error
	Timestamp time.Time `json:"timestamp"`
}

LogEntry represents a log entry for a task

type Plan

type Plan struct {
	ID         string     `json:"id"`
	TaskID     string     `json:"task_id"`
	Steps      []Step     `json:"steps"`
	CreatedAt  time.Time  `json:"created_at"`
	ApprovedAt *time.Time `json:"approved_at,omitempty"`
	IsApproved bool       `json:"is_approved"`
}

Plan represents the execution plan for a task

type SimpleBridgeAdapter added in v0.0.3

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

SimpleBridgeAdapter implements AgentAdapterService

func (*SimpleBridgeAdapter) AddTaskLog added in v0.0.3

func (a *SimpleBridgeAdapter) AddTaskLog(ctx context.Context, taskID string, message string, level string) error

AddTaskLog adds a log to a task

func (*SimpleBridgeAdapter) ApproveTaskPlan added in v0.0.3

func (a *SimpleBridgeAdapter) ApproveTaskPlan(ctx context.Context, taskID string, req ApproveTaskPlanRequest) (*Task, error)

ApproveTaskPlan approves or rejects a plan

func (*SimpleBridgeAdapter) CreateTask added in v0.0.3

func (a *SimpleBridgeAdapter) CreateTask(ctx context.Context, req CreateTaskRequest) (*Task, error)

CreateTask creates a task using the core service

func (*SimpleBridgeAdapter) GetTask added in v0.0.3

func (a *SimpleBridgeAdapter) GetTask(ctx context.Context, taskID string) (*Task, error)

GetTask gets a task by ID

func (*SimpleBridgeAdapter) ListTasks added in v0.0.3

func (a *SimpleBridgeAdapter) ListTasks(ctx context.Context, filter TaskFilter) ([]*Task, error)

ListTasks returns tasks based on filter

func (*SimpleBridgeAdapter) UpdateTask added in v0.0.3

func (a *SimpleBridgeAdapter) UpdateTask(ctx context.Context, taskID string, updates []TaskUpdate) (*Task, error)

UpdateTask updates a task

type SimpleExecutor added in v0.0.3

type SimpleExecutor struct{}

SimpleExecutor implements TaskExecutor with minimal functionality

func (*SimpleExecutor) ExecuteStep added in v0.0.3

func (e *SimpleExecutor) ExecuteStep(ctx context.Context, task *Task, step *Step) error

ExecuteStep implements TaskExecutor.ExecuteStep

func (*SimpleExecutor) ExecuteTask added in v0.0.3

func (e *SimpleExecutor) ExecuteTask(ctx context.Context, task *Task) error

ExecuteTask implements TaskExecutor.ExecuteTask

type SimpleMemoryService added in v0.0.3

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

SimpleMemoryService implements interfaces.TaskService

func (*SimpleMemoryService) AddTaskLog added in v0.0.3

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

AddTaskLog adds a log to a task

func (*SimpleMemoryService) ApproveTaskPlan added in v0.0.3

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

ApproveTaskPlan approves or rejects a plan

func (*SimpleMemoryService) CreateTask added in v0.0.3

func (s *SimpleMemoryService) CreateTask(ctx context.Context, req interface{}) (interface{}, error)

CreateTask creates a new task

func (*SimpleMemoryService) GetTask added in v0.0.3

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

GetTask gets a task by ID

func (*SimpleMemoryService) ListTasks added in v0.0.3

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

ListTasks returns tasks filtered by criteria

func (*SimpleMemoryService) UpdateTask added in v0.0.3

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

UpdateTask updates a task

type SimplePlanner added in v0.0.3

type SimplePlanner struct{}

SimplePlanner implements TaskPlanner with minimal functionality

func (*SimplePlanner) CreatePlan added in v0.0.3

func (p *SimplePlanner) CreatePlan(ctx context.Context, task *Task) (string, error)

CreatePlan implements TaskPlanner.CreatePlan

type SimplePlannerCore added in v0.0.3

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

SimplePlannerCore implements interfaces.TaskPlanner

func (*SimplePlannerCore) CreatePlan added in v0.0.3

func (p *SimplePlannerCore) CreatePlan(ctx context.Context, task interface{}) (string, error)

CreatePlan creates a simple plan

type Status

type Status string

Status represents the current status of a task or step

const (
	StatusPending   Status = "pending"
	StatusPlanning  Status = "planning"
	StatusApproval  Status = "awaiting_approval"
	StatusExecuting Status = "executing"
	StatusCompleted Status = "completed"
	StatusFailed    Status = "failed"
)

Task statuses

const (
	StepStatusPending   Status = "pending"
	StepStatusExecuting Status = "executing"
	StepStatusCompleted Status = "completed"
	StepStatusFailed    Status = "failed"
)

Step statuses

type Step

type Step struct {
	ID          string                 `json:"id"`
	PlanID      string                 `json:"plan_id"`
	Description string                 `json:"description"`
	Status      Status                 `json:"status"`
	Order       int                    `json:"order"`
	StartedAt   *time.Time             `json:"started_at,omitempty"`
	CompletedAt *time.Time             `json:"completed_at,omitempty"`
	Error       string                 `json:"error,omitempty"`
	Output      string                 `json:"output,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

Step represents a single step in an execution plan

type Task

type Task struct {
	ID             string                 `json:"id"`
	Description    string                 `json:"description"`
	Status         Status                 `json:"status"`
	Title          string                 `json:"title,omitempty"`
	TaskKind       string                 `json:"task_kind,omitempty"`
	ConversationID string                 `json:"conversation_id,omitempty"`
	Plan           *Plan                  `json:"plan,omitempty"`
	Steps          []Step                 `json:"steps,omitempty"` // Direct access to steps
	CreatedAt      time.Time              `json:"created_at"`
	UpdatedAt      time.Time              `json:"updated_at"`
	StartedAt      *time.Time             `json:"started_at,omitempty"`
	CompletedAt    *time.Time             `json:"completed_at,omitempty"`
	UserID         string                 `json:"user_id"`
	Logs           []LogEntry             `json:"logs,omitempty"`
	Requirements   interface{}            `json:"requirements,omitempty"` // JSON of TaskRequirements
	Feedback       string                 `json:"feedback,omitempty"`
	Metadata       map[string]interface{} `json:"metadata,omitempty"` // For extensibility
}

Task represents an infrastructure task to be executed

type TaskFilter

type TaskFilter struct {
	UserID         string     `json:"user_id,omitempty"`
	ConversationID string     `json:"conversation_id,omitempty"`
	Status         []Status   `json:"status,omitempty"`
	TaskKind       string     `json:"task_kind,omitempty"`
	CreatedAfter   *time.Time `json:"created_after,omitempty"`
	CreatedBefore  *time.Time `json:"created_before,omitempty"`
}

TaskFilter represents filters for querying tasks

type TaskUpdate

type TaskUpdate struct {
	Type        string `json:"type"` // add_step, modify_step, remove_step, add_comment, update_status
	StepID      string `json:"step_id,omitempty"`
	Description string `json:"description,omitempty"`
	Status      string `json:"status,omitempty"`
}

TaskUpdate represents an update to a task

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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