domain

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	ID        int64
	Author    string
	Body      string
	CreatedAt time.Time
}

Comment is a product-owned model for a thread comment.

type Coverage

type Coverage struct {
	AsOf   time.Time
	Facets []FacetCoverage
}

Coverage is a product-owned model for corpus facet coverage and freshness.

type Dossier

type Dossier struct {
	Repo                             RepoRef
	CommitSHA                        string
	AsOf                             time.Time
	SourceRefs                       []SourceRef
	Coverage                         Coverage
	Repository                       Repository
	ContributionGuidance             string
	OpenIssueCount                   int
	ClosedIssueCount                 int
	OpenPullRequestCount             int
	MergedPullRequestCount           int
	ClosedUnmergedPullRequestCount   int
	RecentMergedPullRequests         []DossierThread
	RecentOpenPullRequests           []DossierThread
	RecentClosedUnmergedPullRequests []DossierThread
	RecentIssues                     []DossierThread
}

Dossier is a bounded, source-backed repository context package.

type DossierSectionMetadata

type DossierSectionMetadata struct {
	RecentLimit           int      `json:"recent_limit"`
	MergedPRCount         int      `json:"merged_pr_count"`
	OpenPRCount           int      `json:"open_pr_count"`
	ClosedUnmergedPRCount int      `json:"closed_unmerged_pr_count"`
	IssueCount            int      `json:"issue_count"`
	SourceClasses         []string `json:"source_classes"`
}

DossierSectionMetadata records the bounded sections used to create a dossier.

type DossierThread

type DossierThread struct {
	Number    int
	Title     string
	Author    string
	State     ThreadState
	Draft     bool
	CreatedAt time.Time
	UpdatedAt time.Time
	ClosedAt  time.Time
	MergedAt  time.Time
	Labels    []string
}

DossierThread is a lightweight, deterministic view for dossier listings.

type ExtractSeedsOptions

type ExtractSeedsOptions struct {
	Classes []SeedSourceClass
	Limit   int
}

ExtractSeedsOptions selects the source classes and bounds the result set.

type FacetCoverage

type FacetCoverage struct {
	Facet     string
	Present   bool
	Complete  bool
	Freshness Freshness
	Count     int
}

FacetCoverage describes the presence, completeness, and freshness of one facet.

type Freshness

type Freshness struct {
	Status FreshnessStatus
	AsOf   time.Time
}

Freshness records the observed time and status of a facet.

type FreshnessStatus

type FreshnessStatus string

FreshnessStatus describes how current a facet is.

const (
	Fresh   FreshnessStatus = "fresh"
	Stale   FreshnessStatus = "stale"
	Missing FreshnessStatus = "missing"
)

type Page

type Page struct {
	Limit int
	After string
}

Page is product-owned cursor pagination.

type PageInfo

type PageInfo struct {
	HasNext bool
	Next    string
	Total   int
}

PageInfo describes pagination state for a result set.

type PullRequestDetails

type PullRequestDetails struct {
	HeadRef        string
	BaseRef        string
	HeadSHA        string
	BaseSHA        string
	Merged         bool
	MergedAt       time.Time
	MergeCommitSHA string
	Additions      int
	Deletions      int
	ChangedFiles   int
	CIStatus       string
}

PullRequestDetails contains PR-specific facets.

type RepoRef

type RepoRef struct {
	Owner string
	Repo  string
}

RepoRef identifies a repository by owner and name.

func (RepoRef) String

func (r RepoRef) String() string

func (RepoRef) Validate

func (r RepoRef) Validate() error

Validate checks that the owner and repo are non-empty and syntactically valid.

type Repository

type Repository struct {
	RepoRef
	ID                             int64
	Description                    string
	Topics                         []string
	Languages                      []string
	License                        string
	DefaultBranch                  string
	CommitSHA                      string
	Archived                       bool
	Fork                           bool
	Stars                          int
	Watchers                       int
	Forks                          int
	OpenIssueCount                 int
	ClosedIssueCount               int
	OpenPullRequestCount           int
	MergedPullRequestCount         int
	ClosedUnmergedPullRequestCount int
	CreatedAt                      time.Time
	UpdatedAt                      time.Time
}

Repository is a product-owned snapshot of repository metadata and counts.

type SearchQuery

type SearchQuery struct {
	Text   string
	Repo   RepoRef
	Kinds  []ThreadKind
	States []ThreadState
	Labels []string
	Sort   string
	Page   Page
}

SearchQuery is a product-owned search request.

type SearchResult

type SearchResult struct {
	Items []SearchResultItem
	Page  PageInfo
	Ref   SourceRef
}

SearchResult is a product-owned search result page.

type SearchResultItem

type SearchResultItem struct {
	Repo   RepoRef
	Kind   ThreadKind
	Number int
	Title  string
	Score  float64
	Ref    SourceRef
}

SearchResultItem is one product-owned search result.

type Seed

type Seed struct {
	SourceClass SeedSourceClass
	Number      int
	Title       string
	Author      string
	State       string
	Labels      []string
	CreatedAt   time.Time
	UpdatedAt   time.Time
	ClosedAt    time.Time
	MergedAt    time.Time
	Evidence    SeedEvidence
}

Seed is an evidence-backed record derived from stored merged PRs, closed unmerged PRs, or issues.

type SeedEvidence

type SeedEvidence struct {
	TitleConvention         string
	IssueLinkages           []string
	ValidationIndicators    []string
	ApproximateScope        string
	ScopeEvidence           string
	RejectionOrSupersession string
	ProblemAreas            []string
}

SeedEvidence carries the observed patterns and extracted signals for a seed.

type SeedSourceClass

type SeedSourceClass string

SeedSourceClass identifies the stored thread class a seed was extracted from.

const (
	SeedSourceClassMergedPR         SeedSourceClass = "merged_pr"
	SeedSourceClassClosedUnmergedPR SeedSourceClass = "closed_unmerged_pr"
	SeedSourceClassIssue            SeedSourceClass = "issue"
)

type SourceRef

type SourceRef struct {
	Source     string
	URL        string
	CommitSHA  string
	ObservedAt time.Time
	AsOf       time.Time
}

SourceRef records the exact source, reference, and observation time. It carries no vendor-specific metadata objects.

type Thread

type Thread struct {
	ID        int64
	Repo      RepoRef
	Kind      ThreadKind
	Number    int
	Title     string
	Body      string
	Author    string
	State     ThreadState
	Draft     bool
	Labels    []string
	Assignees []string
	CreatedAt time.Time
	UpdatedAt time.Time
	ClosedAt  time.Time

	// PullRequest is present when Kind is PullRequestKind.
	PullRequest *PullRequestDetails
}

Thread is a product-owned model for an issue or pull request. It carries no vendor-specific API types.

type ThreadKind

type ThreadKind string

ThreadKind distinguishes issues from pull requests.

const (
	IssueKind       ThreadKind = "issue"
	PullRequestKind ThreadKind = "pull_request"
)

type ThreadState

type ThreadState string

ThreadState is the high-level lifecycle state of a thread.

const (
	OpenState   ThreadState = "open"
	ClosedState ThreadState = "closed"
)

Jump to

Keyboard shortcuts

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