Documentation
¶
Index ¶
- func CaseDirectory(key string) string
- func SuiteDirectory(key string) string
- type Catalog
- func (repository Catalog) CountAuthored(ctx context.Context) (cases, suites, plans int, err error)
- func (repository Catalog) CreateChannel(ctx context.Context, channel domain.Channel) error
- func (repository Catalog) CreateChannelModel(ctx context.Context, mapping domain.ChannelModel) error
- func (repository Catalog) CreateChannelWithMappings(ctx context.Context, channel domain.Channel, mappings []domain.ChannelModel) error
- func (repository Catalog) CreateModel(ctx context.Context, model domain.Model) error
- func (repository Catalog) CreatePlan(ctx context.Context, plan domain.Plan) error
- func (repository Catalog) CreatePlanDocument(ctx context.Context, document plancatalog.Document) error
- func (repository Catalog) CreateSuite(ctx context.Context, suite domain.Suite) error
- func (repository Catalog) CreateTestCase(ctx context.Context, testCase domain.TestCase) error
- func (repository Catalog) DeleteChannel(ctx context.Context, id string, expectedRevision uint64) error
- func (repository Catalog) DeleteChannelModel(ctx context.Context, id string, expectedRevision uint64) error
- func (repository Catalog) DeleteModel(ctx context.Context, id string, expectedRevision uint64) error
- func (repository Catalog) DeletePlan(ctx context.Context, id string, expectedRevision uint64) error
- func (repository Catalog) DeleteSuite(ctx context.Context, id string, expectedRevision uint64) error
- func (repository Catalog) DeleteTestCase(ctx context.Context, id string, expectedRevision uint64) error
- func (repository Catalog) GetChannel(ctx context.Context, id string) (domain.Channel, error)
- func (repository Catalog) GetChannelModel(ctx context.Context, id string) (domain.ChannelModel, error)
- func (repository Catalog) GetModel(ctx context.Context, id string) (domain.Model, error)
- func (repository Catalog) GetPlan(ctx context.Context, id string) (domain.Plan, error)
- func (repository Catalog) GetPlanDocument(ctx context.Context, id string) (plancatalog.Document, error)
- func (repository Catalog) GetSuite(ctx context.Context, id string) (domain.Suite, error)
- func (repository Catalog) GetTestCase(ctx context.Context, id string) (domain.TestCase, error)
- func (repository Catalog) IsCredentialReferenced(ctx context.Context, credentialID string) (bool, error)
- func (repository Catalog) ListChannelModels(ctx context.Context) ([]domain.ChannelModel, error)
- func (repository Catalog) ListChannels(ctx context.Context) ([]domain.Channel, error)
- func (repository Catalog) ListModels(ctx context.Context) ([]domain.Model, error)
- func (repository Catalog) ListPlanDocuments(ctx context.Context) ([]plancatalog.Document, error)
- func (repository Catalog) ListPlans(ctx context.Context) ([]domain.Plan, error)
- func (repository Catalog) ListSuites(ctx context.Context) ([]domain.Suite, error)
- func (repository Catalog) ListTestCases(ctx context.Context) ([]domain.TestCase, error)
- func (repository Catalog) UpdateChannel(ctx context.Context, expectedRevision uint64, channel domain.Channel) error
- func (repository Catalog) UpdateChannelModel(ctx context.Context, expectedRevision uint64, mapping domain.ChannelModel) error
- func (repository Catalog) UpdateModel(ctx context.Context, expectedRevision uint64, model domain.Model) error
- func (repository Catalog) UpdatePlan(ctx context.Context, expectedRevision uint64, plan domain.Plan) error
- func (repository Catalog) UpdatePlanDocument(ctx context.Context, expectedRevision uint64, document plancatalog.Document) error
- func (repository Catalog) UpdateSuite(ctx context.Context, expectedRevision uint64, suite domain.Suite) error
- func (repository Catalog) UpdateTestCase(ctx context.Context, expectedRevision uint64, testCase domain.TestCase) error
- func (repository Catalog) WithCredentialMutation(ctx context.Context, action func(context.Context) error) error
- func (repository Catalog) WithCredentialUnreferenced(ctx context.Context, credentialID string, action func() error) (bool, error)
- type CatalogOptions
- type Runtime
- func (repository Runtime) GetPlan(ctx context.Context, id string) (domain.Plan, error)
- func (repository Runtime) GetPlanRevision(ctx context.Context, id string, revision uint64) (domain.Plan, error)
- func (repository Runtime) GetSuite(ctx context.Context, id string) (domain.Suite, error)
- func (repository Runtime) GetTestCase(ctx context.Context, id string) (domain.TestCase, error)
- func (repository Runtime) ListPlans(ctx context.Context) ([]domain.Plan, error)
- func (repository Runtime) ListSuites(ctx context.Context) ([]domain.Suite, error)
- func (repository Runtime) ListTestCases(ctx context.Context) ([]domain.TestCase, error)
- func (repository Runtime) ResolvePlanTargetSelection(ctx context.Context, plan domain.Plan, modelID string, channelID string) (domain.Model, domain.Channel, domain.ChannelModel, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaseDirectory ¶
func SuiteDirectory ¶
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 OpenCatalog ¶ added in v0.1.5
func OpenCatalog(root string, options CatalogOptions) (Catalog, error)
OpenCatalog is shared by the desktop and the build-time preview. Opening and reading catalogs never creates user files or imports definitions into SQLite.
func (Catalog) CountAuthored ¶
CountAuthored uses metadata projections where available. Content is still fingerprinted so external edits and invalid overrides are noticed immediately.
func (Catalog) CreateChannel ¶
func (Catalog) CreateChannelModel ¶
func (Catalog) CreateChannelWithMappings ¶
func (Catalog) CreateModel ¶
func (Catalog) CreatePlan ¶
func (Catalog) CreatePlanDocument ¶
func (Catalog) CreateSuite ¶
func (Catalog) CreateTestCase ¶
func (Catalog) DeleteChannel ¶
func (Catalog) DeleteChannelModel ¶
func (Catalog) DeleteModel ¶
func (Catalog) DeletePlan ¶
func (Catalog) DeleteSuite ¶
func (Catalog) DeleteTestCase ¶
func (Catalog) GetChannel ¶
func (Catalog) GetChannelModel ¶
func (Catalog) GetPlanDocument ¶
func (Catalog) GetTestCase ¶
func (Catalog) IsCredentialReferenced ¶
func (Catalog) ListChannelModels ¶
func (Catalog) ListChannels ¶
func (Catalog) ListModels ¶
func (Catalog) ListPlanDocuments ¶
func (Catalog) ListSuites ¶
func (Catalog) ListTestCases ¶
func (Catalog) UpdateChannel ¶
func (Catalog) UpdateChannelModel ¶
func (Catalog) UpdateModel ¶
func (Catalog) UpdatePlan ¶
func (Catalog) UpdatePlanDocument ¶
func (Catalog) UpdateSuite ¶
func (Catalog) UpdateTestCase ¶
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.
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.