store

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDuplicate = errors.New("project workflow chain resource already exists")
View Source
var ErrNotFound = errors.New("project workflow chain resource not found")

Functions

This section is empty.

Types

type LadybugStore

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

func NewBootstrappedLadybugStore

func NewBootstrappedLadybugStore(ctx context.Context, graph ladybug.Graph) (*LadybugStore, error)

func NewLadybugStore

func NewLadybugStore(graph ladybug.Graph) *LadybugStore

func (*LadybugStore) CreateChainRun

func (*LadybugStore) DeleteChainRun added in v0.3.0

func (store *LadybugStore) DeleteChainRun(ctx context.Context, projectID, chainRunID string) error

DeleteChainRun permanently removes the chain run node for the given project + run id. A run belonging to a different project is not matched (the node's project_id property is part of the delete filter). Deleting an absent run is a no-op because DeleteNodes matches zero nodes. The scoped-by-project guard runs BEFORE the delete so a cross-project caller can never remove another project's node even if ids collided.

func (*LadybugStore) FindChainRunByWorkPlan

func (store *LadybugStore) FindChainRunByWorkPlan(ctx context.Context, projectID, workPlanID string) (projectworkflowchain.ChainRun, error)

func (*LadybugStore) GetChainRun

func (store *LadybugStore) GetChainRun(ctx context.Context, projectID, chainRunID string) (projectworkflowchain.ChainRun, error)

func (*LadybugStore) ListChainRuns

func (*LadybugStore) UpdateChainRun

type MemoryStore

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

func NewMemoryStore

func NewMemoryStore() *MemoryStore

func (*MemoryStore) CreateChainRun

func (*MemoryStore) DeleteChainRun added in v0.3.0

func (store *MemoryStore) DeleteChainRun(_ context.Context, projectID, chainRunID string) error

DeleteChainRun permanently removes the chain run and its plan-id index entries. Scoped by project: a run under a different project is not removed. Idempotent: deleting an absent run is a no-op.

func (*MemoryStore) FindChainRunByWorkPlan

func (store *MemoryStore) FindChainRunByWorkPlan(_ context.Context, projectID, workPlanID string) (projectworkflowchain.ChainRun, error)

func (*MemoryStore) GetChainRun

func (store *MemoryStore) GetChainRun(_ context.Context, projectID, chainRunID string) (projectworkflowchain.ChainRun, error)

func (*MemoryStore) ListChainRuns

func (*MemoryStore) UpdateChainRun

type Store

type Store interface {
	CreateChainRun(context.Context, projectworkflowchain.ChainRun) (projectworkflowchain.ChainRun, error)
	GetChainRun(context.Context, string, string) (projectworkflowchain.ChainRun, error)
	ListChainRuns(context.Context, projectworkflowchain.ChainFilter) ([]projectworkflowchain.ChainRun, error)
	UpdateChainRun(context.Context, projectworkflowchain.ChainRun) (projectworkflowchain.ChainRun, error)
	FindChainRunByWorkPlan(context.Context, string, string) (projectworkflowchain.ChainRun, error)
	// DeleteChainRun permanently removes a chain run node. It is scoped to the
	// supplied project: a run belonging to a different project is not removed.
	// Deleting an already-absent run is a safe no-op (nil error) so the call is
	// idempotent under retries.
	DeleteChainRun(context.Context, string, string) error
}

Jump to

Keyboard shortcuts

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