quintodrome/model/library.go

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

24 lines
288 B
Go
Raw Normal View History

2024-05-07 07:28:44 -08:00
package model
import (
"io/fs"
"os"
)
type Library struct {
ID int32
Name string
Path string
}
func (f Library) FS() fs.FS {
return os.DirFS(f.Path)
}
type Libraries []Library
type LibraryRepository interface {
Get(id int32) (*Library, error)
GetAll() (Libraries, error)
}