another round of edits, still need to figure out return types
This commit is contained in:
@@ -5,12 +5,10 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
type LocalStorage struct {
|
type LocalStorage struct {
|
||||||
BaseDir string,
|
BaseDir string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (s *LocalStorage) UploadFile(dirPath string, filename string, data io.Reader) error {
|
func (s *LocalStorage) UploadFile(dirPath string, filename string, data io.Reader) error {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
package storage
|
package storage
|
||||||
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
type Storage interface {
|
type Storage interface {
|
||||||
UploadFile(dirPath string, filename string, data io.Reader) error
|
UploadFile(dirPath string, filename string, data io.Reader) error
|
||||||
ListFiles(dirPath string) ([]FileNode, error)
|
ListFiles(dirPath string) ([]FileNode, error)
|
||||||
@@ -18,8 +16,8 @@ type Storage interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type FileNode struct {
|
type FileNode struct {
|
||||||
BasePath string,
|
RelativeBasePath string
|
||||||
FileName string,
|
FileName string
|
||||||
IsDirectory bool,
|
IsDirectory bool
|
||||||
FileSize uint64,
|
FileSize uint64
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user