gallery

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddImage added in v0.5.0

func AddImage(qb models.GalleryReaderWriter, galleryID int, imageID int) error

func AddPerformer added in v0.7.0

func AddPerformer(qb models.GalleryReaderWriter, id int, performerID int) (bool, error)

func AddTag added in v0.7.0

func AddTag(qb models.GalleryReaderWriter, id int, tagID int) (bool, error)

func CountByPerformerID added in v0.7.0

func CountByPerformerID(r models.GalleryReader, id int) (int, error)

func CountByStudioID added in v0.7.0

func CountByStudioID(r models.GalleryReader, id int) (int, error)

func CountByTagID added in v0.7.0

func CountByTagID(r models.GalleryReader, id int) (int, error)

func GetChecksums added in v0.5.0

func GetChecksums(galleries []*models.Gallery) []string

func GetIDs

func GetIDs(galleries []*models.Gallery) []int

func GetStudioName

func GetStudioName(reader models.StudioReader, gallery *models.Gallery) (string, error)

GetStudioName returns the name of the provided gallery's studio. It returns an empty string if there is no studio assigned to the gallery.

func ToBasicJSON

func ToBasicJSON(gallery *models.Gallery) (*jsonschema.Gallery, error)

ToBasicJSON converts a gallery object into its JSON object equivalent. It does not convert the relationships to other objects.

func UpdateFileModTime added in v0.5.0

func UpdateFileModTime(qb models.GalleryWriter, id int, modTime models.NullSQLiteTimestamp) (*models.Gallery, error)

Types

type Importer

type Importer struct {
	ReaderWriter        models.GalleryReaderWriter
	StudioWriter        models.StudioReaderWriter
	PerformerWriter     models.PerformerReaderWriter
	TagWriter           models.TagReaderWriter
	Input               jsonschema.Gallery
	MissingRefBehaviour models.ImportMissingRefEnum
	// contains filtered or unexported fields
}

func (*Importer) Create

func (i *Importer) Create() (*int, error)

func (*Importer) FindExistingID

func (i *Importer) FindExistingID() (*int, error)

func (*Importer) Name

func (i *Importer) Name() string

func (*Importer) PostImport

func (i *Importer) PostImport(id int) error

func (*Importer) PreImport

func (i *Importer) PreImport() error

func (*Importer) Update

func (i *Importer) Update(id int) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL