You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
396 B
Go
19 lines
396 B
Go
package storage
|
|
|
|
import "io"
|
|
|
|
type File struct {
|
|
Name string `json:"name"`
|
|
AbsolutePath string `json:"absolute_path"`
|
|
Contents io.Reader `json:"-"`
|
|
}
|
|
|
|
type Filestore interface {
|
|
Get(name string) (*File, error)
|
|
Set(file *File) error
|
|
Delete(file *File) error
|
|
Exists(name string) (bool, error)
|
|
MakeDirectory(name string) error
|
|
DirectoryExists(name string) (bool, error)
|
|
}
|