Documentation
¶
Index ¶
- type Branch
- type BranchRow
- type BranchStatus
- type Issue
- type Store
- func (s *Store) Close() error
- func (s *Store) DeleteBranch(ctx context.Context, uuid string) error
- func (s *Store) InsertIssueWithBranch(ctx context.Context, issue *Issue, branch *Branch) error
- func (s *Store) ListBranches(ctx context.Context, status BranchStatus) ([]BranchRow, error)
- func (s *Store) UpdateBranchStatus(ctx context.Context, uuid string, statusID int64, mergedAt *time.Time) error
- func (s *Store) UpdateIssueStatus(ctx context.Context, issueID, statusID int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Branch ¶
type Branch struct {
UUID string
Name string
IssueID int64
Type string
StatusID int64
CreatedAt time.Time
MergedAt *time.Time
}
Branch represents a tracked branch record.
type BranchRow ¶
type BranchRow struct {
UUID string `json:"uuid"`
IssueSlug string `json:"issue_slug"`
Title string `json:"title"`
BranchName string `json:"branch_name"`
Type string `json:"type"`
Status BranchStatus `json:"status"`
CreatedAt time.Time `json:"created_at"`
}
BranchRow is the joined result of one branch with its parent issue and status.
type BranchStatus ¶
type BranchStatus string
BranchStatus is the typed string representation of the statuses table.
const ( BranchStatusInProgress BranchStatus = "in_progress" BranchStatusMerged BranchStatus = "merged" BranchStatusAll BranchStatus = "" // sentinel: no WHERE filter; not a DB value )
type Issue ¶
type Issue struct {
ID int64
// tracker string ID: "ABC-42", "42", …
IDSlug string
Title string
StatusID int64
TrackerType *string // nil = manual entry; non-nil = tracker type (e.g. "redmine")
}
Issue represents a tracked issue record.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store wraps a SQLite database for branch and issue persistence.
func Open ¶
Open opens (or creates) the SQLite database at dir/[dbName] and runs pending migrations.
func (*Store) DeleteBranch ¶
DeleteBranch removes the branch record identified by uuid.
func (*Store) InsertIssueWithBranch ¶
InsertIssueWithBranch inserts an issue and its linked branch in a single transaction.
func (*Store) ListBranches ¶
ListBranches returns all branches joined with their issue and status, ordered by created_at DESC. BranchStatusAll returns every row.