stash/pkg/models/tag.go

31 lines
886 B
Go
Raw Normal View History

2020-09-15 07:28:53 +00:00
package models
type TagReader interface {
Find(id int) (*Tag, error)
FindMany(ids []int) ([]*Tag, error)
FindBySceneID(sceneID int) ([]*Tag, error)
FindByPerformerID(performerID int) ([]*Tag, error)
2020-09-15 07:28:53 +00:00
FindBySceneMarkerID(sceneMarkerID int) ([]*Tag, error)
FindByImageID(imageID int) ([]*Tag, error)
FindByGalleryID(galleryID int) ([]*Tag, error)
FindByName(name string, nocase bool) (*Tag, error)
FindByNames(names []string, nocase bool) ([]*Tag, error)
Count() (int, error)
2020-09-15 07:28:53 +00:00
All() ([]*Tag, error)
Query(tagFilter *TagFilterType, findFilter *FindFilterType) ([]*Tag, int, error)
GetImage(tagID int) ([]byte, error)
2020-09-15 07:28:53 +00:00
}
type TagWriter interface {
Create(newTag Tag) (*Tag, error)
Update(updatedTag Tag) (*Tag, error)
Destroy(id int) error
UpdateImage(tagID int, image []byte) error
DestroyImage(tagID int) error
2020-09-15 07:28:53 +00:00
}
type TagReaderWriter interface {
TagReader
TagWriter
}