quintodrome/model/mediafolder.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
314 B
Go
Raw Normal View History

2020-01-14 18:22:34 -09:00
package model
2016-02-24 15:14:48 -09:00
2022-09-14 17:09:39 -08:00
import (
"io/fs"
"os"
)
2016-02-24 15:14:48 -09:00
type MediaFolder struct {
2020-05-09 18:29:02 -08:00
ID int32
2016-02-24 15:14:48 -09:00
Name string
Path string
}
2022-09-14 17:09:39 -08:00
func (f MediaFolder) FS() fs.FS {
return os.DirFS(f.Path)
}
2016-03-03 17:01:55 -09:00
type MediaFolders []MediaFolder
type MediaFolderRepository interface {
2020-10-25 17:52:51 -08:00
Get(id int32) (*MediaFolder, error)
GetAll() (MediaFolders, error)
}