manual

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package manual implements the manual work item input adapter.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotSupported = errors.New("operation not supported by manual adapter")

ErrNotSupported is returned for operations not supported by the manual adapter.

Functions

This section is empty.

Types

type ManualAdapter

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

ManualAdapter implements adapter.WorkItemAdapter for manually entered work items.

func New

func New(store WorkspaceStore, workspaceID string) *ManualAdapter

New constructs a ManualAdapter.

func (*ManualAdapter) AddComment

func (a *ManualAdapter) AddComment(_ context.Context, _ string, _ string) error

AddComment is a no-op for the manual adapter.

func (*ManualAdapter) Capabilities

func (a *ManualAdapter) Capabilities() adapter.AdapterCapabilities

Capabilities returns the manual adapter's capability set.

func (*ManualAdapter) Fetch

Fetch is not supported; manual work items have no external tracker to sync from.

func (*ManualAdapter) ListSelectable

func (a *ManualAdapter) ListSelectable(_ context.Context, _ adapter.ListOpts) (*adapter.ListResult, error)

ListSelectable is not supported by the manual adapter.

func (*ManualAdapter) Name

func (a *ManualAdapter) Name() string

Name returns the adapter identifier.

func (*ManualAdapter) OnEvent

OnEvent is a no-op for the manual adapter.

func (*ManualAdapter) Resolve

Resolve converts a manual selection into a WorkItem with a stable ExternalID.

func (*ManualAdapter) UpdateState

func (a *ManualAdapter) UpdateState(_ context.Context, _ string, _ domain.TrackerState) error

UpdateState is a no-op for the manual adapter.

func (*ManualAdapter) Watch

Watch returns a closed channel; the manual adapter never auto-discovers work items.

type WorkspaceStore

type WorkspaceStore interface {
	// CountManualWorkItems returns the count of work items with source="manual"
	// and workspace_id matching the provided workspace ID.
	CountManualWorkItems(ctx context.Context, workspaceID string) (int, error)
}

WorkspaceStore provides the minimal DB access needed by ManualAdapter. It is typically satisfied by a SessionService via workItemStoreAdapter.

func NewWorkspaceStore

func NewWorkspaceStore(svc *service.SessionService, workspaceID string) WorkspaceStore

NewWorkspaceStore constructs a WorkspaceStore backed by a SessionService.

Jump to

Keyboard shortcuts

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