photoprism/internal/form/folder.go
Michael Mayer a7122ff4e1 Add /folders API to get directory lists for browsing #260
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-22 16:29:12 +02:00

23 lines
655 B
Go

package form
import "github.com/ulule/deepcopier"
// Folder represents a file system directory edit form.
type Folder struct {
Root string `json:"Root"`
Path string `json:"Path"`
FolderType string `json:"Type"`
FolderOrder string `json:"Order"`
FolderTitle string `json:"Title"`
FolderDescription string `json:"Description"`
FolderFavorite bool `json:"Favorite"`
FolderIgnore bool `json:"Ignore"`
FolderHidden bool `json:"Hidden"`
FolderWatch bool `json:"Watch"`
}
func NewFolder(m interface{}) (f Folder, err error) {
err = deepcopier.Copy(m).To(&f)
return f, err
}