Documentation
¶
Index ¶
- Variables
- func GetDependencies(database *db.DB, issueID string) ([]models.Issue, error)
- func GetDependents(database *db.DB, issueID string) ([]models.Issue, error)
- func GetTransitiveBlocked(database *db.DB, issueID string, visited map[string]bool) []string
- func Remove(database *db.DB, issueID, dependsOnID string) error
- func ValidateAndAdd(database *db.DB, issueID, dependsOnID string) error
- func WouldCreateCycle(database *db.DB, issueID, dependsOnID string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDependencyExists = fmt.Errorf("dependency already exists")
ErrDependencyExists is returned when trying to add a dependency that already exists.
Functions ¶
func GetDependencies ¶
GetDependencies returns issues that issueID depends on.
func GetDependents ¶
GetDependents returns issues that depend on issueID.
func GetTransitiveBlocked ¶
GetTransitiveBlocked returns all issues transitively blocked by issueID.
func ValidateAndAdd ¶
ValidateAndAdd validates the dependency (no cycles, both issues exist, not duplicate) and adds it. Returns nil on success, or an error describing what went wrong.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.