precedent

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package precedent owns dependency-neutral models used to load and rank historical threads without leaking database adapter types into application logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RepositoryKey

func RepositoryKey(ref domain.RepoRef) string

RepositoryKey provides a stable case-insensitive grouping key.

Types

type RepositorySnapshot

type RepositorySnapshot struct {
	Repository      domain.RepoRef
	Available       bool
	Sources         map[int]Thread
	Closed          []Thread
	ClosedTotal     int
	ClosedTruncated bool
}

RepositorySnapshot contains all source threads and bounded closed history needed to score every input for one repository.

type SourceRef

type SourceRef struct {
	Repository domain.RepoRef
	Number     int
}

SourceRef identifies an input thread for precedent discovery.

type Thread

type Thread struct {
	ID          int64
	Kind        string
	Number      int
	State       string
	StateReason string
	Title       string
	Body        string
	Labels      []string
	ClosedAt    time.Time
	MergedAt    time.Time
	Merged      bool
}

Thread is the stored thread data needed by precedent scoring and output.

Jump to

Keyboard shortcuts

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