Documentation ¶
Index ¶
- Constants
- Variables
- func MatchScrapedSceneMovie(m *ScrapedSceneMovie) error
- func MatchScrapedScenePerformer(p *ScrapedScenePerformer) error
- func MatchScrapedSceneStudio(s *ScrapedSceneStudio) error
- func MatchScrapedSceneTag(s *ScrapedSceneTag) error
- func SQLGenKeys(i interface{}) string
- func SQLGenKeysPartial(i interface{}) string
- type GalleriesImages
- type GalleriesTags
- type Gallery
- type GalleryNullSceneID
- type GalleryPartial
- type GalleryQueryBuilder
- func (qb *GalleryQueryBuilder) All() ([]*Gallery, error)
- func (qb *GalleryQueryBuilder) ClearGalleryId(sceneID int, tx *sqlx.Tx) error
- func (qb *GalleryQueryBuilder) Count() (int, error)
- func (qb *GalleryQueryBuilder) CountByImageID(imageID int) (int, error)
- func (qb *GalleryQueryBuilder) Create(newGallery Gallery, tx *sqlx.Tx) (*Gallery, error)
- func (qb *GalleryQueryBuilder) Destroy(id int, tx *sqlx.Tx) error
- func (qb *GalleryQueryBuilder) Find(id int, tx *sqlx.Tx) (*Gallery, error)
- func (qb *GalleryQueryBuilder) FindByChecksum(checksum string, tx *sqlx.Tx) (*Gallery, error)
- func (qb *GalleryQueryBuilder) FindByImageID(imageID int, tx *sqlx.Tx) ([]*Gallery, error)
- func (qb *GalleryQueryBuilder) FindByPath(path string) (*Gallery, error)
- func (qb *GalleryQueryBuilder) FindBySceneID(sceneID int, tx *sqlx.Tx) (*Gallery, error)
- func (qb *GalleryQueryBuilder) FindMany(ids []int) ([]*Gallery, error)
- func (qb *GalleryQueryBuilder) Query(galleryFilter *GalleryFilterType, findFilter *FindFilterType) ([]*Gallery, int)
- func (qb *GalleryQueryBuilder) Update(updatedGallery Gallery, tx *sqlx.Tx) (*Gallery, error)
- func (qb *GalleryQueryBuilder) UpdateChecksum(id int, checksum string, tx *sqlx.Tx) error
- func (qb *GalleryQueryBuilder) UpdateFileModTime(id int, modTime NullSQLiteTimestamp, tx *sqlx.Tx) error
- func (qb *GalleryQueryBuilder) UpdatePartial(updatedGallery GalleryPartial, tx *sqlx.Tx) (*Gallery, error)
- func (qb *GalleryQueryBuilder) ValidGalleriesForScenePath(scenePath string) ([]*Gallery, error)
- type GalleryReader
- type GalleryReaderWriter
- type GalleryWriter
- type Image
- type ImageFileType
- type ImagePartial
- type ImageQueryBuilder
- func (qb *ImageQueryBuilder) All() ([]*Image, error)
- func (qb *ImageQueryBuilder) Count() (int, error)
- func (qb *ImageQueryBuilder) CountByGalleryID(galleryID int) (int, error)
- func (qb *ImageQueryBuilder) CountByPerformerID(performerID int) (int, error)
- func (qb *ImageQueryBuilder) CountByStudioID(studioID int) (int, error)
- func (qb *ImageQueryBuilder) CountByTagID(tagID int) (int, error)
- func (qb *ImageQueryBuilder) Create(newImage Image, tx *sqlx.Tx) (*Image, error)
- func (qb *ImageQueryBuilder) DecrementOCounter(id int, tx *sqlx.Tx) (int, error)
- func (qb *ImageQueryBuilder) Destroy(id int, tx *sqlx.Tx) error
- func (qb *ImageQueryBuilder) Find(id int) (*Image, error)
- func (qb *ImageQueryBuilder) FindByChecksum(checksum string) (*Image, error)
- func (qb *ImageQueryBuilder) FindByGalleryID(galleryID int) ([]*Image, error)
- func (qb *ImageQueryBuilder) FindByPath(path string) (*Image, error)
- func (qb *ImageQueryBuilder) FindByPerformerID(performerID int) ([]*Image, error)
- func (qb *ImageQueryBuilder) FindByStudioID(studioID int) ([]*Image, error)
- func (qb *ImageQueryBuilder) FindMany(ids []int) ([]*Image, error)
- func (qb *ImageQueryBuilder) IncrementOCounter(id int, tx *sqlx.Tx) (int, error)
- func (qb *ImageQueryBuilder) Query(imageFilter *ImageFilterType, findFilter *FindFilterType) ([]*Image, int)
- func (qb *ImageQueryBuilder) ResetOCounter(id int, tx *sqlx.Tx) (int, error)
- func (qb *ImageQueryBuilder) Size() (uint64, error)
- func (qb *ImageQueryBuilder) Update(updatedImage ImagePartial, tx *sqlx.Tx) (*Image, error)
- func (qb *ImageQueryBuilder) UpdateFileModTime(id int, modTime NullSQLiteTimestamp, tx *sqlx.Tx) error
- func (qb *ImageQueryBuilder) UpdateFull(updatedImage Image, tx *sqlx.Tx) (*Image, error)
- type ImageReader
- type ImageReaderWriter
- type ImageWriter
- type ImagesTags
- type JSONTime
- type JoinReader
- type JoinReaderWriter
- type JoinWriter
- type JoinsQueryBuilder
- func (qb *JoinsQueryBuilder) AddGalleryTag(galleryID int, tagID int, tx *sqlx.Tx) (bool, error)
- func (qb *JoinsQueryBuilder) AddImageGallery(imageID int, galleryID int, tx *sqlx.Tx) (bool, error)
- func (qb *JoinsQueryBuilder) AddImageTag(imageID int, tagID int, tx *sqlx.Tx) (bool, error)
- func (qb *JoinsQueryBuilder) AddMoviesScene(sceneID int, movieID int, sceneIdx *int, tx *sqlx.Tx) (bool, error)
- func (qb *JoinsQueryBuilder) AddPerformerGallery(galleryID int, performerID int, tx *sqlx.Tx) (bool, error)
- func (qb *JoinsQueryBuilder) AddPerformerImage(imageID int, performerID int, tx *sqlx.Tx) (bool, error)
- func (qb *JoinsQueryBuilder) AddPerformerScene(sceneID int, performerID int, tx *sqlx.Tx) (bool, error)
- func (qb *JoinsQueryBuilder) AddSceneTag(sceneID int, tagID int, tx *sqlx.Tx) (bool, error)
- func (qb *JoinsQueryBuilder) CreateGalleriesImages(newJoins []GalleriesImages, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) CreateGalleriesTags(newJoins []GalleriesTags, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) CreateImagesTags(newJoins []ImagesTags, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) CreateMoviesScenes(newJoins []MoviesScenes, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) CreatePerformersGalleries(newJoins []PerformersGalleries, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) CreatePerformersImages(newJoins []PerformersImages, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) CreatePerformersScenes(newJoins []PerformersScenes, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) CreateSceneMarkersTags(newJoins []SceneMarkersTags, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) CreateScenesTags(newJoins []ScenesTags, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) CreateStashIDs(entityName string, entityID int, newJoins []StashID, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) DestroyGalleriesTags(galleryID int, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) DestroyImageGalleries(imageID int, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) DestroyImagesTags(imageID int, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) DestroyMoviesScenes(sceneID int, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) DestroyPerformersGalleries(galleryID int, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) DestroyPerformersImages(imageID int, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) DestroyPerformersScenes(sceneID int, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) DestroySceneMarkersTags(sceneMarkerID int, updatedJoins []SceneMarkersTags, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) DestroyScenesGalleries(sceneID int, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) DestroyScenesMarkers(sceneID int, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) DestroyScenesTags(sceneID int, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) GetGalleryPerformers(galleryID int, tx *sqlx.Tx) ([]PerformersGalleries, error)
- func (qb *JoinsQueryBuilder) GetGalleryTags(galleryID int, tx *sqlx.Tx) ([]GalleriesTags, error)
- func (qb *JoinsQueryBuilder) GetImageGalleries(imageID int, tx *sqlx.Tx) ([]GalleriesImages, error)
- func (qb *JoinsQueryBuilder) GetImagePerformers(imageID int, tx *sqlx.Tx) ([]PerformersImages, error)
- func (qb *JoinsQueryBuilder) GetImageTags(imageID int, tx *sqlx.Tx) ([]ImagesTags, error)
- func (qb *JoinsQueryBuilder) GetPerformerStashIDs(performerID int) ([]*StashID, error)
- func (qb *JoinsQueryBuilder) GetSceneMovies(sceneID int, tx *sqlx.Tx) ([]MoviesScenes, error)
- func (qb *JoinsQueryBuilder) GetScenePerformers(sceneID int, tx *sqlx.Tx) ([]PerformersScenes, error)
- func (qb *JoinsQueryBuilder) GetSceneStashIDs(sceneID int) ([]*StashID, error)
- func (qb *JoinsQueryBuilder) GetSceneTags(sceneID int, tx *sqlx.Tx) ([]ScenesTags, error)
- func (qb *JoinsQueryBuilder) GetStudioStashIDs(studioID int) ([]*StashID, error)
- func (qb *JoinsQueryBuilder) RemoveImageGallery(imageID int, galleryID int, tx *sqlx.Tx) (bool, error)
- func (qb *JoinsQueryBuilder) UpdateGalleriesImages(imageID int, updatedJoins []GalleriesImages, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) UpdateGalleriesTags(galleryID int, updatedJoins []GalleriesTags, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) UpdateImagesTags(imageID int, updatedJoins []ImagesTags, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) UpdateMoviesScenes(sceneID int, updatedJoins []MoviesScenes, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) UpdatePerformerStashIDs(performerID int, updatedJoins []StashID, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) UpdatePerformersGalleries(galleryID int, updatedJoins []PerformersGalleries, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) UpdatePerformersImages(imageID int, updatedJoins []PerformersImages, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) UpdatePerformersScenes(sceneID int, updatedJoins []PerformersScenes, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) UpdateSceneMarkersTags(sceneMarkerID int, updatedJoins []SceneMarkersTags, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) UpdateSceneStashIDs(sceneID int, updatedJoins []StashID, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) UpdateScenesTags(sceneID int, updatedJoins []ScenesTags, tx *sqlx.Tx) error
- func (qb *JoinsQueryBuilder) UpdateStudioStashIDs(studioID int, updatedJoins []StashID, tx *sqlx.Tx) error
- type Movie
- type MoviePartial
- type MovieQueryBuilder
- func (qb *MovieQueryBuilder) All() ([]*Movie, error)
- func (qb *MovieQueryBuilder) AllSlim() ([]*Movie, error)
- func (qb *MovieQueryBuilder) Count() (int, error)
- func (qb *MovieQueryBuilder) Create(newMovie Movie, tx *sqlx.Tx) (*Movie, error)
- func (qb *MovieQueryBuilder) Destroy(id string, tx *sqlx.Tx) error
- func (qb *MovieQueryBuilder) DestroyMovieImages(movieID int, tx *sqlx.Tx) error
- func (qb *MovieQueryBuilder) Find(id int, tx *sqlx.Tx) (*Movie, error)
- func (qb *MovieQueryBuilder) FindByName(name string, tx *sqlx.Tx, nocase bool) (*Movie, error)
- func (qb *MovieQueryBuilder) FindByNames(names []string, tx *sqlx.Tx, nocase bool) ([]*Movie, error)
- func (qb *MovieQueryBuilder) FindBySceneID(sceneID int, tx *sqlx.Tx) ([]*Movie, error)
- func (qb *MovieQueryBuilder) FindMany(ids []int) ([]*Movie, error)
- func (qb *MovieQueryBuilder) GetBackImage(movieID int, tx *sqlx.Tx) ([]byte, error)
- func (qb *MovieQueryBuilder) GetFrontImage(movieID int, tx *sqlx.Tx) ([]byte, error)
- func (qb *MovieQueryBuilder) Query(movieFilter *MovieFilterType, findFilter *FindFilterType) ([]*Movie, int)
- func (qb *MovieQueryBuilder) Update(updatedMovie MoviePartial, tx *sqlx.Tx) (*Movie, error)
- func (qb *MovieQueryBuilder) UpdateFull(updatedMovie Movie, tx *sqlx.Tx) (*Movie, error)
- func (qb *MovieQueryBuilder) UpdateMovieImages(movieID int, frontImage []byte, backImage []byte, tx *sqlx.Tx) error
- type MovieReader
- type MovieReaderWriter
- type MovieWriter
- type MoviesScenes
- type NullSQLiteTimestamp
- type Performer
- type PerformerQueryBuilder
- func (qb *PerformerQueryBuilder) All() ([]*Performer, error)
- func (qb *PerformerQueryBuilder) AllSlim() ([]*Performer, error)
- func (qb *PerformerQueryBuilder) Count() (int, error)
- func (qb *PerformerQueryBuilder) Create(newPerformer Performer, tx *sqlx.Tx) (*Performer, error)
- func (qb *PerformerQueryBuilder) Destroy(id string, tx *sqlx.Tx) error
- func (qb *PerformerQueryBuilder) DestroyPerformerImage(performerID int, tx *sqlx.Tx) error
- func (qb *PerformerQueryBuilder) Find(id int) (*Performer, error)
- func (qb *PerformerQueryBuilder) FindByGalleryID(galleryID int, tx *sqlx.Tx) ([]*Performer, error)
- func (qb *PerformerQueryBuilder) FindByImageID(imageID int, tx *sqlx.Tx) ([]*Performer, error)
- func (qb *PerformerQueryBuilder) FindByNames(names []string, tx *sqlx.Tx, nocase bool) ([]*Performer, error)
- func (qb *PerformerQueryBuilder) FindBySceneID(sceneID int, tx *sqlx.Tx) ([]*Performer, error)
- func (qb *PerformerQueryBuilder) FindMany(ids []int) ([]*Performer, error)
- func (qb *PerformerQueryBuilder) FindNameBySceneID(sceneID int, tx *sqlx.Tx) ([]*Performer, error)
- func (qb *PerformerQueryBuilder) GetPerformerImage(performerID int, tx *sqlx.Tx) ([]byte, error)
- func (qb *PerformerQueryBuilder) Query(performerFilter *PerformerFilterType, findFilter *FindFilterType) ([]*Performer, int)
- func (qb *PerformerQueryBuilder) Update(updatedPerformer Performer, tx *sqlx.Tx) (*Performer, error)
- func (qb *PerformerQueryBuilder) UpdatePerformerImage(performerID int, image []byte, tx *sqlx.Tx) error
- type PerformerReader
- type PerformerReaderWriter
- type PerformerWriter
- type PerformersGalleries
- type PerformersImages
- type PerformersScenes
- type SQLiteDate
- type SQLiteTimestamp
- type Scene
- type SceneFileType
- type SceneMarker
- type SceneMarkerQueryBuilder
- func (qb *SceneMarkerQueryBuilder) CountByTagID(tagID int) (int, error)
- func (qb *SceneMarkerQueryBuilder) Create(newSceneMarker SceneMarker, tx *sqlx.Tx) (*SceneMarker, error)
- func (qb *SceneMarkerQueryBuilder) Destroy(id string, tx *sqlx.Tx) error
- func (qb *SceneMarkerQueryBuilder) Find(id int) (*SceneMarker, error)
- func (qb *SceneMarkerQueryBuilder) FindBySceneID(sceneID int, tx *sqlx.Tx) ([]*SceneMarker, error)
- func (qb *SceneMarkerQueryBuilder) FindMany(ids []int) ([]*SceneMarker, error)
- func (qb *SceneMarkerQueryBuilder) GetMarkerStrings(q *string, sort *string) ([]*MarkerStringsResultType, error)
- func (qb *SceneMarkerQueryBuilder) Query(sceneMarkerFilter *SceneMarkerFilterType, findFilter *FindFilterType) ([]*SceneMarker, int)
- func (qb *SceneMarkerQueryBuilder) Update(updatedSceneMarker SceneMarker, tx *sqlx.Tx) (*SceneMarker, error)
- func (qb *SceneMarkerQueryBuilder) Wall(q *string) ([]*SceneMarker, error)
- type SceneMarkerReader
- type SceneMarkerReaderWriter
- type SceneMarkerWriter
- type SceneMarkersTags
- type ScenePartial
- type SceneQueryBuilder
- func (qb *SceneQueryBuilder) All() ([]*Scene, error)
- func (qb *SceneQueryBuilder) Count() (int, error)
- func (qb *SceneQueryBuilder) CountByMovieID(movieID int) (int, error)
- func (qb *SceneQueryBuilder) CountByPerformerID(performerID int) (int, error)
- func (qb *SceneQueryBuilder) CountByStudioID(studioID int) (int, error)
- func (qb *SceneQueryBuilder) CountByTagID(tagID int) (int, error)
- func (qb *SceneQueryBuilder) CountMissingChecksum() (int, error)
- func (qb *SceneQueryBuilder) CountMissingOSHash() (int, error)
- func (qb *SceneQueryBuilder) Create(newScene Scene, tx *sqlx.Tx) (*Scene, error)
- func (qb *SceneQueryBuilder) DecrementOCounter(id int, tx *sqlx.Tx) (int, error)
- func (qb *SceneQueryBuilder) Destroy(id string, tx *sqlx.Tx) error
- func (qb *SceneQueryBuilder) DestroySceneCover(sceneID int, tx *sqlx.Tx) error
- func (qb *SceneQueryBuilder) Find(id int) (*Scene, error)
- func (qb *SceneQueryBuilder) FindByChecksum(checksum string) (*Scene, error)
- func (qb *SceneQueryBuilder) FindByMovieID(movieID int) ([]*Scene, error)
- func (qb *SceneQueryBuilder) FindByOSHash(oshash string) (*Scene, error)
- func (qb *SceneQueryBuilder) FindByPath(path string) (*Scene, error)
- func (qb *SceneQueryBuilder) FindByPerformerID(performerID int) ([]*Scene, error)
- func (qb *SceneQueryBuilder) FindByStudioID(studioID int) ([]*Scene, error)
- func (qb *SceneQueryBuilder) FindMany(ids []int) ([]*Scene, error)
- func (qb *SceneQueryBuilder) GetSceneCover(sceneID int, tx *sqlx.Tx) ([]byte, error)
- func (qb *SceneQueryBuilder) IncrementOCounter(id int, tx *sqlx.Tx) (int, error)
- func (qb *SceneQueryBuilder) Query(sceneFilter *SceneFilterType, findFilter *FindFilterType) ([]*Scene, int)
- func (qb *SceneQueryBuilder) QueryAllByPathRegex(regex string) ([]*Scene, error)
- func (qb *SceneQueryBuilder) QueryByPathRegex(findFilter *FindFilterType) ([]*Scene, int)
- func (qb *SceneQueryBuilder) ResetOCounter(id int, tx *sqlx.Tx) (int, error)
- func (qb *SceneQueryBuilder) Size() (uint64, error)
- func (qb *SceneQueryBuilder) Update(updatedScene ScenePartial, tx *sqlx.Tx) (*Scene, error)
- func (qb *SceneQueryBuilder) UpdateChecksum(id int, checksum string, tx *sqlx.Tx) error
- func (qb *SceneQueryBuilder) UpdateFileModTime(id int, modTime NullSQLiteTimestamp, tx *sqlx.Tx) error
- func (qb *SceneQueryBuilder) UpdateFormat(id int, format string, tx *sqlx.Tx) error
- func (qb *SceneQueryBuilder) UpdateFull(updatedScene Scene, tx *sqlx.Tx) (*Scene, error)
- func (qb *SceneQueryBuilder) UpdateOSHash(id int, oshash string, tx *sqlx.Tx) error
- func (qb *SceneQueryBuilder) UpdateSceneCover(sceneID int, cover []byte, tx *sqlx.Tx) error
- func (qb *SceneQueryBuilder) Wall(q *string) ([]*Scene, error)
- type SceneReader
- type SceneReaderWriter
- type SceneWriter
- type ScenesTags
- type ScrapedGalleryStash
- type ScrapedItem
- type ScrapedItemQueryBuilder
- func (qb *ScrapedItemQueryBuilder) All() ([]*ScrapedItem, error)
- func (qb *ScrapedItemQueryBuilder) Create(newScrapedItem ScrapedItem, tx *sqlx.Tx) (*ScrapedItem, error)
- func (qb *ScrapedItemQueryBuilder) Find(id int) (*ScrapedItem, error)
- func (qb *ScrapedItemQueryBuilder) Update(updatedScrapedItem ScrapedItem, tx *sqlx.Tx) (*ScrapedItem, error)
- type ScrapedMovie
- type ScrapedMovieStudio
- type ScrapedPerformer
- type ScrapedPerformerStash
- type ScrapedScene
- type ScrapedSceneMovie
- type ScrapedScenePerformer
- type ScrapedSceneStash
- type ScrapedSceneStudio
- type ScrapedSceneTag
- type StashID
- type Studio
- type StudioPartial
- type StudioQueryBuilder
- func (qb *StudioQueryBuilder) All() ([]*Studio, error)
- func (qb *StudioQueryBuilder) AllSlim() ([]*Studio, error)
- func (qb *StudioQueryBuilder) Count() (int, error)
- func (qb *StudioQueryBuilder) Create(newStudio Studio, tx *sqlx.Tx) (*Studio, error)
- func (qb *StudioQueryBuilder) Destroy(id string, tx *sqlx.Tx) error
- func (qb *StudioQueryBuilder) DestroyStudioImage(studioID int, tx *sqlx.Tx) error
- func (qb *StudioQueryBuilder) Find(id int, tx *sqlx.Tx) (*Studio, error)
- func (qb *StudioQueryBuilder) FindByName(name string, tx *sqlx.Tx, nocase bool) (*Studio, error)
- func (qb *StudioQueryBuilder) FindBySceneID(sceneID int) (*Studio, error)
- func (qb *StudioQueryBuilder) FindChildren(id int, tx *sqlx.Tx) ([]*Studio, error)
- func (qb *StudioQueryBuilder) FindMany(ids []int) ([]*Studio, error)
- func (qb *StudioQueryBuilder) GetStudioImage(studioID int, tx *sqlx.Tx) ([]byte, error)
- func (qb *StudioQueryBuilder) Query(studioFilter *StudioFilterType, findFilter *FindFilterType) ([]*Studio, int)
- func (qb *StudioQueryBuilder) Update(updatedStudio StudioPartial, tx *sqlx.Tx) (*Studio, error)
- func (qb *StudioQueryBuilder) UpdateFull(updatedStudio Studio, tx *sqlx.Tx) (*Studio, error)
- func (qb *StudioQueryBuilder) UpdateStudioImage(studioID int, image []byte, tx *sqlx.Tx) error
- type StudioReader
- type StudioReaderWriter
- type StudioWriter
- type Tag
- type TagQueryBuilder
- func (qb *TagQueryBuilder) All() ([]*Tag, error)
- func (qb *TagQueryBuilder) AllSlim() ([]*Tag, error)
- func (qb *TagQueryBuilder) Count() (int, error)
- func (qb *TagQueryBuilder) Create(newTag Tag, tx *sqlx.Tx) (*Tag, error)
- func (qb *TagQueryBuilder) Destroy(id string, tx *sqlx.Tx) error
- func (qb *TagQueryBuilder) DestroyTagImage(tagID int, tx *sqlx.Tx) error
- func (qb *TagQueryBuilder) Find(id int, tx *sqlx.Tx) (*Tag, error)
- func (qb *TagQueryBuilder) FindByGalleryID(galleryID int, tx *sqlx.Tx) ([]*Tag, error)
- func (qb *TagQueryBuilder) FindByImageID(imageID int, tx *sqlx.Tx) ([]*Tag, error)
- func (qb *TagQueryBuilder) FindByName(name string, tx *sqlx.Tx, nocase bool) (*Tag, error)
- func (qb *TagQueryBuilder) FindByNames(names []string, tx *sqlx.Tx, nocase bool) ([]*Tag, error)
- func (qb *TagQueryBuilder) FindBySceneID(sceneID int, tx *sqlx.Tx) ([]*Tag, error)
- func (qb *TagQueryBuilder) FindBySceneMarkerID(sceneMarkerID int, tx *sqlx.Tx) ([]*Tag, error)
- func (qb *TagQueryBuilder) FindMany(ids []int) ([]*Tag, error)
- func (qb *TagQueryBuilder) GetTagImage(tagID int, tx *sqlx.Tx) ([]byte, error)
- func (qb *TagQueryBuilder) Query(tagFilter *TagFilterType, findFilter *FindFilterType) ([]*Tag, int)
- func (qb *TagQueryBuilder) Update(updatedTag Tag, tx *sqlx.Tx) (*Tag, error)
- func (qb *TagQueryBuilder) UpdateTagImage(tagID int, image []byte, tx *sqlx.Tx) error
- type TagReader
- type TagReaderWriter
- type TagWriter
Constants ¶
const DefaultGthumbWidth int = 640
Variables ¶
var DefaultMovieImage = "" /* 562-byte string literal not displayed */
var DefaultStudioImage = "" /* 562-byte string literal not displayed */
var DefaultTagImage = []byte(`<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="200"
height="200"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="tag.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#000000"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="181.77771"
inkscape:cy="279.72376"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-157.84358,-524.69522)">
<path
id="path2987"
d="m 229.94314,669.26549 -36.08466,-36.08466 c -4.68653,-4.68653 -4.68653,-12.28468 0,-16.97121 l 36.08466,-36.08467 a 12.000453,12.000453 0 0 1 8.4856,-3.5148 l 74.91443,0 c 6.62761,0 12.00041,5.3728 12.00041,12.00041 l 0,72.16933 c 0,6.62761 -5.3728,12.00041 -12.00041,12.00041 l -74.91443,0 a 12.000453,12.000453 0 0 1 -8.4856,-3.51481 z m -13.45639,-53.05587 c -4.68653,4.68653 -4.68653,12.28468 0,16.97121 4.68652,4.68652 12.28467,4.68652 16.9712,0 4.68653,-4.68653 4.68653,-12.28468 0,-16.97121 -4.68653,-4.68652 -12.28468,-4.68652 -16.9712,0 z"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1" />
</g>
</svg>`)
Original Tag image from: https://fontawesome.com/icons/tag?style=solid Modified to change color and rotate Licensed under CC Attribution 4.0: https://fontawesome.com/license
Functions ¶
func MatchScrapedSceneMovie ¶ added in v0.4.0
func MatchScrapedSceneMovie(m *ScrapedSceneMovie) error
MatchScrapedSceneMovie matches the provided movie with the movies in the database and sets the ID field if one is found.
func MatchScrapedScenePerformer ¶ added in v0.4.0
func MatchScrapedScenePerformer(p *ScrapedScenePerformer) error
MatchScrapedScenePerformer matches the provided performer with the performers in the database and sets the ID field if one is found.
func MatchScrapedSceneStudio ¶ added in v0.4.0
func MatchScrapedSceneStudio(s *ScrapedSceneStudio) error
MatchScrapedSceneStudio matches the provided studio with the studios in the database and sets the ID field if one is found.
func MatchScrapedSceneTag ¶ added in v0.4.0
func MatchScrapedSceneTag(s *ScrapedSceneTag) error
MatchScrapedSceneTag matches the provided tag with the tags in the database and sets the ID field if one is found.
func SQLGenKeys ¶
func SQLGenKeys(i interface{}) string
https://github.com/jmoiron/sqlx/issues/410 sqlGenKeys is used for passing a struct and returning a string of keys for non empty key:values. These keys are formated keyname=:keyname with a comma seperating them
func SQLGenKeysPartial ¶
func SQLGenKeysPartial(i interface{}) string
support a partial interface. When a partial interface is provided, keys will always be included if the value is not null. The partial interface must therefore consist of pointers
Types ¶
type GalleriesImages ¶ added in v0.4.0
type GalleriesTags ¶ added in v0.4.0
type Gallery ¶
type Gallery struct { ID int `db:"id" json:"id"` Path sql.NullString `db:"path" json:"path"` Checksum string `db:"checksum" json:"checksum"` Zip bool `db:"zip" json:"zip"` Title sql.NullString `db:"title" json:"title"` URL sql.NullString `db:"url" json:"url"` Date SQLiteDate `db:"date" json:"date"` Details sql.NullString `db:"details" json:"details"` Rating sql.NullInt64 `db:"rating" json:"rating"` StudioID sql.NullInt64 `db:"studio_id,omitempty" json:"studio_id"` SceneID sql.NullInt64 `db:"scene_id,omitempty" json:"scene_id"` FileModTime NullSQLiteTimestamp `db:"file_mod_time" json:"file_mod_time"` CreatedAt SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
type GalleryNullSceneID ¶
type GalleryPartial ¶ added in v0.4.0
type GalleryPartial struct { ID int `db:"id" json:"id"` Path *sql.NullString `db:"path" json:"path"` Checksum *string `db:"checksum" json:"checksum"` Title *sql.NullString `db:"title" json:"title"` URL *sql.NullString `db:"url" json:"url"` Date *SQLiteDate `db:"date" json:"date"` Details *sql.NullString `db:"details" json:"details"` Rating *sql.NullInt64 `db:"rating" json:"rating"` StudioID *sql.NullInt64 `db:"studio_id,omitempty" json:"studio_id"` SceneID *sql.NullInt64 `db:"scene_id,omitempty" json:"scene_id"` FileModTime *NullSQLiteTimestamp `db:"file_mod_time" json:"file_mod_time"` CreatedAt *SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt *SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
GalleryPartial represents part of a Gallery object. It is used to update the database entry. Only non-nil fields will be updated.
type GalleryQueryBuilder ¶
type GalleryQueryBuilder struct{}
func NewGalleryQueryBuilder ¶
func NewGalleryQueryBuilder() GalleryQueryBuilder
func (*GalleryQueryBuilder) All ¶
func (qb *GalleryQueryBuilder) All() ([]*Gallery, error)
func (*GalleryQueryBuilder) ClearGalleryId ¶
func (qb *GalleryQueryBuilder) ClearGalleryId(sceneID int, tx *sqlx.Tx) error
func (*GalleryQueryBuilder) Count ¶
func (qb *GalleryQueryBuilder) Count() (int, error)
func (*GalleryQueryBuilder) CountByImageID ¶ added in v0.4.0
func (qb *GalleryQueryBuilder) CountByImageID(imageID int) (int, error)
func (*GalleryQueryBuilder) Destroy ¶ added in v0.2.0
func (qb *GalleryQueryBuilder) Destroy(id int, tx *sqlx.Tx) error
func (*GalleryQueryBuilder) FindByChecksum ¶
func (*GalleryQueryBuilder) FindByImageID ¶ added in v0.4.0
func (*GalleryQueryBuilder) FindByPath ¶
func (qb *GalleryQueryBuilder) FindByPath(path string) (*Gallery, error)
func (*GalleryQueryBuilder) FindBySceneID ¶
func (*GalleryQueryBuilder) FindMany ¶ added in v0.3.0
func (qb *GalleryQueryBuilder) FindMany(ids []int) ([]*Gallery, error)
func (*GalleryQueryBuilder) Query ¶
func (qb *GalleryQueryBuilder) Query(galleryFilter *GalleryFilterType, findFilter *FindFilterType) ([]*Gallery, int)
func (*GalleryQueryBuilder) UpdateChecksum ¶ added in v0.4.0
func (*GalleryQueryBuilder) UpdateFileModTime ¶ added in v0.4.0
func (qb *GalleryQueryBuilder) UpdateFileModTime(id int, modTime NullSQLiteTimestamp, tx *sqlx.Tx) error
func (*GalleryQueryBuilder) UpdatePartial ¶ added in v0.4.0
func (qb *GalleryQueryBuilder) UpdatePartial(updatedGallery GalleryPartial, tx *sqlx.Tx) (*Gallery, error)
func (*GalleryQueryBuilder) ValidGalleriesForScenePath ¶
func (qb *GalleryQueryBuilder) ValidGalleriesForScenePath(scenePath string) ([]*Gallery, error)
type GalleryReader ¶ added in v0.4.0
type GalleryReader interface { // Find(id int) (*Gallery, error) FindMany(ids []int) ([]*Gallery, error) FindByChecksum(checksum string) (*Gallery, error) FindByPath(path string) (*Gallery, error) FindBySceneID(sceneID int) (*Gallery, error) FindByImageID(imageID int) ([]*Gallery, error) // ValidGalleriesForScenePath(scenePath string) ([]*Gallery, error) // Count() (int, error) All() ([]*Gallery, error) }
type GalleryReaderWriter ¶ added in v0.4.0
type GalleryReaderWriter interface { GalleryReader GalleryWriter }
func NewGalleryReaderWriter ¶ added in v0.4.0
func NewGalleryReaderWriter(tx *sqlx.Tx) GalleryReaderWriter
type GalleryWriter ¶ added in v0.4.0
type Image ¶ added in v0.4.0
type Image struct { ID int `db:"id" json:"id"` Checksum string `db:"checksum" json:"checksum"` Path string `db:"path" json:"path"` Title sql.NullString `db:"title" json:"title"` Rating sql.NullInt64 `db:"rating" json:"rating"` OCounter int `db:"o_counter" json:"o_counter"` Size sql.NullInt64 `db:"size" json:"size"` Width sql.NullInt64 `db:"width" json:"width"` Height sql.NullInt64 `db:"height" json:"height"` StudioID sql.NullInt64 `db:"studio_id,omitempty" json:"studio_id"` FileModTime NullSQLiteTimestamp `db:"file_mod_time" json:"file_mod_time"` CreatedAt SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
Image stores the metadata for a single image.
type ImageFileType ¶ added in v0.4.0
type ImageFileType struct { Size *int `graphql:"size" json:"size"` Width *int `graphql:"width" json:"width"` Height *int `graphql:"height" json:"height"` }
ImageFileType represents the file metadata for an image.
type ImagePartial ¶ added in v0.4.0
type ImagePartial struct { ID int `db:"id" json:"id"` Checksum *string `db:"checksum" json:"checksum"` Path *string `db:"path" json:"path"` Title *sql.NullString `db:"title" json:"title"` Rating *sql.NullInt64 `db:"rating" json:"rating"` Size *sql.NullInt64 `db:"size" json:"size"` Width *sql.NullInt64 `db:"width" json:"width"` Height *sql.NullInt64 `db:"height" json:"height"` StudioID *sql.NullInt64 `db:"studio_id,omitempty" json:"studio_id"` FileModTime *NullSQLiteTimestamp `db:"file_mod_time" json:"file_mod_time"` CreatedAt *SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt *SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
ImagePartial represents part of a Image object. It is used to update the database entry. Only non-nil fields will be updated.
type ImageQueryBuilder ¶ added in v0.4.0
type ImageQueryBuilder struct{}
func NewImageQueryBuilder ¶ added in v0.4.0
func NewImageQueryBuilder() ImageQueryBuilder
func (*ImageQueryBuilder) All ¶ added in v0.4.0
func (qb *ImageQueryBuilder) All() ([]*Image, error)
func (*ImageQueryBuilder) Count ¶ added in v0.4.0
func (qb *ImageQueryBuilder) Count() (int, error)
func (*ImageQueryBuilder) CountByGalleryID ¶ added in v0.4.0
func (qb *ImageQueryBuilder) CountByGalleryID(galleryID int) (int, error)
func (*ImageQueryBuilder) CountByPerformerID ¶ added in v0.4.0
func (qb *ImageQueryBuilder) CountByPerformerID(performerID int) (int, error)
func (*ImageQueryBuilder) CountByStudioID ¶ added in v0.4.0
func (qb *ImageQueryBuilder) CountByStudioID(studioID int) (int, error)
func (*ImageQueryBuilder) CountByTagID ¶ added in v0.4.0
func (qb *ImageQueryBuilder) CountByTagID(tagID int) (int, error)
func (*ImageQueryBuilder) DecrementOCounter ¶ added in v0.4.0
func (*ImageQueryBuilder) Destroy ¶ added in v0.4.0
func (qb *ImageQueryBuilder) Destroy(id int, tx *sqlx.Tx) error
func (*ImageQueryBuilder) Find ¶ added in v0.4.0
func (qb *ImageQueryBuilder) Find(id int) (*Image, error)
func (*ImageQueryBuilder) FindByChecksum ¶ added in v0.4.0
func (qb *ImageQueryBuilder) FindByChecksum(checksum string) (*Image, error)
func (*ImageQueryBuilder) FindByGalleryID ¶ added in v0.4.0
func (qb *ImageQueryBuilder) FindByGalleryID(galleryID int) ([]*Image, error)
func (*ImageQueryBuilder) FindByPath ¶ added in v0.4.0
func (qb *ImageQueryBuilder) FindByPath(path string) (*Image, error)
func (*ImageQueryBuilder) FindByPerformerID ¶ added in v0.4.0
func (qb *ImageQueryBuilder) FindByPerformerID(performerID int) ([]*Image, error)
func (*ImageQueryBuilder) FindByStudioID ¶ added in v0.4.0
func (qb *ImageQueryBuilder) FindByStudioID(studioID int) ([]*Image, error)
func (*ImageQueryBuilder) FindMany ¶ added in v0.4.0
func (qb *ImageQueryBuilder) FindMany(ids []int) ([]*Image, error)
func (*ImageQueryBuilder) IncrementOCounter ¶ added in v0.4.0
func (*ImageQueryBuilder) Query ¶ added in v0.4.0
func (qb *ImageQueryBuilder) Query(imageFilter *ImageFilterType, findFilter *FindFilterType) ([]*Image, int)
func (*ImageQueryBuilder) ResetOCounter ¶ added in v0.4.0
func (*ImageQueryBuilder) Size ¶ added in v0.4.0
func (qb *ImageQueryBuilder) Size() (uint64, error)
func (*ImageQueryBuilder) Update ¶ added in v0.4.0
func (qb *ImageQueryBuilder) Update(updatedImage ImagePartial, tx *sqlx.Tx) (*Image, error)
func (*ImageQueryBuilder) UpdateFileModTime ¶ added in v0.4.0
func (qb *ImageQueryBuilder) UpdateFileModTime(id int, modTime NullSQLiteTimestamp, tx *sqlx.Tx) error
func (*ImageQueryBuilder) UpdateFull ¶ added in v0.4.0
type ImageReader ¶ added in v0.4.0
type ImageReader interface { // Find(id int) (*Image, error) FindMany(ids []int) ([]*Image, error) FindByChecksum(checksum string) (*Image, error) FindByGalleryID(galleryID int) ([]*Image, error) // FindByPath(path string) (*Image, error) // FindByPerformerID(performerID int) ([]*Image, error) // CountByPerformerID(performerID int) (int, error) // FindByStudioID(studioID int) ([]*Image, error) // Count() (int, error) // SizeCount() (string, error) // CountByStudioID(studioID int) (int, error) // CountByTagID(tagID int) (int, error) All() ([]*Image, error) }
type ImageReaderWriter ¶ added in v0.4.0
type ImageReaderWriter interface { ImageReader ImageWriter }
func NewImageReaderWriter ¶ added in v0.4.0
func NewImageReaderWriter(tx *sqlx.Tx) ImageReaderWriter
type ImageWriter ¶ added in v0.4.0
type ImagesTags ¶ added in v0.4.0
type JoinReader ¶ added in v0.4.0
type JoinReader interface { // GetScenePerformers(sceneID int) ([]PerformersScenes, error) GetSceneMovies(sceneID int) ([]MoviesScenes, error) }
type JoinReaderWriter ¶ added in v0.4.0
type JoinReaderWriter interface { JoinReader JoinWriter }
func NewJoinReaderWriter ¶ added in v0.4.0
func NewJoinReaderWriter(tx *sqlx.Tx) JoinReaderWriter
type JoinWriter ¶ added in v0.4.0
type JoinWriter interface { CreatePerformersScenes(newJoins []PerformersScenes) error // AddPerformerScene(sceneID int, performerID int) (bool, error) UpdatePerformersScenes(sceneID int, updatedJoins []PerformersScenes) error // DestroyPerformersScenes(sceneID int) error CreateMoviesScenes(newJoins []MoviesScenes) error // AddMoviesScene(sceneID int, movieID int, sceneIdx *int) (bool, error) UpdateMoviesScenes(sceneID int, updatedJoins []MoviesScenes) error // DestroyMoviesScenes(sceneID int) error // CreateScenesTags(newJoins []ScenesTags) error UpdateScenesTags(sceneID int, updatedJoins []ScenesTags) error // AddSceneTag(sceneID int, tagID int) (bool, error) // DestroyScenesTags(sceneID int) error // CreateSceneMarkersTags(newJoins []SceneMarkersTags) error UpdateSceneMarkersTags(sceneMarkerID int, updatedJoins []SceneMarkersTags) error // DestroySceneMarkersTags(sceneMarkerID int, updatedJoins []SceneMarkersTags) error // DestroyScenesGalleries(sceneID int) error // DestroyScenesMarkers(sceneID int) error UpdatePerformersGalleries(galleryID int, updatedJoins []PerformersGalleries) error UpdateGalleriesTags(galleryID int, updatedJoins []GalleriesTags) error UpdateGalleriesImages(imageID int, updatedJoins []GalleriesImages) error UpdatePerformersImages(imageID int, updatedJoins []PerformersImages) error UpdateImagesTags(imageID int, updatedJoins []ImagesTags) error }
type JoinsQueryBuilder ¶
type JoinsQueryBuilder struct{}
func NewJoinsQueryBuilder ¶
func NewJoinsQueryBuilder() JoinsQueryBuilder
func (*JoinsQueryBuilder) AddGalleryTag ¶ added in v0.4.0
AddGalleryTag adds a tag to a gallery. It does not make any change if the tag already exists on the gallery. It returns true if gallery tag was added.
func (*JoinsQueryBuilder) AddImageGallery ¶ added in v0.4.0
AddGalleryImage adds a gallery to an image. It does not make any change if the tag already exists on the image. It returns true if image tag was added.
func (*JoinsQueryBuilder) AddImageTag ¶ added in v0.4.0
AddImageTag adds a tag to a image. It does not make any change if the tag already exists on the image. It returns true if image tag was added.
func (*JoinsQueryBuilder) AddMoviesScene ¶ added in v0.2.0
func (*JoinsQueryBuilder) AddPerformerGallery ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) AddPerformerGallery(galleryID int, performerID int, tx *sqlx.Tx) (bool, error)
AddPerformerGallery adds a performer to a gallery. It does not make any change if the performer already exists on the gallery. It returns true if gallery performer was added.
func (*JoinsQueryBuilder) AddPerformerImage ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) AddPerformerImage(imageID int, performerID int, tx *sqlx.Tx) (bool, error)
AddPerformerImage adds a performer to a image. It does not make any change if the performer already exists on the image. It returns true if image performer was added.
func (*JoinsQueryBuilder) AddPerformerScene ¶
func (qb *JoinsQueryBuilder) AddPerformerScene(sceneID int, performerID int, tx *sqlx.Tx) (bool, error)
AddPerformerScene adds a performer to a scene. It does not make any change if the performer already exists on the scene. It returns true if scene performer was added.
func (*JoinsQueryBuilder) AddSceneTag ¶
AddSceneTag adds a tag to a scene. It does not make any change if the tag already exists on the scene. It returns true if scene tag was added.
func (*JoinsQueryBuilder) CreateGalleriesImages ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) CreateGalleriesImages(newJoins []GalleriesImages, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) CreateGalleriesTags ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) CreateGalleriesTags(newJoins []GalleriesTags, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) CreateImagesTags ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) CreateImagesTags(newJoins []ImagesTags, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) CreateMoviesScenes ¶ added in v0.2.0
func (qb *JoinsQueryBuilder) CreateMoviesScenes(newJoins []MoviesScenes, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) CreatePerformersGalleries ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) CreatePerformersGalleries(newJoins []PerformersGalleries, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) CreatePerformersImages ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) CreatePerformersImages(newJoins []PerformersImages, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) CreatePerformersScenes ¶
func (qb *JoinsQueryBuilder) CreatePerformersScenes(newJoins []PerformersScenes, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) CreateSceneMarkersTags ¶
func (qb *JoinsQueryBuilder) CreateSceneMarkersTags(newJoins []SceneMarkersTags, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) CreateScenesTags ¶
func (qb *JoinsQueryBuilder) CreateScenesTags(newJoins []ScenesTags, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) CreateStashIDs ¶ added in v0.4.0
func (*JoinsQueryBuilder) DestroyGalleriesTags ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) DestroyGalleriesTags(galleryID int, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) DestroyImageGalleries ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) DestroyImageGalleries(imageID int, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) DestroyImagesTags ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) DestroyImagesTags(imageID int, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) DestroyMoviesScenes ¶ added in v0.2.0
func (qb *JoinsQueryBuilder) DestroyMoviesScenes(sceneID int, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) DestroyPerformersGalleries ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) DestroyPerformersGalleries(galleryID int, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) DestroyPerformersImages ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) DestroyPerformersImages(imageID int, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) DestroyPerformersScenes ¶
func (qb *JoinsQueryBuilder) DestroyPerformersScenes(sceneID int, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) DestroySceneMarkersTags ¶
func (qb *JoinsQueryBuilder) DestroySceneMarkersTags(sceneMarkerID int, updatedJoins []SceneMarkersTags, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) DestroyScenesGalleries ¶
func (qb *JoinsQueryBuilder) DestroyScenesGalleries(sceneID int, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) DestroyScenesMarkers ¶
func (qb *JoinsQueryBuilder) DestroyScenesMarkers(sceneID int, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) DestroyScenesTags ¶
func (qb *JoinsQueryBuilder) DestroyScenesTags(sceneID int, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) GetGalleryPerformers ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) GetGalleryPerformers(galleryID int, tx *sqlx.Tx) ([]PerformersGalleries, error)
func (*JoinsQueryBuilder) GetGalleryTags ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) GetGalleryTags(galleryID int, tx *sqlx.Tx) ([]GalleriesTags, error)
func (*JoinsQueryBuilder) GetImageGalleries ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) GetImageGalleries(imageID int, tx *sqlx.Tx) ([]GalleriesImages, error)
func (*JoinsQueryBuilder) GetImagePerformers ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) GetImagePerformers(imageID int, tx *sqlx.Tx) ([]PerformersImages, error)
func (*JoinsQueryBuilder) GetImageTags ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) GetImageTags(imageID int, tx *sqlx.Tx) ([]ImagesTags, error)
func (*JoinsQueryBuilder) GetPerformerStashIDs ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) GetPerformerStashIDs(performerID int) ([]*StashID, error)
func (*JoinsQueryBuilder) GetSceneMovies ¶ added in v0.2.0
func (qb *JoinsQueryBuilder) GetSceneMovies(sceneID int, tx *sqlx.Tx) ([]MoviesScenes, error)
func (*JoinsQueryBuilder) GetScenePerformers ¶
func (qb *JoinsQueryBuilder) GetScenePerformers(sceneID int, tx *sqlx.Tx) ([]PerformersScenes, error)
func (*JoinsQueryBuilder) GetSceneStashIDs ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) GetSceneStashIDs(sceneID int) ([]*StashID, error)
func (*JoinsQueryBuilder) GetSceneTags ¶
func (qb *JoinsQueryBuilder) GetSceneTags(sceneID int, tx *sqlx.Tx) ([]ScenesTags, error)
func (*JoinsQueryBuilder) GetStudioStashIDs ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) GetStudioStashIDs(studioID int) ([]*StashID, error)
func (*JoinsQueryBuilder) RemoveImageGallery ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) RemoveImageGallery(imageID int, galleryID int, tx *sqlx.Tx) (bool, error)
RemoveImageGallery removes a gallery from an image. Returns true if the join was removed.
func (*JoinsQueryBuilder) UpdateGalleriesImages ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) UpdateGalleriesImages(imageID int, updatedJoins []GalleriesImages, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) UpdateGalleriesTags ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) UpdateGalleriesTags(galleryID int, updatedJoins []GalleriesTags, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) UpdateImagesTags ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) UpdateImagesTags(imageID int, updatedJoins []ImagesTags, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) UpdateMoviesScenes ¶ added in v0.2.0
func (qb *JoinsQueryBuilder) UpdateMoviesScenes(sceneID int, updatedJoins []MoviesScenes, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) UpdatePerformerStashIDs ¶ added in v0.4.0
func (*JoinsQueryBuilder) UpdatePerformersGalleries ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) UpdatePerformersGalleries(galleryID int, updatedJoins []PerformersGalleries, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) UpdatePerformersImages ¶ added in v0.4.0
func (qb *JoinsQueryBuilder) UpdatePerformersImages(imageID int, updatedJoins []PerformersImages, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) UpdatePerformersScenes ¶
func (qb *JoinsQueryBuilder) UpdatePerformersScenes(sceneID int, updatedJoins []PerformersScenes, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) UpdateSceneMarkersTags ¶
func (qb *JoinsQueryBuilder) UpdateSceneMarkersTags(sceneMarkerID int, updatedJoins []SceneMarkersTags, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) UpdateSceneStashIDs ¶ added in v0.4.0
func (*JoinsQueryBuilder) UpdateScenesTags ¶
func (qb *JoinsQueryBuilder) UpdateScenesTags(sceneID int, updatedJoins []ScenesTags, tx *sqlx.Tx) error
func (*JoinsQueryBuilder) UpdateStudioStashIDs ¶ added in v0.4.0
type Movie ¶ added in v0.2.0
type Movie struct { ID int `db:"id" json:"id"` Checksum string `db:"checksum" json:"checksum"` Name sql.NullString `db:"name" json:"name"` Aliases sql.NullString `db:"aliases" json:"aliases"` Duration sql.NullInt64 `db:"duration" json:"duration"` Date SQLiteDate `db:"date" json:"date"` Rating sql.NullInt64 `db:"rating" json:"rating"` StudioID sql.NullInt64 `db:"studio_id,omitempty" json:"studio_id"` Director sql.NullString `db:"director" json:"director"` Synopsis sql.NullString `db:"synopsis" json:"synopsis"` URL sql.NullString `db:"url" json:"url"` CreatedAt SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
type MoviePartial ¶ added in v0.2.0
type MoviePartial struct { ID int `db:"id" json:"id"` Checksum *string `db:"checksum" json:"checksum"` Name *sql.NullString `db:"name" json:"name"` Aliases *sql.NullString `db:"aliases" json:"aliases"` Duration *sql.NullInt64 `db:"duration" json:"duration"` Date *SQLiteDate `db:"date" json:"date"` Rating *sql.NullInt64 `db:"rating" json:"rating"` StudioID *sql.NullInt64 `db:"studio_id,omitempty" json:"studio_id"` Director *sql.NullString `db:"director" json:"director"` Synopsis *sql.NullString `db:"synopsis" json:"synopsis"` URL *sql.NullString `db:"url" json:"url"` CreatedAt *SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt *SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
type MovieQueryBuilder ¶ added in v0.2.0
type MovieQueryBuilder struct{}
func NewMovieQueryBuilder ¶ added in v0.2.0
func NewMovieQueryBuilder() MovieQueryBuilder
func (*MovieQueryBuilder) All ¶ added in v0.2.0
func (qb *MovieQueryBuilder) All() ([]*Movie, error)
func (*MovieQueryBuilder) AllSlim ¶ added in v0.2.0
func (qb *MovieQueryBuilder) AllSlim() ([]*Movie, error)
func (*MovieQueryBuilder) Count ¶ added in v0.2.0
func (qb *MovieQueryBuilder) Count() (int, error)
func (*MovieQueryBuilder) Destroy ¶ added in v0.2.0
func (qb *MovieQueryBuilder) Destroy(id string, tx *sqlx.Tx) error
func (*MovieQueryBuilder) DestroyMovieImages ¶ added in v0.3.0
func (qb *MovieQueryBuilder) DestroyMovieImages(movieID int, tx *sqlx.Tx) error
func (*MovieQueryBuilder) FindByName ¶ added in v0.2.0
func (*MovieQueryBuilder) FindByNames ¶ added in v0.2.0
func (*MovieQueryBuilder) FindBySceneID ¶ added in v0.2.0
func (*MovieQueryBuilder) FindMany ¶ added in v0.4.0
func (qb *MovieQueryBuilder) FindMany(ids []int) ([]*Movie, error)
func (*MovieQueryBuilder) GetBackImage ¶ added in v0.3.0
func (*MovieQueryBuilder) GetFrontImage ¶ added in v0.3.0
func (*MovieQueryBuilder) Query ¶ added in v0.2.0
func (qb *MovieQueryBuilder) Query(movieFilter *MovieFilterType, findFilter *FindFilterType) ([]*Movie, int)
func (*MovieQueryBuilder) Update ¶ added in v0.2.0
func (qb *MovieQueryBuilder) Update(updatedMovie MoviePartial, tx *sqlx.Tx) (*Movie, error)
func (*MovieQueryBuilder) UpdateFull ¶ added in v0.4.0
func (*MovieQueryBuilder) UpdateMovieImages ¶ added in v0.3.0
type MovieReader ¶ added in v0.4.0
type MovieReader interface { Find(id int) (*Movie, error) FindMany(ids []int) ([]*Movie, error) // FindBySceneID(sceneID int) ([]*Movie, error) FindByName(name string, nocase bool) (*Movie, error) FindByNames(names []string, nocase bool) ([]*Movie, error) All() ([]*Movie, error) // AllSlim() ([]*Movie, error) // Query(movieFilter *MovieFilterType, findFilter *FindFilterType) ([]*Movie, int) GetFrontImage(movieID int) ([]byte, error) GetBackImage(movieID int) ([]byte, error) }
type MovieReaderWriter ¶ added in v0.4.0
type MovieReaderWriter interface { MovieReader MovieWriter }
func NewMovieReaderWriter ¶ added in v0.4.0
func NewMovieReaderWriter(tx *sqlx.Tx) MovieReaderWriter
type MovieWriter ¶ added in v0.4.0
type MoviesScenes ¶ added in v0.2.0
type NullSQLiteTimestamp ¶ added in v0.4.0
func (*NullSQLiteTimestamp) Scan ¶ added in v0.4.0
func (t *NullSQLiteTimestamp) Scan(value interface{}) error
Scan implements the Scanner interface.
type Performer ¶
type Performer struct { ID int `db:"id" json:"id"` Checksum string `db:"checksum" json:"checksum"` Name sql.NullString `db:"name" json:"name"` Gender sql.NullString `db:"gender" json:"gender"` URL sql.NullString `db:"url" json:"url"` Twitter sql.NullString `db:"twitter" json:"twitter"` Instagram sql.NullString `db:"instagram" json:"instagram"` Birthdate SQLiteDate `db:"birthdate" json:"birthdate"` Ethnicity sql.NullString `db:"ethnicity" json:"ethnicity"` Country sql.NullString `db:"country" json:"country"` EyeColor sql.NullString `db:"eye_color" json:"eye_color"` Height sql.NullString `db:"height" json:"height"` Measurements sql.NullString `db:"measurements" json:"measurements"` FakeTits sql.NullString `db:"fake_tits" json:"fake_tits"` CareerLength sql.NullString `db:"career_length" json:"career_length"` Tattoos sql.NullString `db:"tattoos" json:"tattoos"` Piercings sql.NullString `db:"piercings" json:"piercings"` Aliases sql.NullString `db:"aliases" json:"aliases"` Favorite sql.NullBool `db:"favorite" json:"favorite"` CreatedAt SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
func NewPerformer ¶ added in v0.4.0
type PerformerQueryBuilder ¶
type PerformerQueryBuilder struct{}
func NewPerformerQueryBuilder ¶
func NewPerformerQueryBuilder() PerformerQueryBuilder
func (*PerformerQueryBuilder) All ¶
func (qb *PerformerQueryBuilder) All() ([]*Performer, error)
func (*PerformerQueryBuilder) AllSlim ¶ added in v0.2.0
func (qb *PerformerQueryBuilder) AllSlim() ([]*Performer, error)
func (*PerformerQueryBuilder) Count ¶
func (qb *PerformerQueryBuilder) Count() (int, error)
func (*PerformerQueryBuilder) Destroy ¶
func (qb *PerformerQueryBuilder) Destroy(id string, tx *sqlx.Tx) error
func (*PerformerQueryBuilder) DestroyPerformerImage ¶ added in v0.3.0
func (qb *PerformerQueryBuilder) DestroyPerformerImage(performerID int, tx *sqlx.Tx) error
func (*PerformerQueryBuilder) Find ¶
func (qb *PerformerQueryBuilder) Find(id int) (*Performer, error)
func (*PerformerQueryBuilder) FindByGalleryID ¶ added in v0.4.0
func (*PerformerQueryBuilder) FindByImageID ¶ added in v0.4.0
func (*PerformerQueryBuilder) FindByNames ¶
func (*PerformerQueryBuilder) FindBySceneID ¶
func (*PerformerQueryBuilder) FindMany ¶ added in v0.4.0
func (qb *PerformerQueryBuilder) FindMany(ids []int) ([]*Performer, error)
func (*PerformerQueryBuilder) FindNameBySceneID ¶ added in v0.2.0
func (*PerformerQueryBuilder) GetPerformerImage ¶ added in v0.3.0
func (*PerformerQueryBuilder) Query ¶
func (qb *PerformerQueryBuilder) Query(performerFilter *PerformerFilterType, findFilter *FindFilterType) ([]*Performer, int)
func (*PerformerQueryBuilder) UpdatePerformerImage ¶ added in v0.3.0
type PerformerReader ¶ added in v0.4.0
type PerformerReader interface { // Find(id int) (*Performer, error) FindMany(ids []int) ([]*Performer, error) FindBySceneID(sceneID int) ([]*Performer, error) FindNamesBySceneID(sceneID int) ([]*Performer, error) FindByImageID(imageID int) ([]*Performer, error) FindByGalleryID(galleryID int) ([]*Performer, error) FindByNames(names []string, nocase bool) ([]*Performer, error) // Count() (int, error) All() ([]*Performer, error) // AllSlim() ([]*Performer, error) // Query(performerFilter *PerformerFilterType, findFilter *FindFilterType) ([]*Performer, int) GetPerformerImage(performerID int) ([]byte, error) }
type PerformerReaderWriter ¶ added in v0.4.0
type PerformerReaderWriter interface { PerformerReader PerformerWriter }
func NewPerformerReaderWriter ¶ added in v0.4.0
func NewPerformerReaderWriter(tx *sqlx.Tx) PerformerReaderWriter
type PerformerWriter ¶ added in v0.4.0
type PerformersGalleries ¶ added in v0.4.0
type PerformersImages ¶ added in v0.4.0
type PerformersScenes ¶
type SQLiteDate ¶
func (*SQLiteDate) Scan ¶
func (t *SQLiteDate) Scan(value interface{}) error
Scan implements the Scanner interface.
type SQLiteTimestamp ¶
func (*SQLiteTimestamp) Scan ¶
func (t *SQLiteTimestamp) Scan(value interface{}) error
Scan implements the Scanner interface.
type Scene ¶
type Scene struct { ID int `db:"id" json:"id"` Checksum sql.NullString `db:"checksum" json:"checksum"` OSHash sql.NullString `db:"oshash" json:"oshash"` Path string `db:"path" json:"path"` Title sql.NullString `db:"title" json:"title"` Details sql.NullString `db:"details" json:"details"` URL sql.NullString `db:"url" json:"url"` Date SQLiteDate `db:"date" json:"date"` Rating sql.NullInt64 `db:"rating" json:"rating"` OCounter int `db:"o_counter" json:"o_counter"` Size sql.NullString `db:"size" json:"size"` Duration sql.NullFloat64 `db:"duration" json:"duration"` VideoCodec sql.NullString `db:"video_codec" json:"video_codec"` Format sql.NullString `db:"format" json:"format_name"` AudioCodec sql.NullString `db:"audio_codec" json:"audio_codec"` Width sql.NullInt64 `db:"width" json:"width"` Height sql.NullInt64 `db:"height" json:"height"` Framerate sql.NullFloat64 `db:"framerate" json:"framerate"` Bitrate sql.NullInt64 `db:"bitrate" json:"bitrate"` StudioID sql.NullInt64 `db:"studio_id,omitempty" json:"studio_id"` FileModTime NullSQLiteTimestamp `db:"file_mod_time" json:"file_mod_time"` CreatedAt SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
Scene stores the metadata for a single video scene.
type SceneFileType ¶
type SceneFileType struct { Size *string `graphql:"size" json:"size"` Duration *float64 `graphql:"duration" json:"duration"` VideoCodec *string `graphql:"video_codec" json:"video_codec"` AudioCodec *string `graphql:"audio_codec" json:"audio_codec"` Width *int `graphql:"width" json:"width"` Height *int `graphql:"height" json:"height"` Framerate *float64 `graphql:"framerate" json:"framerate"` Bitrate *int `graphql:"bitrate" json:"bitrate"` }
SceneFileType represents the file metadata for a scene.
type SceneMarker ¶
type SceneMarker struct { ID int `db:"id" json:"id"` Title string `db:"title" json:"title"` Seconds float64 `db:"seconds" json:"seconds"` PrimaryTagID int `db:"primary_tag_id" json:"primary_tag_id"` SceneID sql.NullInt64 `db:"scene_id,omitempty" json:"scene_id"` CreatedAt SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
type SceneMarkerQueryBuilder ¶
type SceneMarkerQueryBuilder struct{}
func NewSceneMarkerQueryBuilder ¶
func NewSceneMarkerQueryBuilder() SceneMarkerQueryBuilder
func (*SceneMarkerQueryBuilder) CountByTagID ¶
func (qb *SceneMarkerQueryBuilder) CountByTagID(tagID int) (int, error)
func (*SceneMarkerQueryBuilder) Create ¶
func (qb *SceneMarkerQueryBuilder) Create(newSceneMarker SceneMarker, tx *sqlx.Tx) (*SceneMarker, error)
func (*SceneMarkerQueryBuilder) Destroy ¶
func (qb *SceneMarkerQueryBuilder) Destroy(id string, tx *sqlx.Tx) error
func (*SceneMarkerQueryBuilder) Find ¶
func (qb *SceneMarkerQueryBuilder) Find(id int) (*SceneMarker, error)
func (*SceneMarkerQueryBuilder) FindBySceneID ¶
func (qb *SceneMarkerQueryBuilder) FindBySceneID(sceneID int, tx *sqlx.Tx) ([]*SceneMarker, error)
func (*SceneMarkerQueryBuilder) FindMany ¶ added in v0.3.0
func (qb *SceneMarkerQueryBuilder) FindMany(ids []int) ([]*SceneMarker, error)
func (*SceneMarkerQueryBuilder) GetMarkerStrings ¶
func (qb *SceneMarkerQueryBuilder) GetMarkerStrings(q *string, sort *string) ([]*MarkerStringsResultType, error)
func (*SceneMarkerQueryBuilder) Query ¶
func (qb *SceneMarkerQueryBuilder) Query(sceneMarkerFilter *SceneMarkerFilterType, findFilter *FindFilterType) ([]*SceneMarker, int)
func (*SceneMarkerQueryBuilder) Update ¶
func (qb *SceneMarkerQueryBuilder) Update(updatedSceneMarker SceneMarker, tx *sqlx.Tx) (*SceneMarker, error)
func (*SceneMarkerQueryBuilder) Wall ¶
func (qb *SceneMarkerQueryBuilder) Wall(q *string) ([]*SceneMarker, error)
type SceneMarkerReader ¶ added in v0.4.0
type SceneMarkerReader interface { // Find(id int) (*SceneMarker, error) // FindMany(ids []int) ([]*SceneMarker, error) FindBySceneID(sceneID int) ([]*SceneMarker, error) }
type SceneMarkerReaderWriter ¶ added in v0.4.0
type SceneMarkerReaderWriter interface { SceneMarkerReader SceneMarkerWriter }
func NewSceneMarkerReaderWriter ¶ added in v0.4.0
func NewSceneMarkerReaderWriter(tx *sqlx.Tx) SceneMarkerReaderWriter
type SceneMarkerWriter ¶ added in v0.4.0
type SceneMarkerWriter interface { Create(newSceneMarker SceneMarker) (*SceneMarker, error) Update(updatedSceneMarker SceneMarker) (*SceneMarker, error) }
type SceneMarkersTags ¶
type ScenePartial ¶
type ScenePartial struct { ID int `db:"id" json:"id"` Checksum *sql.NullString `db:"checksum" json:"checksum"` OSHash *sql.NullString `db:"oshash" json:"oshash"` Path *string `db:"path" json:"path"` Title *sql.NullString `db:"title" json:"title"` Details *sql.NullString `db:"details" json:"details"` URL *sql.NullString `db:"url" json:"url"` Date *SQLiteDate `db:"date" json:"date"` Rating *sql.NullInt64 `db:"rating" json:"rating"` Size *sql.NullString `db:"size" json:"size"` Duration *sql.NullFloat64 `db:"duration" json:"duration"` VideoCodec *sql.NullString `db:"video_codec" json:"video_codec"` Format *sql.NullString `db:"format" json:"format_name"` AudioCodec *sql.NullString `db:"audio_codec" json:"audio_codec"` Width *sql.NullInt64 `db:"width" json:"width"` Height *sql.NullInt64 `db:"height" json:"height"` Framerate *sql.NullFloat64 `db:"framerate" json:"framerate"` Bitrate *sql.NullInt64 `db:"bitrate" json:"bitrate"` StudioID *sql.NullInt64 `db:"studio_id,omitempty" json:"studio_id"` MovieID *sql.NullInt64 `db:"movie_id,omitempty" json:"movie_id"` FileModTime *NullSQLiteTimestamp `db:"file_mod_time" json:"file_mod_time"` CreatedAt *SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt *SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
ScenePartial represents part of a Scene object. It is used to update the database entry. Only non-nil fields will be updated.
type SceneQueryBuilder ¶
type SceneQueryBuilder struct{}
func NewSceneQueryBuilder ¶
func NewSceneQueryBuilder() SceneQueryBuilder
func (*SceneQueryBuilder) All ¶
func (qb *SceneQueryBuilder) All() ([]*Scene, error)
func (*SceneQueryBuilder) Count ¶
func (qb *SceneQueryBuilder) Count() (int, error)
func (*SceneQueryBuilder) CountByMovieID ¶ added in v0.2.0
func (qb *SceneQueryBuilder) CountByMovieID(movieID int) (int, error)
func (*SceneQueryBuilder) CountByPerformerID ¶
func (qb *SceneQueryBuilder) CountByPerformerID(performerID int) (int, error)
func (*SceneQueryBuilder) CountByStudioID ¶
func (qb *SceneQueryBuilder) CountByStudioID(studioID int) (int, error)
func (*SceneQueryBuilder) CountByTagID ¶
func (qb *SceneQueryBuilder) CountByTagID(tagID int) (int, error)
func (*SceneQueryBuilder) CountMissingChecksum ¶ added in v0.3.0
func (qb *SceneQueryBuilder) CountMissingChecksum() (int, error)
CountMissingChecksum returns the number of scenes missing a checksum value.
func (*SceneQueryBuilder) CountMissingOSHash ¶ added in v0.3.0
func (qb *SceneQueryBuilder) CountMissingOSHash() (int, error)
CountMissingOSHash returns the number of scenes missing an oshash value.
func (*SceneQueryBuilder) DecrementOCounter ¶
func (*SceneQueryBuilder) Destroy ¶
func (qb *SceneQueryBuilder) Destroy(id string, tx *sqlx.Tx) error
func (*SceneQueryBuilder) DestroySceneCover ¶ added in v0.3.0
func (qb *SceneQueryBuilder) DestroySceneCover(sceneID int, tx *sqlx.Tx) error
func (*SceneQueryBuilder) FindByChecksum ¶
func (qb *SceneQueryBuilder) FindByChecksum(checksum string) (*Scene, error)
func (*SceneQueryBuilder) FindByMovieID ¶ added in v0.2.0
func (qb *SceneQueryBuilder) FindByMovieID(movieID int) ([]*Scene, error)
func (*SceneQueryBuilder) FindByOSHash ¶ added in v0.3.0
func (qb *SceneQueryBuilder) FindByOSHash(oshash string) (*Scene, error)
func (*SceneQueryBuilder) FindByPath ¶
func (qb *SceneQueryBuilder) FindByPath(path string) (*Scene, error)
func (*SceneQueryBuilder) FindByPerformerID ¶
func (qb *SceneQueryBuilder) FindByPerformerID(performerID int) ([]*Scene, error)
func (*SceneQueryBuilder) FindByStudioID ¶
func (qb *SceneQueryBuilder) FindByStudioID(studioID int) ([]*Scene, error)
func (*SceneQueryBuilder) FindMany ¶ added in v0.3.0
func (qb *SceneQueryBuilder) FindMany(ids []int) ([]*Scene, error)
func (*SceneQueryBuilder) GetSceneCover ¶ added in v0.3.0
func (*SceneQueryBuilder) IncrementOCounter ¶
func (*SceneQueryBuilder) Query ¶
func (qb *SceneQueryBuilder) Query(sceneFilter *SceneFilterType, findFilter *FindFilterType) ([]*Scene, int)
func (*SceneQueryBuilder) QueryAllByPathRegex ¶
func (qb *SceneQueryBuilder) QueryAllByPathRegex(regex string) ([]*Scene, error)
func (*SceneQueryBuilder) QueryByPathRegex ¶
func (qb *SceneQueryBuilder) QueryByPathRegex(findFilter *FindFilterType) ([]*Scene, int)
func (*SceneQueryBuilder) ResetOCounter ¶
func (*SceneQueryBuilder) Size ¶ added in v0.4.0
func (qb *SceneQueryBuilder) Size() (uint64, error)
func (*SceneQueryBuilder) Update ¶
func (qb *SceneQueryBuilder) Update(updatedScene ScenePartial, tx *sqlx.Tx) (*Scene, error)
func (*SceneQueryBuilder) UpdateChecksum ¶ added in v0.3.0
func (*SceneQueryBuilder) UpdateFileModTime ¶ added in v0.4.0
func (qb *SceneQueryBuilder) UpdateFileModTime(id int, modTime NullSQLiteTimestamp, tx *sqlx.Tx) error
func (*SceneQueryBuilder) UpdateFormat ¶ added in v0.2.0
func (*SceneQueryBuilder) UpdateFull ¶ added in v0.4.0
func (*SceneQueryBuilder) UpdateOSHash ¶ added in v0.3.0
func (*SceneQueryBuilder) UpdateSceneCover ¶ added in v0.3.0
type SceneReader ¶ added in v0.4.0
type SceneReader interface { // Find(id int) (*Scene, error) FindMany(ids []int) ([]*Scene, error) FindByChecksum(checksum string) (*Scene, error) FindByOSHash(oshash string) (*Scene, error) // FindByPath(path string) (*Scene, error) // FindByPerformerID(performerID int) ([]*Scene, error) // CountByPerformerID(performerID int) (int, error) // FindByStudioID(studioID int) ([]*Scene, error) FindByMovieID(movieID int) ([]*Scene, error) // CountByMovieID(movieID int) (int, error) // Count() (int, error) // SizeCount() (string, error) // CountByStudioID(studioID int) (int, error) // CountByTagID(tagID int) (int, error) // CountMissingChecksum() (int, error) // CountMissingOSHash() (int, error) // Wall(q *string) ([]*Scene, error) All() ([]*Scene, error) // Query(sceneFilter *SceneFilterType, findFilter *FindFilterType) ([]*Scene, int) // QueryAllByPathRegex(regex string) ([]*Scene, error) // QueryByPathRegex(findFilter *FindFilterType) ([]*Scene, int) GetSceneCover(sceneID int) ([]byte, error) }
type SceneReaderWriter ¶ added in v0.4.0
type SceneReaderWriter interface { SceneReader SceneWriter }
func NewSceneReaderWriter ¶ added in v0.4.0
func NewSceneReaderWriter(tx *sqlx.Tx) SceneReaderWriter
type SceneWriter ¶ added in v0.4.0
type SceneWriter interface { Create(newScene Scene) (*Scene, error) Update(updatedScene ScenePartial) (*Scene, error) UpdateFull(updatedScene Scene) (*Scene, error) // IncrementOCounter(id int) (int, error) // DecrementOCounter(id int) (int, error) // ResetOCounter(id int) (int, error) // Destroy(id string) error // UpdateFormat(id int, format string) error // UpdateOSHash(id int, oshash string) error // UpdateChecksum(id int, checksum string) error UpdateSceneCover(sceneID int, cover []byte) error }
type ScenesTags ¶
type ScrapedGalleryStash ¶ added in v0.4.0
type ScrapedGalleryStash struct { ID string `graphql:"id" json:"id"` Title *string `graphql:"title" json:"title"` Details *string `graphql:"details" json:"details"` URL *string `graphql:"url" json:"url"` Date *string `graphql:"date" json:"date"` File *SceneFileType `graphql:"file" json:"file"` Studio *ScrapedSceneStudio `graphql:"studio" json:"studio"` Tags []*ScrapedSceneTag `graphql:"tags" json:"tags"` Performers []*ScrapedScenePerformer `graphql:"performers" json:"performers"` }
type ScrapedItem ¶
type ScrapedItem struct { ID int `db:"id" json:"id"` Title sql.NullString `db:"title" json:"title"` Description sql.NullString `db:"description" json:"description"` URL sql.NullString `db:"url" json:"url"` Date SQLiteDate `db:"date" json:"date"` Rating sql.NullString `db:"rating" json:"rating"` Tags sql.NullString `db:"tags" json:"tags"` Models sql.NullString `db:"models" json:"models"` Episode sql.NullInt64 `db:"episode" json:"episode"` GalleryFilename sql.NullString `db:"gallery_filename" json:"gallery_filename"` GalleryURL sql.NullString `db:"gallery_url" json:"gallery_url"` VideoFilename sql.NullString `db:"video_filename" json:"video_filename"` VideoURL sql.NullString `db:"video_url" json:"video_url"` StudioID sql.NullInt64 `db:"studio_id,omitempty" json:"studio_id"` CreatedAt SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
type ScrapedItemQueryBuilder ¶
type ScrapedItemQueryBuilder struct{}
func NewScrapedItemQueryBuilder ¶
func NewScrapedItemQueryBuilder() ScrapedItemQueryBuilder
func (*ScrapedItemQueryBuilder) All ¶
func (qb *ScrapedItemQueryBuilder) All() ([]*ScrapedItem, error)
func (*ScrapedItemQueryBuilder) Create ¶
func (qb *ScrapedItemQueryBuilder) Create(newScrapedItem ScrapedItem, tx *sqlx.Tx) (*ScrapedItem, error)
func (*ScrapedItemQueryBuilder) Find ¶
func (qb *ScrapedItemQueryBuilder) Find(id int) (*ScrapedItem, error)
func (*ScrapedItemQueryBuilder) Update ¶
func (qb *ScrapedItemQueryBuilder) Update(updatedScrapedItem ScrapedItem, tx *sqlx.Tx) (*ScrapedItem, error)
type ScrapedMovie ¶ added in v0.3.0
type ScrapedMovie struct { Name *string `graphql:"name" json:"name"` Aliases *string `graphql:"aliases" json:"aliases"` Duration *string `graphql:"duration" json:"duration"` Date *string `graphql:"date" json:"date"` Rating *string `graphql:"rating" json:"rating"` Director *string `graphql:"director" json:"director"` Studio *ScrapedMovieStudio `graphql:"studio" json:"studio"` Synopsis *string `graphql:"synopsis" json:"synopsis"` URL *string `graphql:"url" json:"url"` FrontImage *string `graphql:"front_image" json:"front_image"` BackImage *string `graphql:"back_image" json:"back_image"` }
type ScrapedMovieStudio ¶ added in v0.3.0
type ScrapedPerformer ¶
type ScrapedPerformer struct { Name *string `graphql:"name" json:"name"` Gender *string `graphql:"gender" json:"gender"` URL *string `graphql:"url" json:"url"` Twitter *string `graphql:"twitter" json:"twitter"` Instagram *string `graphql:"instagram" json:"instagram"` Birthdate *string `graphql:"birthdate" json:"birthdate"` Ethnicity *string `graphql:"ethnicity" json:"ethnicity"` Country *string `graphql:"country" json:"country"` EyeColor *string `graphql:"eye_color" json:"eye_color"` Height *string `graphql:"height" json:"height"` Measurements *string `graphql:"measurements" json:"measurements"` FakeTits *string `graphql:"fake_tits" json:"fake_tits"` CareerLength *string `graphql:"career_length" json:"career_length"` Tattoos *string `graphql:"tattoos" json:"tattoos"` Piercings *string `graphql:"piercings" json:"piercings"` Aliases *string `graphql:"aliases" json:"aliases"` Image *string `graphql:"image" json:"image"` }
type ScrapedPerformerStash ¶ added in v0.2.0
type ScrapedPerformerStash struct { Name *string `graphql:"name" json:"name"` Gender *string `graphql:"gender" json:"gender"` URL *string `graphql:"url" json:"url"` Twitter *string `graphql:"twitter" json:"twitter"` Instagram *string `graphql:"instagram" json:"instagram"` Birthdate *string `graphql:"birthdate" json:"birthdate"` Ethnicity *string `graphql:"ethnicity" json:"ethnicity"` Country *string `graphql:"country" json:"country"` EyeColor *string `graphql:"eye_color" json:"eye_color"` Height *string `graphql:"height" json:"height"` Measurements *string `graphql:"measurements" json:"measurements"` FakeTits *string `graphql:"fake_tits" json:"fake_tits"` CareerLength *string `graphql:"career_length" json:"career_length"` Tattoos *string `graphql:"tattoos" json:"tattoos"` Piercings *string `graphql:"piercings" json:"piercings"` Aliases *string `graphql:"aliases" json:"aliases"` }
this type has no Image field
type ScrapedScene ¶
type ScrapedScene struct { Title *string `graphql:"title" json:"title"` Details *string `graphql:"details" json:"details"` URL *string `graphql:"url" json:"url"` Date *string `graphql:"date" json:"date"` Image *string `graphql:"image" json:"image"` RemoteSiteID *string `graphql:"remote_site_id" json:"remote_site_id"` Duration *int `graphql:"duration" json:"duration"` File *SceneFileType `graphql:"file" json:"file"` Fingerprints []*StashBoxFingerprint `graphql:"fingerprints" json:"fingerprints"` Studio *ScrapedSceneStudio `graphql:"studio" json:"studio"` Movies []*ScrapedSceneMovie `graphql:"movies" json:"movies"` Tags []*ScrapedSceneTag `graphql:"tags" json:"tags"` Performers []*ScrapedScenePerformer `graphql:"performers" json:"performers"` }
type ScrapedSceneMovie ¶ added in v0.2.0
type ScrapedSceneMovie struct { // Set if movie matched ID *string `graphql:"id" json:"id"` Name string `graphql:"name" json:"name"` Aliases string `graphql:"aliases" json:"aliases"` Duration string `graphql:"duration" json:"duration"` Date string `graphql:"date" json:"date"` Rating string `graphql:"rating" json:"rating"` Director string `graphql:"director" json:"director"` Synopsis string `graphql:"synopsis" json:"synopsis"` URL *string `graphql:"url" json:"url"` }
type ScrapedScenePerformer ¶
type ScrapedScenePerformer struct { // Set if performer matched ID *string `graphql:"id" json:"id"` Name string `graphql:"name" json:"name"` Gender *string `graphql:"gender" json:"gender"` URL *string `graphql:"url" json:"url"` Twitter *string `graphql:"twitter" json:"twitter"` Instagram *string `graphql:"instagram" json:"instagram"` Birthdate *string `graphql:"birthdate" json:"birthdate"` Ethnicity *string `graphql:"ethnicity" json:"ethnicity"` Country *string `graphql:"country" json:"country"` EyeColor *string `graphql:"eye_color" json:"eye_color"` Height *string `graphql:"height" json:"height"` Measurements *string `graphql:"measurements" json:"measurements"` FakeTits *string `graphql:"fake_tits" json:"fake_tits"` CareerLength *string `graphql:"career_length" json:"career_length"` Tattoos *string `graphql:"tattoos" json:"tattoos"` Piercings *string `graphql:"piercings" json:"piercings"` Aliases *string `graphql:"aliases" json:"aliases"` RemoteSiteID *string `graphql:"remote_site_id" json:"remote_site_id"` Images []string `graphql:"images" json:"images"` }
type ScrapedSceneStash ¶ added in v0.2.0
type ScrapedSceneStash struct { ID string `graphql:"id" json:"id"` Title *string `graphql:"title" json:"title"` Details *string `graphql:"details" json:"details"` URL *string `graphql:"url" json:"url"` Date *string `graphql:"date" json:"date"` File *SceneFileType `graphql:"file" json:"file"` Studio *ScrapedSceneStudio `graphql:"studio" json:"studio"` Tags []*ScrapedSceneTag `graphql:"tags" json:"tags"` Performers []*ScrapedScenePerformer `graphql:"performers" json:"performers"` }
stash doesn't return image, and we need id
type ScrapedSceneStudio ¶
type ScrapedSceneTag ¶
type Studio ¶
type Studio struct { ID int `db:"id" json:"id"` Checksum string `db:"checksum" json:"checksum"` Name sql.NullString `db:"name" json:"name"` URL sql.NullString `db:"url" json:"url"` ParentID sql.NullInt64 `db:"parent_id,omitempty" json:"parent_id"` CreatedAt SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
type StudioPartial ¶ added in v0.3.0
type StudioPartial struct { ID int `db:"id" json:"id"` Checksum *string `db:"checksum" json:"checksum"` Name *sql.NullString `db:"name" json:"name"` URL *sql.NullString `db:"url" json:"url"` ParentID *sql.NullInt64 `db:"parent_id,omitempty" json:"parent_id"` CreatedAt *SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt *SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
type StudioQueryBuilder ¶
type StudioQueryBuilder struct{}
func NewStudioQueryBuilder ¶
func NewStudioQueryBuilder() StudioQueryBuilder
func (*StudioQueryBuilder) All ¶
func (qb *StudioQueryBuilder) All() ([]*Studio, error)
func (*StudioQueryBuilder) AllSlim ¶ added in v0.2.0
func (qb *StudioQueryBuilder) AllSlim() ([]*Studio, error)
func (*StudioQueryBuilder) Count ¶
func (qb *StudioQueryBuilder) Count() (int, error)
func (*StudioQueryBuilder) Destroy ¶
func (qb *StudioQueryBuilder) Destroy(id string, tx *sqlx.Tx) error
func (*StudioQueryBuilder) DestroyStudioImage ¶ added in v0.3.0
func (qb *StudioQueryBuilder) DestroyStudioImage(studioID int, tx *sqlx.Tx) error
func (*StudioQueryBuilder) FindByName ¶
func (*StudioQueryBuilder) FindBySceneID ¶
func (qb *StudioQueryBuilder) FindBySceneID(sceneID int) (*Studio, error)
func (*StudioQueryBuilder) FindChildren ¶ added in v0.3.0
func (*StudioQueryBuilder) FindMany ¶ added in v0.4.0
func (qb *StudioQueryBuilder) FindMany(ids []int) ([]*Studio, error)
func (*StudioQueryBuilder) GetStudioImage ¶ added in v0.3.0
func (*StudioQueryBuilder) Query ¶
func (qb *StudioQueryBuilder) Query(studioFilter *StudioFilterType, findFilter *FindFilterType) ([]*Studio, int)
func (*StudioQueryBuilder) Update ¶
func (qb *StudioQueryBuilder) Update(updatedStudio StudioPartial, tx *sqlx.Tx) (*Studio, error)
func (*StudioQueryBuilder) UpdateFull ¶ added in v0.4.0
func (*StudioQueryBuilder) UpdateStudioImage ¶ added in v0.3.0
type StudioReader ¶ added in v0.4.0
type StudioReader interface { Find(id int) (*Studio, error) FindMany(ids []int) ([]*Studio, error) // FindChildren(id int) ([]*Studio, error) // FindBySceneID(sceneID int) (*Studio, error) FindByName(name string, nocase bool) (*Studio, error) // Count() (int, error) All() ([]*Studio, error) // AllSlim() ([]*Studio, error) // Query(studioFilter *StudioFilterType, findFilter *FindFilterType) ([]*Studio, int) GetStudioImage(studioID int) ([]byte, error) }
type StudioReaderWriter ¶ added in v0.4.0
type StudioReaderWriter interface { StudioReader StudioWriter }
func NewStudioReaderWriter ¶ added in v0.4.0
func NewStudioReaderWriter(tx *sqlx.Tx) StudioReaderWriter
type StudioWriter ¶ added in v0.4.0
type Tag ¶
type Tag struct { ID int `db:"id" json:"id"` Name string `db:"name" json:"name"` // TODO make schema not null CreatedAt SQLiteTimestamp `db:"created_at" json:"created_at"` UpdatedAt SQLiteTimestamp `db:"updated_at" json:"updated_at"` }
type TagQueryBuilder ¶
type TagQueryBuilder struct{}
func NewTagQueryBuilder ¶
func NewTagQueryBuilder() TagQueryBuilder
func (*TagQueryBuilder) All ¶
func (qb *TagQueryBuilder) All() ([]*Tag, error)
func (*TagQueryBuilder) AllSlim ¶ added in v0.2.0
func (qb *TagQueryBuilder) AllSlim() ([]*Tag, error)
func (*TagQueryBuilder) Count ¶
func (qb *TagQueryBuilder) Count() (int, error)
func (*TagQueryBuilder) DestroyTagImage ¶ added in v0.3.0
func (qb *TagQueryBuilder) DestroyTagImage(tagID int, tx *sqlx.Tx) error
func (*TagQueryBuilder) FindByGalleryID ¶ added in v0.4.0
func (*TagQueryBuilder) FindByImageID ¶ added in v0.4.0
func (*TagQueryBuilder) FindByName ¶
func (*TagQueryBuilder) FindByNames ¶
func (*TagQueryBuilder) FindBySceneID ¶
func (*TagQueryBuilder) FindBySceneMarkerID ¶
func (*TagQueryBuilder) FindMany ¶ added in v0.4.0
func (qb *TagQueryBuilder) FindMany(ids []int) ([]*Tag, error)
func (*TagQueryBuilder) GetTagImage ¶ added in v0.3.0
func (*TagQueryBuilder) Query ¶
func (qb *TagQueryBuilder) Query(tagFilter *TagFilterType, findFilter *FindFilterType) ([]*Tag, int)
func (*TagQueryBuilder) UpdateTagImage ¶ added in v0.3.0
type TagReader ¶ added in v0.4.0
type TagReader interface { Find(id int) (*Tag, error) FindMany(ids []int) ([]*Tag, error) FindBySceneID(sceneID int) ([]*Tag, error) 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) All() ([]*Tag, error) // AllSlim() ([]*Tag, error) // Query(tagFilter *TagFilterType, findFilter *FindFilterType) ([]*Tag, int, error) GetTagImage(tagID int) ([]byte, error) }
type TagReaderWriter ¶ added in v0.4.0
func NewTagReaderWriter ¶ added in v0.4.0
func NewTagReaderWriter(tx *sqlx.Tx) TagReaderWriter
Source Files ¶
- extension_find_filter.go
- gallery.go
- image.go
- join.go
- json_time.go
- model_gallery.go
- model_image.go
- model_joins.go
- model_movie.go
- model_performer.go
- model_scene.go
- model_scene_marker.go
- model_scraped_item.go
- model_studio.go
- model_tag.go
- movie.go
- performer.go
- querybuilder_gallery.go
- querybuilder_image.go
- querybuilder_joins.go
- querybuilder_movies.go
- querybuilder_performer.go
- querybuilder_scene.go
- querybuilder_scene_marker.go
- querybuilder_scraped_item.go
- querybuilder_sql.go
- querybuilder_studio.go
- querybuilder_tag.go
- scene.go
- scene_marker.go
- scraped.go
- sqlite_date.go
- sqlite_timestamp.go
- studio.go
- tag.go