Documentation
¶
Overview ¶
Package manual implements the manual work item input adapter.
Index ¶
- Variables
- type ManualAdapter
- func (a *ManualAdapter) AddComment(_ context.Context, _ string, _ string) error
- func (a *ManualAdapter) Capabilities() adapter.AdapterCapabilities
- func (a *ManualAdapter) Fetch(_ context.Context, _ string) (domain.Session, error)
- func (a *ManualAdapter) ListSelectable(_ context.Context, _ adapter.ListOpts) (*adapter.ListResult, error)
- func (a *ManualAdapter) Name() string
- func (a *ManualAdapter) OnEvent(_ context.Context, _ domain.SystemEvent) error
- func (a *ManualAdapter) Resolve(ctx context.Context, sel adapter.Selection) (domain.Session, error)
- func (a *ManualAdapter) UpdateState(_ context.Context, _ string, _ domain.TrackerState) error
- func (a *ManualAdapter) Watch(_ context.Context, _ adapter.WorkItemFilter) (<-chan adapter.WorkItemEvent, error)
- type WorkspaceStore
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 ¶
func (a *ManualAdapter) OnEvent(_ context.Context, _ domain.SystemEvent) error
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 ¶
func (a *ManualAdapter) Watch(_ context.Context, _ adapter.WorkItemFilter) (<-chan adapter.WorkItemEvent, error)
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.