Documentation ¶
Index ¶
- Variables
- func ByAlias(ctx context.Context, r models.PerformerQueryer, alias string) ([]*models.Performer, error)
- func CountByAppearsWith(ctx context.Context, r models.PerformerQueryer, id int) (int, error)
- func CountByStudioID(ctx context.Context, r models.PerformerQueryer, id int, depth *int) (int, error)
- func CountByTagID(ctx context.Context, r models.PerformerQueryer, id int, depth *int) (int, error)
- func GetIDs(performers []*models.Performer) []int
- func GetNames(performers []*models.Performer) []string
- func ToJSON(ctx context.Context, reader ImageAliasStashIDGetter, ...) (*jsonschema.Performer, error)
- func ValidateAliases(name string, aliases models.RelatedStrings) error
- func ValidateCreate(ctx context.Context, performer models.Performer, qb models.PerformerReader) error
- func ValidateDeathDate(birthdate *models.Date, deathDate *models.Date) error
- func ValidateName(ctx context.Context, name string, disambig string, qb models.PerformerQueryer) error
- func ValidateUpdate(ctx context.Context, id int, partial models.PerformerPartial, ...) error
- func ValidateUpdateAliases(existing models.Performer, name models.OptionalString, ...) error
- func ValidateUpdateDeathDate(existing models.Performer, birthdate models.OptionalDate, ...) error
- func ValidateUpdateName(ctx context.Context, existing models.Performer, name models.OptionalString, ...) error
- type DeathDateError
- type DuplicateAliasError
- type ImageAliasStashIDGetter
- type Importer
- func (i *Importer) Create(ctx context.Context) (*int, error)
- func (i *Importer) FindExistingID(ctx context.Context) (*int, error)
- func (i *Importer) Name() string
- func (i *Importer) PostImport(ctx context.Context, id int) error
- func (i *Importer) PreImport(ctx context.Context) error
- func (i *Importer) Update(ctx context.Context, id int) error
- type ImporterReaderWriter
- type NameExistsError
- type NotFoundError
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNameMissing = errors.New("performer name must not be blank")
)
Functions ¶
func CountByAppearsWith ¶ added in v0.21.0
func CountByStudioID ¶ added in v0.19.0
func CountByTagID ¶ added in v0.22.0
func ToJSON ¶
func ToJSON(ctx context.Context, reader ImageAliasStashIDGetter, performer *models.Performer) (*jsonschema.Performer, error)
ToJSON converts a Performer object into its JSON equivalent.
func ValidateAliases ¶ added in v0.24.0
func ValidateAliases(name string, aliases models.RelatedStrings) error
func ValidateCreate ¶ added in v0.24.0
func ValidateDeathDate ¶ added in v0.7.0
ValidateDeathDate returns an error if the birthdate is after the death date.
func ValidateName ¶ added in v0.24.0
func ValidateName(ctx context.Context, name string, disambig string, qb models.PerformerQueryer) error
ValidateName returns an error if the performer name and disambiguation provided is used by another performer.
func ValidateUpdate ¶ added in v0.24.0
func ValidateUpdate(ctx context.Context, id int, partial models.PerformerPartial, qb models.PerformerReader) error
func ValidateUpdateAliases ¶ added in v0.24.0
func ValidateUpdateAliases(existing models.Performer, name models.OptionalString, aliases *models.UpdateStrings) error
func ValidateUpdateDeathDate ¶ added in v0.24.0
func ValidateUpdateDeathDate(existing models.Performer, birthdate models.OptionalDate, deathDate models.OptionalDate) error
ValidateUpdateDeathDate performs the same check as ValidateDeathDate, but is used when modifying an existing performer.
func ValidateUpdateName ¶ added in v0.24.0
func ValidateUpdateName(ctx context.Context, existing models.Performer, name models.OptionalString, disambig models.OptionalString, qb models.PerformerQueryer) error
ValidateUpdateName performs the same check as ValidateName, but is used when modifying an existing performer.
Types ¶
type DeathDateError ¶ added in v0.24.0
func (*DeathDateError) Error ¶ added in v0.24.0
func (e *DeathDateError) Error() string
type DuplicateAliasError ¶ added in v0.24.0
type DuplicateAliasError struct {
Alias string
}
func (*DuplicateAliasError) Error ¶ added in v0.24.0
func (e *DuplicateAliasError) Error() string
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 ImporterReaderWriter TagWriter models.TagFinderCreator Input jsonschema.Performer MissingRefBehaviour models.ImportMissingRefEnum ID int // contains filtered or unexported fields }
func (*Importer) FindExistingID ¶
type ImporterReaderWriter ¶ added in v0.23.0
type ImporterReaderWriter interface { models.PerformerCreatorUpdater models.PerformerQueryer }
type NameExistsError ¶ added in v0.24.0
func (*NameExistsError) Error ¶ added in v0.24.0
func (e *NameExistsError) Error() string
type NotFoundError ¶ added in v0.24.0
type NotFoundError struct {
// contains filtered or unexported fields
}
func (*NotFoundError) Error ¶ added in v0.24.0
func (e *NotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.