Documentation
¶
Overview ¶
Package journey provides query access to Journey metadata and status.
Package journey provides query access to Journey metadata and status, including catalog loading and status-board parsing. Journeys are the acceptance specifications declared in journeys/J-*.yaml plus the dynamic delivery state in journeys/status-board.yaml.
Catalog loading is read-only: journey YAML is parsed once at startup and cached. The status-board file is consulted by introspection tools but is not authoritative — the actual delivery state lives in CI.
Index ¶
- type Catalog
- func (c *Catalog) CellJourneys(cellID string) []*metadata.JourneyMeta
- func (c *Catalog) ContractJourneys(contractID string) []*metadata.JourneyMeta
- func (c *Catalog) Count() int
- func (c *Catalog) CrossCellJourneys() []*metadata.JourneyMeta
- func (c *Catalog) Get(id string) *metadata.JourneyMeta
- func (c *Catalog) List() []*metadata.JourneyMeta
- func (c *Catalog) Status(journeyID string) *metadata.StatusBoardEntry
- func (c *Catalog) Validate(cellIDs, contractIDs map[string]struct{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog provides query access to all journeys and their status.
func NewCatalog ¶
func NewCatalog(project *metadata.ProjectMeta) *Catalog
NewCatalog creates a Catalog from parsed project metadata. A nil or zero-value ProjectMeta produces an empty but usable Catalog.
func (*Catalog) CellJourneys ¶
func (c *Catalog) CellJourneys(cellID string) []*metadata.JourneyMeta
CellJourneys returns journeys that reference the given cell ID, sorted by journey ID.
func (*Catalog) ContractJourneys ¶
func (c *Catalog) ContractJourneys(contractID string) []*metadata.JourneyMeta
ContractJourneys returns journeys that reference the given contract ID, sorted by journey ID.
func (*Catalog) CrossCellJourneys ¶
func (c *Catalog) CrossCellJourneys() []*metadata.JourneyMeta
CrossCellJourneys returns journeys that involve more than one cell, sorted by journey ID.
func (*Catalog) Get ¶
func (c *Catalog) Get(id string) *metadata.JourneyMeta
Get returns a deep copy of a journey by ID, or nil if not found.
func (*Catalog) List ¶
func (c *Catalog) List() []*metadata.JourneyMeta
List returns deep copies of all journeys sorted by ID.
func (*Catalog) Status ¶
func (c *Catalog) Status(journeyID string) *metadata.StatusBoardEntry
Status returns a copy of the status-board entry, or nil if not found.
func (*Catalog) Validate ¶
Validate checks that every cell and contract referenced by journeys in this catalog actually exists in the provided sets. It returns an error (with code ErrReferenceBroken) listing all broken references, or nil if all references are valid.
cellIDs and contractIDs are the known-good identifiers from the project registry. Passing nil sets is equivalent to passing empty sets.