Documentation
¶
Index ¶
- func CountByStudioID(ctx context.Context, r CountQueryer, id int, depth *int) (int, error)
- func ToJSON(ctx context.Context, reader ImageGetter, studioReader studio.Finder, ...) (*jsonschema.Movie, error)
- type CountQueryer
- type ImageGetter
- type ImageUpdater
- 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 NameFinderCreator
- type NameFinderCreatorUpdater
- type Queryer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountByStudioID ¶ added in v0.22.0
func CountByStudioID(ctx context.Context, r CountQueryer, id int, depth *int) (int, error)
Types ¶
type CountQueryer ¶ added in v0.22.0
type CountQueryer interface {
QueryCount(ctx context.Context, movieFilter *models.MovieFilterType, findFilter *models.FindFilterType) (int, error)
}
type ImageGetter ¶ added in v0.17.0
type ImageGetter interface {
GetFrontImage(ctx context.Context, movieID int) ([]byte, error)
GetBackImage(ctx context.Context, movieID int) ([]byte, error)
}
type ImageUpdater ¶ added in v0.20.0
type ImageUpdater interface {
UpdateFrontImage(ctx context.Context, movieID int, frontImage []byte) error
UpdateBackImage(ctx context.Context, movieID int, backImage []byte) error
}
type Importer ¶
type Importer struct {
ReaderWriter NameFinderCreatorUpdater
StudioWriter studio.NameFinderCreator
Input jsonschema.Movie
MissingRefBehaviour models.ImportMissingRefEnum
// contains filtered or unexported fields
}
func (*Importer) FindExistingID ¶
func (i *Importer) FindExistingID(ctx context.Context) (*int, error)
func (*Importer) PostImport ¶
func (i *Importer) PostImport(ctx context.Context, id int) error
type NameFinderCreator ¶ added in v0.17.0
type NameFinderCreator interface {
FindByName(ctx context.Context, name string, nocase bool) (*models.Movie, error)
Create(ctx context.Context, newMovie *models.Movie) error
}
type NameFinderCreatorUpdater ¶ added in v0.17.0
type NameFinderCreatorUpdater interface {
NameFinderCreator
Update(ctx context.Context, updatedMovie *models.Movie) error
ImageUpdater
}
Click to show internal directories.
Click to hide internal directories.