stash/pkg/models/gallery.go

35 lines
1.2 KiB
Go
Raw Normal View History

2020-09-15 07:28:53 +00:00
package models
type GalleryReader interface {
Find(id int) (*Gallery, error)
2020-09-15 07:28:53 +00:00
FindMany(ids []int) ([]*Gallery, error)
FindByChecksum(checksum string) (*Gallery, error)
FindByPath(path string) (*Gallery, error)
2020-09-15 07:28:53 +00:00
FindBySceneID(sceneID int) (*Gallery, error)
FindByImageID(imageID int) ([]*Gallery, error)
ValidGalleriesForScenePath(scenePath string) ([]*Gallery, error)
Count() (int, error)
2020-09-15 07:28:53 +00:00
All() ([]*Gallery, error)
Query(galleryFilter *GalleryFilterType, findFilter *FindFilterType) ([]*Gallery, int, error)
GetPerformerIDs(galleryID int) ([]int, error)
GetTagIDs(galleryID int) ([]int, error)
GetImageIDs(galleryID int) ([]int, error)
2020-09-15 07:28:53 +00:00
}
type GalleryWriter interface {
Create(newGallery Gallery) (*Gallery, error)
Update(updatedGallery Gallery) (*Gallery, error)
UpdatePartial(updatedGallery GalleryPartial) (*Gallery, error)
UpdateFileModTime(id int, modTime NullSQLiteTimestamp) error
Destroy(id int) error
ClearGalleryId(sceneID int) error
UpdatePerformers(galleryID int, performerIDs []int) error
UpdateTags(galleryID int, tagIDs []int) error
UpdateImages(galleryID int, imageIDs []int) error
2020-09-15 07:28:53 +00:00
}
type GalleryReaderWriter interface {
GalleryReader
GalleryWriter
}