Documentation
¶
Index ¶
- func NewTestDB(t *testing.T) *pgxpool.Pool
- type DB
- type EpicRepository
- func (r *EpicRepository) AppendSessionLog(ctx context.Context, id epic.EpicID, lines []string) error
- func (r *EpicRepository) ClaimEpic(ctx context.Context, id epic.EpicID) (bool, error)
- func (r *EpicRepository) ClearEpicFeedback(ctx context.Context, id epic.EpicID) error
- func (r *EpicRepository) CreateEpic(ctx context.Context, e *epic.Epic) error
- func (r *EpicRepository) DeleteEpic(ctx context.Context, id epic.EpicID) error
- func (r *EpicRepository) EpicHeartbeat(ctx context.Context, id epic.EpicID) error
- func (r *EpicRepository) ListActiveEpics(ctx context.Context) ([]*epic.Epic, error)
- func (r *EpicRepository) ListEpics(ctx context.Context) ([]*epic.Epic, error)
- func (r *EpicRepository) ListEpicsByRepo(ctx context.Context, repoID string) ([]*epic.Epic, error)
- func (r *EpicRepository) ListPlanningEpics(ctx context.Context) ([]*epic.Epic, error)
- func (r *EpicRepository) ListStaleEpics(ctx context.Context, threshold time.Time) ([]*epic.Epic, error)
- func (r *EpicRepository) ReadEpic(ctx context.Context, id epic.EpicID) (*epic.Epic, error)
- func (r *EpicRepository) ReleaseEpicClaim(ctx context.Context, id epic.EpicID) error
- func (r *EpicRepository) RemoveTaskID(ctx context.Context, id epic.EpicID, taskID string) error
- func (r *EpicRepository) SetEpicFeedback(ctx context.Context, id epic.EpicID, feedback, feedbackType string) error
- func (r *EpicRepository) SetTaskIDs(ctx context.Context, id epic.EpicID, taskIDs []string) error
- func (r *EpicRepository) UpdateEpic(ctx context.Context, e *epic.Epic) error
- func (r *EpicRepository) UpdateEpicStatus(ctx context.Context, id epic.EpicID, status epic.Status) error
- func (r *EpicRepository) UpdateProposedTasks(ctx context.Context, id epic.EpicID, tasks []epic.ProposedTask) error
- type EventNotifier
- type GitHubTokenRepository
- type RepoRepository
- func (r *RepoRepository) CreateRepo(ctx context.Context, rp *repo.Repo) error
- func (r *RepoRepository) DeleteRepo(ctx context.Context, id repo.RepoID) error
- func (r *RepoRepository) ListRepos(ctx context.Context) ([]*repo.Repo, error)
- func (r *RepoRepository) ReadRepo(ctx context.Context, id repo.RepoID) (*repo.Repo, error)
- func (r *RepoRepository) ReadRepoByFullName(ctx context.Context, fullName string) (*repo.Repo, error)
- type SettingRepository
- func (r *SettingRepository) DeleteSetting(ctx context.Context, key string) error
- func (r *SettingRepository) ListSettings(ctx context.Context) (map[string]string, error)
- func (r *SettingRepository) ReadSetting(ctx context.Context, key string) (string, error)
- func (r *SettingRepository) UpsertSetting(ctx context.Context, key, value string) error
- type TaskRepository
- func (r *TaskRepository) AddCost(ctx context.Context, id task.TaskID, costUSD float64) error
- func (r *TaskRepository) AppendTaskLogs(ctx context.Context, id task.TaskID, attempt int, logs []string) error
- func (r *TaskRepository) BeginTxFunc(ctx context.Context, ...) error
- func (r *TaskRepository) BulkCloseTasksByEpic(ctx context.Context, epicID, reason string) error
- func (r *TaskRepository) BulkDeleteTasksByEpic(ctx context.Context, epicID string) error
- func (r *TaskRepository) BulkDeleteTasksByIDs(ctx context.Context, ids []string) error
- func (r *TaskRepository) ClaimTask(ctx context.Context, id task.TaskID) (bool, error)
- func (r *TaskRepository) ClearEpicIDForTasks(ctx context.Context, epicID string) error
- func (r *TaskRepository) CloseTask(ctx context.Context, id task.TaskID, reason string) error
- func (r *TaskRepository) CreateTask(ctx context.Context, t *task.Task) error
- func (r *TaskRepository) DeleteExpiredLogs(ctx context.Context, before time.Time) (int64, error)
- func (r *TaskRepository) DeleteTask(ctx context.Context, id task.TaskID) error
- func (r *TaskRepository) DeleteTaskLogs(ctx context.Context, id task.TaskID) error
- func (r *TaskRepository) FeedbackRetryTask(ctx context.Context, id task.TaskID, feedback string) (bool, error)
- func (r *TaskRepository) HasTasksForRepo(ctx context.Context, repoID string) (bool, error)
- func (r *TaskRepository) Heartbeat(ctx context.Context, id task.TaskID) (bool, error)
- func (r *TaskRepository) ListPendingTasks(ctx context.Context) ([]*task.Task, error)
- func (r *TaskRepository) ListPendingTasksByRepos(ctx context.Context, repoIDs []string) ([]*task.Task, error)
- func (r *TaskRepository) ListStaleTasks(ctx context.Context, before time.Time) ([]*task.Task, error)
- func (r *TaskRepository) ListTasks(ctx context.Context) ([]*task.Task, error)
- func (r *TaskRepository) ListTasksByEpic(ctx context.Context, epicID string) ([]*task.Task, error)
- func (r *TaskRepository) ListTasksByRepo(ctx context.Context, repoID string) ([]*task.Task, error)
- func (r *TaskRepository) ListTasksInReview(ctx context.Context) ([]*task.Task, error)
- func (r *TaskRepository) ListTasksInReviewByRepo(ctx context.Context, repoID string) ([]*task.Task, error)
- func (r *TaskRepository) ListTasksInReviewNoPR(ctx context.Context) ([]*task.Task, error)
- func (r *TaskRepository) ManualRetryTask(ctx context.Context, id task.TaskID, instructions string) (bool, error)
- func (r *TaskRepository) ReadTask(ctx context.Context, id task.TaskID) (*task.Task, error)
- func (r *TaskRepository) ReadTaskLogs(ctx context.Context, id task.TaskID) ([]string, error)
- func (r *TaskRepository) ReadTaskStatus(ctx context.Context, id task.TaskID) (task.Status, error)
- func (r *TaskRepository) RemoveDependency(ctx context.Context, id task.TaskID, depID string) error
- func (r *TaskRepository) RetryTask(ctx context.Context, id task.TaskID, reason string) (bool, error)
- func (r *TaskRepository) ScheduleRetryFromRunning(ctx context.Context, id task.TaskID, reason string) (bool, error)
- func (r *TaskRepository) SetAgentStatus(ctx context.Context, id task.TaskID, status string) error
- func (r *TaskRepository) SetBranchName(ctx context.Context, id task.TaskID, branchName string) error
- func (r *TaskRepository) SetCloseReason(ctx context.Context, id task.TaskID, reason string) error
- func (r *TaskRepository) SetConsecutiveFailures(ctx context.Context, id task.TaskID, count int) error
- func (r *TaskRepository) SetReady(ctx context.Context, id task.TaskID, ready bool) error
- func (r *TaskRepository) SetRetryContext(ctx context.Context, id task.TaskID, retryCtx string) error
- func (r *TaskRepository) SetTaskPullRequest(ctx context.Context, id task.TaskID, prURL string, prNumber int) error
- func (r *TaskRepository) StartOverTask(ctx context.Context, id task.TaskID, params task.StartOverTaskParams) (bool, error)
- func (r *TaskRepository) StopTask(ctx context.Context, id task.TaskID, reason string) (bool, error)
- func (r *TaskRepository) StreamTaskLogs(ctx context.Context, id task.TaskID, ...) error
- func (r *TaskRepository) TaskExists(ctx context.Context, id task.TaskID) (bool, error)
- func (r *TaskRepository) UpdatePendingTask(ctx context.Context, id task.TaskID, params task.UpdatePendingTaskParams) (bool, error)
- func (r *TaskRepository) UpdateTaskStatus(ctx context.Context, id task.TaskID, status task.Status) error
- func (r *TaskRepository) WithTx(txn tx.Tx) task.Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
DB is the database interface required by the postgres package. It is satisfied by *pgxpool.Pool.
type EpicRepository ¶
type EpicRepository struct {
// contains filtered or unexported fields
}
EpicRepository implements epic.Repository using PostgreSQL.
func NewEpicRepository ¶
func NewEpicRepository(pool *pgxpool.Pool) *EpicRepository
NewEpicRepository creates a new EpicRepository backed by the given pgx pool.
func (*EpicRepository) AppendSessionLog ¶
func (*EpicRepository) ClearEpicFeedback ¶
func (*EpicRepository) CreateEpic ¶
func (*EpicRepository) DeleteEpic ¶
func (*EpicRepository) EpicHeartbeat ¶
func (*EpicRepository) ListActiveEpics ¶
func (*EpicRepository) ListEpicsByRepo ¶
func (*EpicRepository) ListPlanningEpics ¶
func (*EpicRepository) ListStaleEpics ¶
func (*EpicRepository) ReleaseEpicClaim ¶
func (*EpicRepository) RemoveTaskID ¶
func (*EpicRepository) SetEpicFeedback ¶
func (*EpicRepository) SetTaskIDs ¶
func (*EpicRepository) UpdateEpic ¶
func (*EpicRepository) UpdateEpicStatus ¶
func (*EpicRepository) UpdateProposedTasks ¶
func (r *EpicRepository) UpdateProposedTasks(ctx context.Context, id epic.EpicID, tasks []epic.ProposedTask) error
type EventNotifier ¶
type EventNotifier struct {
// contains filtered or unexported fields
}
EventNotifier implements task.Notifier using PostgreSQL LISTEN/NOTIFY.
func NewEventNotifier ¶
func NewEventNotifier(pool *pgxpool.Pool, logger log.Logger) *EventNotifier
NewEventNotifier creates a new EventNotifier backed by the given pgx pool.
type GitHubTokenRepository ¶
type GitHubTokenRepository struct {
// contains filtered or unexported fields
}
GitHubTokenRepository implements githubtoken.Repository using PostgreSQL.
func NewGitHubTokenRepository ¶
func NewGitHubTokenRepository(pool *pgxpool.Pool) *GitHubTokenRepository
NewGitHubTokenRepository creates a new GitHubTokenRepository backed by the given pgx pool.
func (*GitHubTokenRepository) DeleteGitHubToken ¶
func (r *GitHubTokenRepository) DeleteGitHubToken(ctx context.Context) error
func (*GitHubTokenRepository) ReadGitHubToken ¶
func (r *GitHubTokenRepository) ReadGitHubToken(ctx context.Context) (string, error)
func (*GitHubTokenRepository) UpsertGitHubToken ¶
type RepoRepository ¶
type RepoRepository struct {
// contains filtered or unexported fields
}
RepoRepository implements repo.Repository using PostgreSQL.
func NewRepoRepository ¶
func NewRepoRepository(pool *pgxpool.Pool) *RepoRepository
NewRepoRepository creates a new RepoRepository backed by the given pgx pool.
func (*RepoRepository) CreateRepo ¶
func (*RepoRepository) DeleteRepo ¶
func (*RepoRepository) ReadRepoByFullName ¶
type SettingRepository ¶
type SettingRepository struct {
// contains filtered or unexported fields
}
SettingRepository implements setting.Repository using PostgreSQL.
func NewSettingRepository ¶
func NewSettingRepository(pool *pgxpool.Pool) *SettingRepository
NewSettingRepository creates a new SettingRepository backed by the given pgx pool.
func (*SettingRepository) DeleteSetting ¶
func (r *SettingRepository) DeleteSetting(ctx context.Context, key string) error
func (*SettingRepository) ListSettings ¶
func (*SettingRepository) ReadSetting ¶
func (*SettingRepository) UpsertSetting ¶
func (r *SettingRepository) UpsertSetting(ctx context.Context, key, value string) error
type TaskRepository ¶
type TaskRepository struct {
// contains filtered or unexported fields
}
TaskRepository implements task.Repository using PostgreSQL.
func NewTaskRepository ¶
func NewTaskRepository(pool *pgxpool.Pool) *TaskRepository
NewTaskRepository creates a new TaskRepository backed by the given pgx pool.
func (*TaskRepository) AppendTaskLogs ¶
func (*TaskRepository) BeginTxFunc ¶
func (*TaskRepository) BulkCloseTasksByEpic ¶
func (r *TaskRepository) BulkCloseTasksByEpic(ctx context.Context, epicID, reason string) error
func (*TaskRepository) BulkDeleteTasksByEpic ¶
func (r *TaskRepository) BulkDeleteTasksByEpic(ctx context.Context, epicID string) error
func (*TaskRepository) BulkDeleteTasksByIDs ¶
func (r *TaskRepository) BulkDeleteTasksByIDs(ctx context.Context, ids []string) error
func (*TaskRepository) ClearEpicIDForTasks ¶
func (r *TaskRepository) ClearEpicIDForTasks(ctx context.Context, epicID string) error
func (*TaskRepository) CreateTask ¶
func (*TaskRepository) DeleteExpiredLogs ¶
func (*TaskRepository) DeleteTask ¶
func (*TaskRepository) DeleteTaskLogs ¶
func (*TaskRepository) FeedbackRetryTask ¶
func (*TaskRepository) HasTasksForRepo ¶
func (*TaskRepository) ListPendingTasks ¶
func (*TaskRepository) ListPendingTasksByRepos ¶
func (*TaskRepository) ListStaleTasks ¶
func (*TaskRepository) ListTasksByEpic ¶
func (*TaskRepository) ListTasksByRepo ¶
func (*TaskRepository) ListTasksInReview ¶
func (*TaskRepository) ListTasksInReviewByRepo ¶
func (*TaskRepository) ListTasksInReviewNoPR ¶
func (*TaskRepository) ManualRetryTask ¶
func (*TaskRepository) ReadTaskLogs ¶
func (*TaskRepository) ReadTaskStatus ¶
func (*TaskRepository) RemoveDependency ¶
func (*TaskRepository) ScheduleRetryFromRunning ¶
func (*TaskRepository) SetAgentStatus ¶
func (*TaskRepository) SetBranchName ¶
func (*TaskRepository) SetCloseReason ¶
func (*TaskRepository) SetConsecutiveFailures ¶
func (*TaskRepository) SetRetryContext ¶
func (*TaskRepository) SetTaskPullRequest ¶
func (*TaskRepository) StartOverTask ¶
func (r *TaskRepository) StartOverTask(ctx context.Context, id task.TaskID, params task.StartOverTaskParams) (bool, error)
func (*TaskRepository) StreamTaskLogs ¶
func (*TaskRepository) TaskExists ¶
func (*TaskRepository) UpdatePendingTask ¶
func (r *TaskRepository) UpdatePendingTask(ctx context.Context, id task.TaskID, params task.UpdatePendingTaskParams) (bool, error)
func (*TaskRepository) UpdateTaskStatus ¶
func (*TaskRepository) WithTx ¶
func (r *TaskRepository) WithTx(txn tx.Tx) task.Repository