workspace

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaseDirectory

func CaseDirectory(key string) string

func SuiteDirectory

func SuiteDirectory(key string) string

Types

type Catalog

type Catalog struct {
	// lockPath is shared by every authored catalog rooted beside the same
	// executable. It serializes cross-file validation and the single-file
	// commit so concurrent repository instances preserve compare-and-swap semantics.
	LockPath string
	Models   interface {
		List(context.Context) ([]domain.Model, error)
		Get(context.Context, string) (domain.Model, error)
		Create(context.Context, domain.Model) error
		Update(context.Context, uint64, domain.Model) error
		Delete(context.Context, string, uint64) error
	}
	Channels interface {
		ListChannels(context.Context) ([]domain.Channel, error)
		ListMappings(context.Context) ([]domain.ChannelModel, error)
		GetChannel(context.Context, string) (domain.Channel, error)
		GetMapping(context.Context, string) (domain.ChannelModel, error)
		CreateChannel(context.Context, domain.Channel) error
		CreateChannelWithMappings(context.Context, domain.Channel, []domain.ChannelModel) error
		UpdateChannel(context.Context, uint64, domain.Channel) error
		DeleteChannel(context.Context, string, uint64) error
		CreateMapping(context.Context, domain.ChannelModel) error
		UpdateMapping(context.Context, uint64, domain.ChannelModel) error
		DeleteMapping(context.Context, string, uint64) error
	}
	Cases interface {
		Entries(context.Context) ([]casecatalog.Entry, error)
		Find(context.Context, string) (casecatalog.Entry, error)
		SaveCase(context.Context, string, string, domain.TestCase) error
		Delete(context.Context, string, uint64) error
	}
	Suites interface {
		Entries(context.Context) ([]suitecatalog.Entry, error)
		Find(context.Context, string) (suitecatalog.Entry, error)
		SaveSuite(context.Context, string, string, domain.Suite) error
		Delete(context.Context, string, uint64) error
	}
	Plans interface {
		List(context.Context) ([]domain.Plan, error)
		ListDocuments(context.Context) ([]plancatalog.Document, error)
		Get(context.Context, string) (domain.Plan, error)
		GetDocument(context.Context, string) (plancatalog.Document, error)
		Create(context.Context, domain.Plan) error
		CreateDocument(context.Context, plancatalog.Document) error
		Update(context.Context, uint64, domain.Plan) error
		UpdateDocument(context.Context, uint64, plancatalog.Document) error
		Delete(context.Context, string, uint64) error
	}
}

filesystemCatalogRepository is the complete authored-catalog boundary. It deliberately has no SQLite fallback: adding a new catalog operation must be implemented against files explicitly or it will fail to compile.

func (Catalog) CountAuthored

func (repository Catalog) CountAuthored(ctx context.Context) (cases, suites, plans int, err error)

CountAuthored uses metadata projections where available. Content is still fingerprinted so external edits and invalid overrides are noticed immediately.

func (Catalog) CreateChannel

func (repository Catalog) CreateChannel(ctx context.Context, channel domain.Channel) error

func (Catalog) CreateChannelModel

func (repository Catalog) CreateChannelModel(ctx context.Context, mapping domain.ChannelModel) error

func (Catalog) CreateChannelWithMappings

func (repository Catalog) CreateChannelWithMappings(ctx context.Context, channel domain.Channel, mappings []domain.ChannelModel) error

func (Catalog) CreateModel

func (repository Catalog) CreateModel(ctx context.Context, model domain.Model) error

func (Catalog) CreatePlan

func (repository Catalog) CreatePlan(ctx context.Context, plan domain.Plan) error

func (Catalog) CreatePlanDocument

func (repository Catalog) CreatePlanDocument(ctx context.Context, document plancatalog.Document) error

func (Catalog) CreateSuite

func (repository Catalog) CreateSuite(ctx context.Context, suite domain.Suite) error

func (Catalog) CreateTestCase

func (repository Catalog) CreateTestCase(ctx context.Context, testCase domain.TestCase) error

func (Catalog) DeleteChannel

func (repository Catalog) DeleteChannel(ctx context.Context, id string, expectedRevision uint64) error

func (Catalog) DeleteChannelModel

func (repository Catalog) DeleteChannelModel(ctx context.Context, id string, expectedRevision uint64) error

func (Catalog) DeleteModel

func (repository Catalog) DeleteModel(ctx context.Context, id string, expectedRevision uint64) error

func (Catalog) DeletePlan

func (repository Catalog) DeletePlan(ctx context.Context, id string, expectedRevision uint64) error

func (Catalog) DeleteSuite

func (repository Catalog) DeleteSuite(ctx context.Context, id string, expectedRevision uint64) error

func (Catalog) DeleteTestCase

func (repository Catalog) DeleteTestCase(ctx context.Context, id string, expectedRevision uint64) error

func (Catalog) GetChannel

func (repository Catalog) GetChannel(ctx context.Context, id string) (domain.Channel, error)

func (Catalog) GetChannelModel

func (repository Catalog) GetChannelModel(ctx context.Context, id string) (domain.ChannelModel, error)

func (Catalog) GetModel

func (repository Catalog) GetModel(ctx context.Context, id string) (domain.Model, error)

func (Catalog) GetPlan

func (repository Catalog) GetPlan(ctx context.Context, id string) (domain.Plan, error)

func (Catalog) GetPlanDocument

func (repository Catalog) GetPlanDocument(ctx context.Context, id string) (plancatalog.Document, error)

func (Catalog) GetSuite

func (repository Catalog) GetSuite(ctx context.Context, id string) (domain.Suite, error)

func (Catalog) GetTestCase

func (repository Catalog) GetTestCase(ctx context.Context, id string) (domain.TestCase, error)

func (Catalog) IsCredentialReferenced

func (repository Catalog) IsCredentialReferenced(ctx context.Context, credentialID string) (bool, error)

func (Catalog) ListChannelModels

func (repository Catalog) ListChannelModels(ctx context.Context) ([]domain.ChannelModel, error)

func (Catalog) ListChannels

func (repository Catalog) ListChannels(ctx context.Context) ([]domain.Channel, error)

func (Catalog) ListModels

func (repository Catalog) ListModels(ctx context.Context) ([]domain.Model, error)

func (Catalog) ListPlanDocuments

func (repository Catalog) ListPlanDocuments(ctx context.Context) ([]plancatalog.Document, error)

func (Catalog) ListPlans

func (repository Catalog) ListPlans(ctx context.Context) ([]domain.Plan, error)

func (Catalog) ListSuites

func (repository Catalog) ListSuites(ctx context.Context) ([]domain.Suite, error)

func (Catalog) ListTestCases

func (repository Catalog) ListTestCases(ctx context.Context) ([]domain.TestCase, error)

func (Catalog) UpdateChannel

func (repository Catalog) UpdateChannel(ctx context.Context, expectedRevision uint64, channel domain.Channel) error

func (Catalog) UpdateChannelModel

func (repository Catalog) UpdateChannelModel(ctx context.Context, expectedRevision uint64, mapping domain.ChannelModel) error

func (Catalog) UpdateModel

func (repository Catalog) UpdateModel(ctx context.Context, expectedRevision uint64, model domain.Model) error

func (Catalog) UpdatePlan

func (repository Catalog) UpdatePlan(ctx context.Context, expectedRevision uint64, plan domain.Plan) error

func (Catalog) UpdatePlanDocument

func (repository Catalog) UpdatePlanDocument(ctx context.Context, expectedRevision uint64, document plancatalog.Document) error

func (Catalog) UpdateSuite

func (repository Catalog) UpdateSuite(ctx context.Context, expectedRevision uint64, suite domain.Suite) error

func (Catalog) UpdateTestCase

func (repository Catalog) UpdateTestCase(ctx context.Context, expectedRevision uint64, testCase domain.TestCase) error

func (Catalog) WithCredentialMutation

func (repository Catalog) WithCredentialMutation(
	ctx context.Context,
	action func(context.Context) error,
) error

WithCredentialMutation holds the authored-catalog lock across the queue journal, keyring operation, and Channel file commit. The derived context lets repository methods reuse the already-held lock without self-deadlocking.

func (Catalog) WithCredentialUnreferenced

func (repository Catalog) WithCredentialUnreferenced(
	ctx context.Context,
	credentialID string,
	action func() error,
) (bool, error)

type Runtime

type Runtime struct {
	*sqlite.Repository
	Catalog Catalog
}

filesystemRuntimeRepository resolves authored configuration from files and delegates only operational Run/Result/Report persistence to SQLite.

func (Runtime) GetPlan

func (repository Runtime) GetPlan(ctx context.Context, id string) (domain.Plan, error)

func (Runtime) GetPlanRevision

func (repository Runtime) GetPlanRevision(ctx context.Context, id string, revision uint64) (domain.Plan, error)

func (Runtime) GetSuite

func (repository Runtime) GetSuite(ctx context.Context, id string) (domain.Suite, error)

func (Runtime) GetTestCase

func (repository Runtime) GetTestCase(ctx context.Context, id string) (domain.TestCase, error)

func (Runtime) ListPlans

func (repository Runtime) ListPlans(ctx context.Context) ([]domain.Plan, error)

func (Runtime) ListSuites

func (repository Runtime) ListSuites(ctx context.Context) ([]domain.Suite, error)

func (Runtime) ListTestCases

func (repository Runtime) ListTestCases(ctx context.Context) ([]domain.TestCase, error)

func (Runtime) ResolvePlanTargetSelection

func (repository Runtime) ResolvePlanTargetSelection(
	ctx context.Context,
	plan domain.Plan,
	modelID string,
	channelID string,
) (domain.Model, domain.Channel, domain.ChannelModel, error)

Jump to

Keyboard shortcuts

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