knox 修订了这个 Gist . 跳至此修订
1 file changed, 11 insertions
Filestash-readme-1.go(file created)
@@ -0,0 +1,11 @@ | |||
1 | + | type IBackend interface { | |
2 | + | Init(params map[string]string, app *App) (IBackend, error) // constructor | |
3 | + | Ls(path string) ([]os.FileInfo, error) // list files in a folder | |
4 | + | Cat(path string) (io.ReadCloser, error) // download a file | |
5 | + | Mkdir(path string) error // create a folder | |
6 | + | Rm(path string) error // remove something | |
7 | + | Mv(from string, to string) error // rename something | |
8 | + | Save(path string, file io.Reader) error // save a file | |
9 | + | Touch(path string) error // create a file | |
10 | + | LoginForm() Form // dynamic form generation for the login | |
11 | + | } |
更新
更早