aboutsummaryrefslogtreecommitdiffstats
path: root/repository/repo.go
diff options
context:
space:
mode:
authorKalin Staykov <k.t.staykov@gmail.com>2022-11-26 15:49:59 +0200
committerMichael Muré <batolettre@gmail.com>2023-01-11 14:58:58 +0100
commitfc266b733cf0ea794209031e3500ab3f86db6cee (patch)
treebae1996ec19fb74446429200e52cdb942f60ac54 /repository/repo.go
parent9c50a359704f4edd2f33df6d256e032feae3a576 (diff)
downloadgit-bug-fc266b733cf0ea794209031e3500ab3f86db6cee.tar.gz
add wipe sub-command that remove local bugs and identities
Diffstat (limited to 'repository/repo.go')
-rw-r--r--repository/repo.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/repository/repo.go b/repository/repo.go
index 66baec65..c39051d5 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