Versions in this module Expand all Collapse all v0 v0.3.0 Nov 12, 2026 v0.2.0 Nov 12, 2026 v0.1.1 Nov 12, 2026 v0.1.0 Nov 12, 2026 Changes in this version + var ErrNotFound = errors.New("not found") + var ErrOffline = errors.New("code host unreachable") + var ErrUnauthorized = errors.New("code host rejected the credentials") + type CodeHost interface + AddConversationComment func(ctx context.Context, prID, body string) error + AddThread func(ctx context.Context, reviewID string, t NewThread) error + Checks func(ctx context.Context, ref domain.PRRef) (domain.Checks, error) + Commits func(ctx context.Context, ref domain.PRRef) ([]domain.Commit, error) + Dashboard func(ctx context.Context) (Dashboard, error) + DeleteConversationComment func(ctx context.Context, commentID string) error + DeleteReviewComment func(ctx context.Context, commentID string) error + EditConversationComment func(ctx context.Context, commentID, body string) error + EditReviewComment func(ctx context.Context, commentID, body string) error + Forget func(ctx context.Context, ref domain.PRRef) error + PullRequest func(ctx context.Context, ref domain.PRRef) (domain.PullRequest, error) + RenderMarkdown func(ctx context.Context, repo domain.Repo, body string) (string, error) + Reply func(ctx context.Context, reviewID, threadID, body string) error + ReviewState func(ctx context.Context, ref domain.PRRef) (domain.ReviewState, error) + SetReaction func(ctx context.Context, subjectID string, r domain.Reaction, on bool) error + SetThreadResolved func(ctx context.Context, threadID string, resolved bool) error + SetViewed func(ctx context.Context, prID, path string, viewed bool) error + StartReview func(ctx context.Context, prID string, commit domain.SHA) (reviewID string, err error) + Status func() Status + SubmitReview func(ctx context.Context, prID, reviewID string, commit domain.SHA, ...) error + type Dashboard struct + Authored []domain.PRSummary + ReviewRequested []domain.PRSummary + type Fake struct + ChecksOf map[domain.PRRef]domain.Checks + CommitsOf map[domain.PRRef][]domain.Commit + Dash Dashboard + FailAddThread error + Forgotten []domain.PRRef + Health Status + PRs map[domain.PRRef]domain.PullRequest + States map[domain.PRRef]*domain.ReviewState + Submissions []Submission + func NewFake() *Fake + func (f *Fake) AddConversationComment(_ context.Context, prID, body string) error + func (f *Fake) AddThread(_ context.Context, reviewID string, t NewThread) error + func (f *Fake) Checks(_ context.Context, ref domain.PRRef) (domain.Checks, error) + func (f *Fake) Commits(_ context.Context, ref domain.PRRef) ([]domain.Commit, error) + func (f *Fake) Dashboard(ctx context.Context) (Dashboard, error) + func (f *Fake) DeleteConversationComment(_ context.Context, commentID string) error + func (f *Fake) DeleteReviewComment(_ context.Context, commentID string) error + func (f *Fake) EditConversationComment(_ context.Context, commentID, body string) error + func (f *Fake) EditReviewComment(_ context.Context, commentID, body string) error + func (f *Fake) Forget(_ context.Context, ref domain.PRRef) error + func (f *Fake) PullRequest(_ context.Context, ref domain.PRRef) (domain.PullRequest, error) + func (f *Fake) RenderMarkdown(_ context.Context, _ domain.Repo, body string) (string, error) + func (f *Fake) Reply(_ context.Context, reviewID, threadID, body string) error + func (f *Fake) ReviewState(_ context.Context, ref domain.PRRef) (domain.ReviewState, error) + func (f *Fake) SetOnline(online bool) + func (f *Fake) SetReaction(_ context.Context, subjectID string, r domain.Reaction, on bool) error + func (f *Fake) SetThreadResolved(_ context.Context, threadID string, resolved bool) error + func (f *Fake) SetViewed(_ context.Context, prID, path string, viewed bool) error + func (f *Fake) StartReview(_ context.Context, prID string, commit domain.SHA) (string, error) + func (f *Fake) State(ref domain.PRRef) *domain.ReviewState + func (f *Fake) Status() Status + func (f *Fake) SubmitReview(_ context.Context, prID, reviewID string, commit domain.SHA, ...) error + type NewThread struct + Body string + Line int + Path string + Side domain.DiffSide + StartLine int + StartSide domain.DiffSide + type RateLimit struct + Limit int + Remaining int + Reset time.Time + Resource string + func (r RateLimit) Low() bool + type Status struct + Online bool + RateLimit RateLimit + Unauthorized bool + type Submission struct + Body string + Commit domain.SHA + Event domain.ReviewEvent + PR domain.PRRef