2020-09-15 07:28:53 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
type GalleryReader interface {
|
2021-01-18 01:23:20 +00:00
|
|
|
Find(id int) (*Gallery, error)
|
2020-09-15 07:28:53 +00:00
|
|
|
FindMany(ids []int) ([]*Gallery, error)
|
2020-09-20 08:36:02 +00:00
|
|
|
FindByChecksum(checksum string) (*Gallery, error)
|
|
|
|
FindByPath(path string) (*Gallery, error)
|
2020-09-15 07:28:53 +00:00
|
|
|
FindBySceneID(sceneID int) (*Gallery, error)
|
2020-10-12 23:12:46 +00:00
|
|
|
FindByImageID(imageID int) ([]*Gallery, error)
|
2021-01-18 01:23:20 +00:00
|
|
|
ValidGalleriesForScenePath(scenePath string) ([]*Gallery, error)
|
|
|
|
Count() (int, error)
|
2020-09-15 07:28:53 +00:00
|
|
|
All() ([]*Gallery, error)
|
2021-01-18 01:23:20 +00:00
|
|
|
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 {
|
2020-09-20 08:36:02 +00:00
|
|
|
Create(newGallery Gallery) (*Gallery, error)
|
|
|
|
Update(updatedGallery Gallery) (*Gallery, error)
|
2021-01-18 01:23:20 +00:00
|
|
|
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
|
|
|
|
}
|