diff options
author | Michael Muré <batolettre@gmail.com> | 2023-01-14 14:21:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-14 14:21:01 +0100 |
commit | 98eb1c111efb22ddb02ab71779f1862abab4baa5 (patch) | |
tree | bb4d8bc2c1fd5614d274dab272e7dae03da5496b /repository/repo.go | |
parent | 9c50a359704f4edd2f33df6d256e032feae3a576 (diff) | |
parent | 5bf274e64a3486bba21edd9bf455089839219f25 (diff) | |
download | git-bug-98eb1c111efb22ddb02ab71779f1862abab4baa5.tar.gz git-bug-98eb1c111efb22ddb02ab71779f1862abab4baa5.zip |
Merge pull request #933 from zinderic/feat-cleanup-subcommand
add cleanup sub-command that remove local bugs and identities
Diffstat (limited to 'repository/repo.go')
-rw-r--r-- | repository/repo.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/repository/repo.go b/repository/repo.go index 66baec652..c39051d59 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -76,10 +76,15 @@ type RepoCommon interface { GetRemotes() (map[string]string, error) } +type LocalStorage interface { + billy.Filesystem + RemoveAll(path string) error +} + // RepoStorage give access to the filesystem type RepoStorage interface { // LocalStorage return a billy.Filesystem giving access to $RepoPath/.git/git-bug - LocalStorage() billy.Filesystem + LocalStorage() LocalStorage } // RepoIndex gives access to full-text search indexes @@ -103,6 +108,9 @@ type Index interface { // DocCount returns the number of document in the index. DocCount() (uint64, error) + // Remove delete one document in the index. + Remove(id string) error + // Clear empty the index. Clear() error |