Filestash-readme-1.go
· 679 B · Go
Raw
type IBackend interface {
Init(params map[string]string, app *App) (IBackend, error) // constructor
Ls(path string) ([]os.FileInfo, error) // list files in a folder
Cat(path string) (io.ReadCloser, error) // download a file
Mkdir(path string) error // create a folder
Rm(path string) error // remove something
Mv(from string, to string) error // rename something
Save(path string, file io.Reader) error // save a file
Touch(path string) error // create a file
LoginForm() Form // dynamic form generation for the login
}
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 | } |