link

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package link holds the cross-source links between units.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Unit   unit.Unit
	Kind   EventKind
	Actor  string // person key, "github:<login>"
	At     time.Time
	Anchor unit.Anchor // Ref "review:<id>", "merged", "closed"
}

Event is a provider-neutral event on a unit, read by the resolver.

type EventKind

type EventKind string
const (
	EventReview EventKind = "review"
	EventMerged EventKind = "merged"
	EventClosed EventKind = "closed"
)

type Kind

type Kind string

Kind is the one link-kind enum; extraction ops use these values as link_kind.

const (
	Mention Kind = "mention" // shown, never resolves
	Review  Kind = "review"  // resolved by a review on To by an assignee of Item (any reviewer when none), mooted when To merges or closes
	Merge   Kind = "merge"   // resolved (done) when To merges; mooted when To closes unmerged
)

func (Kind) Valid

func (k Kind) Valid() bool

Valid says whether k is one of the link kinds.

type Link struct {
	From     unit.Unit   `json:"from"`
	To       unit.Unit   `json:"to"`
	Kind     Kind        `json:"kind"`
	Item     string      `json:"item,omitempty"` // item id on From; "" links the unit only and resolves nothing
	Evidence unit.Anchor `json:"evidence"`       // the message or event that names To
	Origin   Origin      `json:"origin"`
	At       time.Time   `json:"at"`
}

type Origin

type Origin string
const (
	Facts      Origin = "facts"
	Extraction Origin = "extraction"
	User       Origin = "user"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL