Documentation
¶
Overview ¶
Package reviewapp provides the transport-independent application boundary for reading a validated Change Saga and its source comparison.
Index ¶
- Constants
- type AssetSummary
- type Attribution
- type ChapterSummary
- type ChildrenPage
- type ChildrenQuery
- type Committer
- type CompactDiffs
- type CompactReview
- type CoverageSummary
- type DiffOwner
- type DiffOwnerQuery
- type DiffOwnership
- type Error
- type ErrorCode
- type FragmentChunk
- type FragmentContent
- type FragmentDiffQuery
- type FragmentDiffs
- type FragmentQuery
- type Gap
- type GapPage
- type GapQuery
- type LandmarkValue
- type Node
- type OpenOptions
- type OverlapGap
- type Overview
- type OverviewQuery
- type OwnedAtom
- type Page
- type ResolvedSelector
- type ReviewEvent
- type ReviewFragment
- type ReviewItem
- type ReviewMessage
- type ReviewPage
- type ReviewQuery
- type ReviewThread
- type SagaIdentity
- type Session
- type SourceSnapshot
- type StaleSelector
- type UncoveredGap
Constants ¶
View Source
const ( DefaultPageLimit = 100 MaxPageLimit = 1000 DefaultFragmentLimit = 256 << 10 MaxFragmentLimit = 1 << 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetSummary ¶
type Attribution ¶
type ChapterSummary ¶
type ChildrenPage ¶
type ChildrenQuery ¶
type CompactDiffs ¶
type CompactReview ¶
type CoverageSummary ¶
type DiffOwnerQuery ¶
type DiffOwnership ¶
type Error ¶
type Error struct {
Code ErrorCode `json:"code"`
Message string `json:"message"`
Retryable bool `json:"retryable"`
Details map[string]any `json:"details,omitempty"`
// contains filtered or unexported fields
}
Error is a stable domain error. Cause is retained for logs but intentionally excluded from serialized output because it can contain local absolute paths.
type ErrorCode ¶
type ErrorCode string
const ( CodeInvalidArgument ErrorCode = "invalid_argument" CodeNotFound ErrorCode = "not_found" CodeInvalidSaga ErrorCode = "invalid_saga" CodeStaleSnapshot ErrorCode = "stale_snapshot" CodeConflict ErrorCode = "conflict" CodeUnsafePath ErrorCode = "unsafe_path" CodeUnsupportedMedia ErrorCode = "unsupported_media" CodeTooLarge ErrorCode = "too_large" CodeInternal ErrorCode = "internal" )
func ErrorCodeOf ¶
ErrorCodeOf returns the stable code for a domain error. Unexpected errors deliberately collapse to internal rather than exposing implementation text.
type FragmentChunk ¶
type FragmentContent ¶
type FragmentContent struct {
Target string `json:"target"`
ID string `json:"id"`
Title string `json:"title"`
MediaType string `json:"media_type"`
Content FragmentChunk `json:"content"`
Assets []AssetSummary `json:"assets"`
}
type FragmentDiffQuery ¶
type FragmentDiffs ¶
type FragmentDiffs struct {
Target string `json:"target"`
Selectors []ResolvedSelector `json:"selectors"`
Atoms []gitdiff.Atom `json:"atoms"`
Stale []StaleSelector `json:"stale"`
Page Page `json:"-"`
}
type FragmentQuery ¶
type Gap ¶
type Gap struct {
Kind string `json:"kind"`
Uncovered *UncoveredGap `json:"uncovered,omitempty"`
Stale *StaleSelector `json:"stale,omitempty"`
Overlap *OverlapGap `json:"overlap,omitempty"`
}
type LandmarkValue ¶
type LandmarkValue struct {
Type string `json:"type"`
ElementID string `json:"element_id,omitempty"`
HeadingID string `json:"heading_id,omitempty"`
Exact string `json:"exact,omitempty"`
Prefix string `json:"prefix,omitempty"`
Suffix string `json:"suffix,omitempty"`
X float64 `json:"x,omitempty"`
Y float64 `json:"y,omitempty"`
Width float64 `json:"width,omitempty"`
Height float64 `json:"height,omitempty"`
}
type Node ¶
type Node struct {
Kind string `json:"kind"`
Target string `json:"target"`
Parent string `json:"parent,omitempty"`
ID string `json:"id"`
Title string `json:"title"`
Order int `json:"order,omitempty"`
HasChildren bool `json:"has_children"`
Review CompactReview `json:"review"`
Diffs CompactDiffs `json:"diffs"`
MediaType string `json:"media_type,omitempty"`
Bytes int64 `json:"bytes,omitempty"`
Selector *LandmarkValue `json:"selector,omitempty"`
}
type OpenOptions ¶
type OverlapGap ¶
type Overview ¶
type Overview struct {
Saga SagaIdentity `json:"saga"`
Source SourceSnapshot `json:"source"`
Root Node `json:"root"`
OverviewFragments []Node `json:"overview_fragments"`
Chapters []ChapterSummary `json:"chapters"`
Coverage CoverageSummary `json:"coverage"`
}
type OverviewQuery ¶
type OverviewQuery struct{}
type OwnedAtom ¶
type OwnedAtom struct {
Atom gitdiff.Atom `json:"atom"`
Owners []DiffOwner `json:"owners"`
Threads []ReviewThread `json:"threads"`
}
type ResolvedSelector ¶
type ReviewEvent ¶
type ReviewEvent struct {
ID string `json:"id"`
Kind string `json:"kind"`
Target string `json:"target,omitempty"`
Diff string `json:"diff,omitempty"`
State string `json:"state,omitempty"`
Body string `json:"body,omitempty"`
Anchor *saga.Anchor `json:"anchor,omitempty"`
CreatedAt time.Time `json:"created_at"`
Attribution Attribution `json:"attribution"`
LegacyClaimedAuthor string `json:"legacy_claimed_author,omitempty"`
}
type ReviewFragment ¶
type ReviewItem ¶
type ReviewItem struct {
Kind string `json:"kind"`
Thread *ReviewThread `json:"thread,omitempty"`
Event *ReviewEvent `json:"event,omitempty"`
}
type ReviewMessage ¶
type ReviewMessage struct {
ID string `json:"id"`
CreatedAt time.Time `json:"created_at"`
Attribution Attribution `json:"attribution"`
LegacyClaimedAuthor string `json:"legacy_claimed_author,omitempty"`
Fragments []ReviewFragment `json:"fragments"`
}
type ReviewPage ¶
type ReviewPage struct {
Items []ReviewItem `json:"items"`
Page Page `json:"-"`
}
type ReviewQuery ¶
type ReviewThread ¶
type ReviewThread struct {
ID string `json:"id"`
Kind string `json:"kind"`
Target string `json:"target"`
Anchor saga.Anchor `json:"anchor"`
Suggestion *saga.Suggestion `json:"suggestion,omitempty"`
State string `json:"state"`
CreatedAt time.Time `json:"created_at"`
Attribution Attribution `json:"attribution"`
LegacyClaimedAuthor string `json:"legacy_claimed_author,omitempty"`
Messages []ReviewMessage `json:"messages"`
Events []ReviewEvent `json:"events"`
}
type SagaIdentity ¶
type Session ¶
type Session interface {
Snapshot() string
Overview(context.Context, OverviewQuery) (Overview, error)
Children(context.Context, ChildrenQuery) (ChildrenPage, error)
ReadFragment(context.Context, FragmentQuery) (FragmentContent, error)
FragmentDiffs(context.Context, FragmentDiffQuery) (FragmentDiffs, error)
DiffOwners(context.Context, DiffOwnerQuery) (DiffOwnership, error)
Reviews(context.Context, ReviewQuery) (ReviewPage, error)
Gaps(context.Context, GapQuery) (GapPage, error)
}
type SourceSnapshot ¶
type StaleSelector ¶
type UncoveredGap ¶
Click to show internal directories.
Click to hide internal directories.