Separate out LocalPublishedStorage interface. #15

This commit is contained in:
Andrey Smirnov
2014-07-18 17:44:54 +04:00
parent 7a7bb56557
commit 96e878a2e0
6 changed files with 21 additions and 14 deletions
+6 -2
View File
@@ -25,8 +25,6 @@ type PackagePool interface {
// PublishedStorage is abstraction of filesystem storing all published repositories
type PublishedStorage interface {
// XXX: REMOVE: PublicPath returns root of public part
PublicPath() string
// MkDir creates directory recursively under public path
MkDir(path string) error
// PutFile puts file into published storage at specified path
@@ -43,6 +41,12 @@ type PublishedStorage interface {
RenameFile(oldName, newName string) error
}
// LocalPublishedStorage is published storage on local filesystem
type LocalPublishedStorage interface {
// PublicPath returns root of public part
PublicPath() string
}
// Progress is a progress displaying entity, it allows progress bars & simple prints
type Progress interface {
// Writer interface to support progress bar ticking