Documentation
¶
Index ¶
- Constants
- func DeriveRequirementTags(gherkin string) ([]string, error)
- func DeriveRequirementTitle(gherkin string) (string, error)
- func ExpectedDeltaID(n int) string
- func ExpectedReqID(n int) string
- func ExtractGherkinTags(line string) []string
- func IsValidDeltaID(id string) bool
- func IsValidDeltaIntent(intent string) bool
- func IsValidDeltaStatus(s string) bool
- func IsValidReqID(id string) bool
- func IsValidSpecStatus(s string) bool
- func LenientCharterOrder(charter *Charter) map[string]int
- func MissingRequirementTags(tags []string, configured []string) []string
- func NextDeltaID(deltas []Delta) (string, error)
- func NextRequirementID(requirements []Requirement) (string, error)
- func NormalizeRepoDir(value string) (string, error)
- func NormalizeRepoPath(value string) (string, error)
- func NormalizeRequirementBlock(gherkin string) (string, error)
- func ParseDeltaIDNumber(id string) (int, error)
- func ParseReqIDNumber(id string) (int, error)
- func ScopeMatchesPath(scopePrefix, candidate string) bool
- func ScopesOverlap(a, b string) bool
- func SemanticRequirementTags() []string
- func ValidateDeltaSequence(deltas []Delta) error
- func ValidateRequirementSequence(requirements []Requirement) error
- func ValidateRequirementTagsConfigured(tags []string, configured []string) error
- func ValidateStoredRepoDirPath(value string) error
- func ValidateStoredRepoFilePath(value string) error
- type ChangelogEntry
- type Charter
- func (c *Charter) EnsureGroup(group CharterGroup) error
- func (c *Charter) ExtraTrackingSpecs(trackingSlugs []string) []string
- func (c *Charter) GroupByKey(key string) *CharterGroup
- func (c *Charter) MissingTrackingSpecs(trackingSlugs []string) []string
- func (c *Charter) OrderedSpecs() ([]CharterSpecEntry, error)
- func (c *Charter) ReplaceSpecEntry(entry CharterSpecEntry) error
- func (c *Charter) SpecBySlug(slug string) *CharterSpecEntry
- func (c *Charter) Validate() error
- type CharterCycleError
- type CharterGroup
- type CharterSpecEntry
- type CharterValidationError
- type Delta
- type DeltaIntent
- type DeltaStatus
- type Documents
- type LenientCharterOrdering
- type Requirement
- func (r Requirement) EffectiveLifecycle() RequirementLifecycle
- func (r Requirement) EffectiveVerification() RequirementVerification
- func (r Requirement) HasTag(tag string) bool
- func (r Requirement) IsActive() bool
- func (r Requirement) IsE2E() bool
- func (r Requirement) IsManual() bool
- func (r Requirement) IsVerified() bool
- type RequirementLifecycle
- type RequirementVerification
- type SpecStatus
- type TrackingFile
- func (t *TrackingFile) AllocateNextDeltaID() (string, error)
- func (t *TrackingFile) AllocateNextRequirementID() (string, error)
- func (t *TrackingFile) BlockingRequirementsForDeltaClosure(deltaID string) ([]Requirement, error)
- func (t *TrackingFile) ComputedStatus() SpecStatus
- func (t *TrackingFile) DeltaByID(id string) *Delta
- func (t *TrackingFile) DeltaUpdatesResolved(deltaID string) bool
- func (t *TrackingFile) DeltasTouchingRequirement(requirementID string) []string
- func (t *TrackingFile) LiveDeltas() []Delta
- func (t *TrackingFile) RequirementByID(id string) *Requirement
- func (t *TrackingFile) RequirementsTouchedByDelta(delta Delta) []Requirement
- func (t *TrackingFile) SyncComputedStatus()
- func (t *TrackingFile) TracingRequirements(deltaID string) []Requirement
- func (t *TrackingFile) Validate() error
- func (t *TrackingFile) ValidateDeltaClosure(deltaID string) error
Constants ¶
View Source
const ( DeltaStatusOpen DeltaStatus = "open" DeltaStatusInProgress DeltaStatus = "in-progress" DeltaStatusClosed DeltaStatus = "closed" DeltaStatusDeferred DeltaStatus = "deferred" DeltaStatusWithdrawn DeltaStatus = "withdrawn" DeltaIntentAdd DeltaIntent = "add" DeltaIntentChange DeltaIntent = "change" DeltaIntentRemove DeltaIntent = "remove" DeltaIntentRepair DeltaIntent = "repair" )
Variables ¶
This section is empty.
Functions ¶
func DeriveRequirementTags ¶
func DeriveRequirementTitle ¶
func ExpectedDeltaID ¶
func ExpectedReqID ¶
func ExtractGherkinTags ¶
func IsValidDeltaID ¶
func IsValidDeltaIntent ¶
func IsValidDeltaStatus ¶
func IsValidReqID ¶
func IsValidSpecStatus ¶
func LenientCharterOrder ¶
func MissingRequirementTags ¶
func NextDeltaID ¶
func NextRequirementID ¶
func NextRequirementID(requirements []Requirement) (string, error)
func NormalizeRepoDir ¶
func NormalizeRepoPath ¶
func ParseDeltaIDNumber ¶
func ParseReqIDNumber ¶
func ScopeMatchesPath ¶
func ScopesOverlap ¶
func SemanticRequirementTags ¶
func SemanticRequirementTags() []string
func ValidateDeltaSequence ¶
func ValidateRequirementSequence ¶
func ValidateRequirementSequence(requirements []Requirement) error
Types ¶
type ChangelogEntry ¶
type ChangelogEntry struct {
Rev int `yaml:"rev" json:"rev"`
Date string `yaml:"date" json:"date"`
DeltasOpened []string `yaml:"deltas_opened" json:"deltas_opened"`
DeltasClosed []string `yaml:"deltas_closed" json:"deltas_closed"`
DeltasWithdrawn []string `yaml:"deltas_withdrawn,omitempty" json:"deltas_withdrawn,omitempty"`
ReqsAdded []string `yaml:"reqs_added" json:"reqs_added"`
ReqsVerified []string `yaml:"reqs_verified" json:"reqs_verified"`
Summary string `yaml:"summary" json:"summary"`
}
type Charter ¶
type Charter struct {
Name string `yaml:"name"`
Title string `yaml:"title"`
Description string `yaml:"description"`
Groups []CharterGroup `yaml:"groups"`
Specs []CharterSpecEntry `yaml:"specs"`
DirPath string `yaml:"-"`
}
func (*Charter) EnsureGroup ¶
func (c *Charter) EnsureGroup(group CharterGroup) error
func (*Charter) ExtraTrackingSpecs ¶
func (*Charter) GroupByKey ¶
func (c *Charter) GroupByKey(key string) *CharterGroup
func (*Charter) MissingTrackingSpecs ¶
func (*Charter) OrderedSpecs ¶
func (c *Charter) OrderedSpecs() ([]CharterSpecEntry, error)
func (*Charter) ReplaceSpecEntry ¶
func (c *Charter) ReplaceSpecEntry(entry CharterSpecEntry) error
func (*Charter) SpecBySlug ¶
func (c *Charter) SpecBySlug(slug string) *CharterSpecEntry
type CharterCycleError ¶
type CharterCycleError struct {
Slugs []string
}
func (*CharterCycleError) Error ¶
func (e *CharterCycleError) Error() string
type CharterGroup ¶
type CharterSpecEntry ¶
type CharterSpecEntry struct {
Slug string `yaml:"slug" json:"slug"`
Group string `yaml:"group" json:"group"`
Order int `yaml:"order" json:"order"`
DependsOn []string `yaml:"depends_on" json:"depends_on"`
Notes string `yaml:"notes" json:"notes"`
}
func NewCharterSpecEntry ¶
func OrderedCharterSpecsLenient ¶
func OrderedCharterSpecsLenient(charter *Charter) []CharterSpecEntry
type CharterValidationError ¶
type CharterValidationError struct {
Messages []string
}
func (*CharterValidationError) Error ¶
func (e *CharterValidationError) Error() string
type Delta ¶
type Delta struct {
ID string `yaml:"id" json:"id"`
Area string `yaml:"area" json:"area"`
Intent DeltaIntent `yaml:"intent,omitempty" json:"intent,omitempty"`
Status DeltaStatus `yaml:"status" json:"status"`
OriginCheckpoint string `yaml:"origin_checkpoint" json:"origin_checkpoint"`
Current string `yaml:"current" json:"current"`
Target string `yaml:"target" json:"target"`
Notes string `yaml:"notes" json:"notes"`
AffectsRequirements []string `yaml:"affects_requirements,omitempty" json:"affects_requirements,omitempty"`
Updates []string `yaml:"updates,omitempty" json:"updates,omitempty"`
WithdrawnReason string `yaml:"withdrawn_reason,omitempty" json:"withdrawn_reason,omitempty"`
}
type DeltaIntent ¶
type DeltaIntent string
type DeltaStatus ¶
type DeltaStatus string
type LenientCharterOrdering ¶
type LenientCharterOrdering struct {
Specs []CharterSpecEntry
Index map[string]int
}
func BuildLenientCharterOrdering ¶
func BuildLenientCharterOrdering(charter *Charter) LenientCharterOrdering
type Requirement ¶
type Requirement struct {
ID string `yaml:"id" json:"id"`
Title string `yaml:"title" json:"title"`
Traces []string `yaml:"-" json:"-"`
Tags []string `yaml:"tags" json:"tags"`
TestFiles []string `yaml:"test_files" json:"test_files"`
Verified bool `yaml:"-" json:"-"`
Gherkin string `yaml:"gherkin" json:"gherkin"`
Lifecycle RequirementLifecycle `yaml:"lifecycle,omitempty" json:"lifecycle,omitempty"`
Verification RequirementVerification `yaml:"verification,omitempty" json:"verification,omitempty"`
IntroducedBy string `yaml:"introduced_by,omitempty" json:"introduced_by,omitempty"`
Supersedes string `yaml:"supersedes,omitempty" json:"supersedes,omitempty"`
SupersededBy string `yaml:"superseded_by,omitempty" json:"superseded_by,omitempty"`
}
func NewRequirement ¶
func NewRequirement(id string, deltaID string, gherkin string) (Requirement, error)
func (Requirement) EffectiveLifecycle ¶
func (r Requirement) EffectiveLifecycle() RequirementLifecycle
func (Requirement) EffectiveVerification ¶
func (r Requirement) EffectiveVerification() RequirementVerification
func (Requirement) HasTag ¶
func (r Requirement) HasTag(tag string) bool
func (Requirement) IsActive ¶
func (r Requirement) IsActive() bool
func (Requirement) IsE2E ¶
func (r Requirement) IsE2E() bool
func (Requirement) IsManual ¶
func (r Requirement) IsManual() bool
func (Requirement) IsVerified ¶
func (r Requirement) IsVerified() bool
type RequirementLifecycle ¶
type RequirementLifecycle string
const ( RequirementLifecycleActive RequirementLifecycle = "active" RequirementLifecycleSuperseded RequirementLifecycle = "superseded" RequirementLifecycleWithdrawn RequirementLifecycle = "withdrawn" )
type RequirementVerification ¶
type RequirementVerification string
const ( RequirementVerificationUnverified RequirementVerification = "unverified" RequirementVerificationVerified RequirementVerification = "verified" RequirementVerificationStale RequirementVerification = "stale" )
type SpecStatus ¶
type SpecStatus string
const ( SpecStatusDraft SpecStatus = "draft" SpecStatusReady SpecStatus = "ready" SpecStatusActive SpecStatus = "active" SpecStatusVerified SpecStatus = "verified" )
func ValidSpecStatuses ¶
func ValidSpecStatuses() []SpecStatus
type TrackingFile ¶
type TrackingFile struct {
Slug string `yaml:"slug"`
Charter string `yaml:"charter"`
Title string `yaml:"title"`
Status SpecStatus `yaml:"status"`
Rev int `yaml:"rev"`
Created string `yaml:"created"`
Updated string `yaml:"updated"`
LastVerifiedAt string `yaml:"last_verified_at"`
Checkpoint string `yaml:"checkpoint"`
Tags []string `yaml:"tags"`
Documents Documents `yaml:"documents"`
Scope []string `yaml:"scope"`
Deltas []Delta `yaml:"deltas"`
Requirements []Requirement `yaml:"requirements"`
Changelog []ChangelogEntry `yaml:"changelog"`
FilePath string `yaml:"-"`
}
func (*TrackingFile) AllocateNextDeltaID ¶
func (t *TrackingFile) AllocateNextDeltaID() (string, error)
func (*TrackingFile) AllocateNextRequirementID ¶
func (t *TrackingFile) AllocateNextRequirementID() (string, error)
func (*TrackingFile) BlockingRequirementsForDeltaClosure ¶
func (t *TrackingFile) BlockingRequirementsForDeltaClosure(deltaID string) ([]Requirement, error)
func (*TrackingFile) ComputedStatus ¶
func (t *TrackingFile) ComputedStatus() SpecStatus
func (*TrackingFile) DeltaByID ¶
func (t *TrackingFile) DeltaByID(id string) *Delta
func (*TrackingFile) DeltaUpdatesResolved ¶
func (t *TrackingFile) DeltaUpdatesResolved(deltaID string) bool
func (*TrackingFile) DeltasTouchingRequirement ¶
func (t *TrackingFile) DeltasTouchingRequirement(requirementID string) []string
func (*TrackingFile) LiveDeltas ¶
func (t *TrackingFile) LiveDeltas() []Delta
func (*TrackingFile) RequirementByID ¶
func (t *TrackingFile) RequirementByID(id string) *Requirement
func (*TrackingFile) RequirementsTouchedByDelta ¶
func (t *TrackingFile) RequirementsTouchedByDelta(delta Delta) []Requirement
func (*TrackingFile) SyncComputedStatus ¶
func (t *TrackingFile) SyncComputedStatus()
func (*TrackingFile) TracingRequirements ¶
func (t *TrackingFile) TracingRequirements(deltaID string) []Requirement
func (*TrackingFile) Validate ¶
func (t *TrackingFile) Validate() error
func (*TrackingFile) ValidateDeltaClosure ¶
func (t *TrackingFile) ValidateDeltaClosure(deltaID string) error
Click to show internal directories.
Click to hide internal directories.