Documentation
¶
Index ¶
- func NewPRTrackingRepository() pullrequest.PRTrackingRepository
- type PRTrackingRepository
- func (r *PRTrackingRepository) Clear() error
- func (r *PRTrackingRepository) Fetch(prIdentifier pullrequest.PRIdentifier) (*pullrequest.PullRequest, error)
- func (r *PRTrackingRepository) IsEmpty() bool
- func (r *PRTrackingRepository) LoadAll() ([]*pullrequest.PullRequest, error)
- func (r *PRTrackingRepository) Save(prs []*pullrequest.PullRequest) error
- func (r *PRTrackingRepository) Update(pullRequest *pullrequest.PullRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPRTrackingRepository ¶
func NewPRTrackingRepository() pullrequest.PRTrackingRepository
NewPRTrackingRepository creates a new in-memory PR tracking repository.
Types ¶
type PRTrackingRepository ¶
type PRTrackingRepository struct {
// contains filtered or unexported fields
}
PRTrackingRepository is an in-memory implementation of the pullrequest.PRTrackingRepository port. It stores the last saved set of open PR snapshots and is replaced wholesale on every Save call, matching the semantics expected by the use cases.
This implementation is intentionally stateless across process restarts — it exists so the rest of the codebase can be wired and tested before a persistent (JSON / SQLite) adapter is introduced.
func (*PRTrackingRepository) Clear ¶
func (r *PRTrackingRepository) Clear() error
Clear removes all stored snapshots.
func (*PRTrackingRepository) Fetch ¶
func (r *PRTrackingRepository) Fetch(prIdentifier pullrequest.PRIdentifier) (*pullrequest.PullRequest, error)
func (*PRTrackingRepository) IsEmpty ¶
func (r *PRTrackingRepository) IsEmpty() bool
func (*PRTrackingRepository) LoadAll ¶
func (r *PRTrackingRepository) LoadAll() ([]*pullrequest.PullRequest, error)
LoadAll returns a copy of the stored snapshots. Returns an empty (non-nil) slice when nothing has been saved yet.
func (*PRTrackingRepository) Save ¶
func (r *PRTrackingRepository) Save(prs []*pullrequest.PullRequest) error
Save replaces the entire stored snapshot set with the provided slice.
func (*PRTrackingRepository) Update ¶
func (r *PRTrackingRepository) Update(pullRequest *pullrequest.PullRequest) error