performer

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountByStudioID added in v0.19.0

func CountByStudioID(ctx context.Context, r CountQueryer, id int) (int, error)

func GetIDs

func GetIDs(performers []*models.Performer) []int

func GetNames

func GetNames(performers []*models.Performer) []string

func ToJSON

ToJSON converts a Performer object into its JSON equivalent.

func ValidateDeathDate added in v0.7.0

func ValidateDeathDate(performer *models.Performer, birthdate *string, deathDate *string) error

Types

type CountQueryer added in v0.19.0

type CountQueryer interface {
	QueryCount(ctx context.Context, galleryFilter *models.PerformerFilterType, findFilter *models.FindFilterType) (int, error)
}

type ImageAliasStashIDGetter added in v0.19.0

type ImageAliasStashIDGetter interface {
	GetImage(ctx context.Context, performerID int) ([]byte, error)
	models.AliasLoader
	models.StashIDLoader
}

type Importer

type Importer struct {
	ReaderWriter        NameFinderCreatorUpdater
	TagWriter           tag.NameFinderCreator
	Input               jsonschema.Performer
	MissingRefBehaviour models.ImportMissingRefEnum

	ID int
	// contains filtered or unexported fields
}

func (*Importer) Create

func (i *Importer) Create(ctx context.Context) (*int, error)

func (*Importer) FindExistingID

func (i *Importer) FindExistingID(ctx context.Context) (*int, error)

func (*Importer) Name

func (i *Importer) Name() string

func (*Importer) PostImport

func (i *Importer) PostImport(ctx context.Context, id int) error

func (*Importer) PreImport

func (i *Importer) PreImport(ctx context.Context) error

func (*Importer) Update

func (i *Importer) Update(ctx context.Context, id int) error

type NameFinderCreator added in v0.17.0

type NameFinderCreator interface {
	FindByNames(ctx context.Context, names []string, nocase bool) ([]*models.Performer, error)
	Query(ctx context.Context, performerFilter *models.PerformerFilterType, findFilter *models.FindFilterType) ([]*models.Performer, int, error)
	Create(ctx context.Context, newPerformer *models.Performer) error
}

type NameFinderCreatorUpdater added in v0.17.0

type NameFinderCreatorUpdater interface {
	NameFinderCreator
	Update(ctx context.Context, updatedPerformer *models.Performer) error
	UpdateImage(ctx context.Context, performerID int, image []byte) error
}

type Queryer added in v0.19.0

type Queryer interface {
	Query(ctx context.Context, performerFilter *models.PerformerFilterType, findFilter *models.FindFilterType) ([]*models.Performer, int, error)
}

Jump to

Keyboard shortcuts

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