add download handler
This commit is contained in:
@@ -24,6 +24,7 @@ var (
|
||||
type IStore interface {
|
||||
Save(bm *BookMetadata, content io.ReadCloser) error
|
||||
Search(value string) ([]BookMetadata, error)
|
||||
GetStoreDir() string
|
||||
}
|
||||
|
||||
var _ IStore = (*BookStore)(nil)
|
||||
@@ -168,6 +169,10 @@ func (bs *BookStore) Done() <-chan struct{} {
|
||||
return chDone
|
||||
}
|
||||
|
||||
func (bs *BookStore) GetStoreDir() string {
|
||||
return bs.dir
|
||||
}
|
||||
|
||||
func (bs *BookStore) Save(bm *BookMetadata, content io.ReadCloser) error {
|
||||
bs.processing.Add(1)
|
||||
defer bs.processing.Done()
|
||||
|
||||
Reference in New Issue
Block a user