convert MemorizeList to be repository based
Ideally, code that uses a repository shouldn't directly interact with the underlying backend. Thus, move MemorizeList one layer up.
This commit is contained in:
parent
1b8a67fe76
commit
c7b770eb1f
42 changed files with 209 additions and 223 deletions
|
@ -27,7 +27,7 @@ type Backend interface {
|
|||
// HasAtomicReplace returns whether Save() can atomically replace files
|
||||
HasAtomicReplace() bool
|
||||
|
||||
// Remove removes a File described by h.
|
||||
// Remove removes a File described by h.
|
||||
Remove(ctx context.Context, h Handle) error
|
||||
|
||||
// Close the backend
|
||||
|
@ -110,8 +110,3 @@ type FileInfo struct {
|
|||
type ApplyEnvironmenter interface {
|
||||
ApplyEnvironment(prefix string)
|
||||
}
|
||||
|
||||
// Lister allows listing files in a backend.
|
||||
type Lister interface {
|
||||
List(context.Context, FileType, func(FileInfo) error) error
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue