Documentation
¶
Overview ¶
Package livingid builds and parses stable resource URNs used by living Sagas.
Index ¶
- func Build(reference Reference) (string, error)
- func Citation(sagaID, citationID string) (string, error)
- func Contract(sagaID, contractID string) (string, error)
- func Criterion(sagaID, storyID, criterionID string) (string, error)
- func DefinitionRevision(sagaID string, parentKind Kind, parentID, revisionID string) (string, error)
- func Dependency(sagaID, dependencyID string) (string, error)
- func Design(sagaID string, kind DesignKind, designID string) (string, error)
- func Landmark(sagaID, fragmentID, landmarkID string) (string, error)
- func Relation(sagaID, relationID string) (string, error)
- func Revision(sagaID, storyID, revisionID string) (string, error)
- func Story(sagaID, storyID string) (string, error)
- func ValidID(value string) bool
- func Wave(sagaID, waveID string) (string, error)
- func WorkItem(sagaID, itemID string) (string, error)
- type DesignKind
- type Kind
- type Reference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefinitionRevision ¶
func DefinitionRevision(sagaID string, parentKind Kind, parentID, revisionID string) (string, error)
DefinitionRevision builds a stable revision URN for a story, wave, work-item, or contract definition.
func Dependency ¶
Dependency builds a stable dependency URN.
func Design ¶
func Design(sagaID string, kind DesignKind, designID string) (string, error)
Design builds a stable chapter, section, or fragment design target. Use Landmark for a landmark nested beneath a fragment.
Types ¶
type DesignKind ¶
type DesignKind string
DesignKind is the existing addressable package kind reused beneath the v3 design root.
const ( DesignChapter DesignKind = "chapter" DesignSection DesignKind = "section" DesignFragment DesignKind = "fragment" DesignLandmark DesignKind = "landmark" )
type Kind ¶
type Kind string
Kind identifies a living-Saga resource class. Design targets keep their existing chapter, section, fragment, or landmark spelling in the URN while parsing to KindDesign.
const ( KindStory Kind = "story" KindCriterion Kind = "criterion" KindRevision Kind = "revision" KindCitation Kind = "citation" KindRelation Kind = "relation" KindDesign Kind = "design" KindWave Kind = "wave" KindWorkItem Kind = "work-item" KindDependency Kind = "dependency" KindContract Kind = "contract" )
type Reference ¶
type Reference struct {
SagaID string
Kind Kind
ID string
ParentID string
ParentKind Kind
DesignKind DesignKind
}
Reference is the structured form of a stable living-Saga URN.
ParentID is the story ID for criteria and revisions, and the fragment ID for design landmarks. DesignKind is set only when Kind is KindDesign.