Documentation
¶
Index ¶
- Variables
- func ByAlias(qb models.StudioReader, alias string) (*models.Studio, error)
- func ByName(qb models.StudioReader, name string) (*models.Studio, error)
- func EnsureAliasesUnique(id int, aliases []string, qb models.StudioReader) error
- func EnsureStudioNameUnique(id int, name string, qb models.StudioReader) error
- func ToJSON(reader models.StudioReader, studio *models.Studio) (*jsonschema.Studio, error)
- type Importer
- type NameExistsError
- type NameUsedByAliasError
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrParentStudioNotExist = errors.New("parent studio does not exist")
Functions ¶
func ByAlias ¶ added in v0.10.0
func ByAlias(qb models.StudioReader, alias string) (*models.Studio, error)
func ByName ¶ added in v0.10.0
func ByName(qb models.StudioReader, name string) (*models.Studio, error)
func EnsureAliasesUnique ¶ added in v0.10.0
func EnsureAliasesUnique(id int, aliases []string, qb models.StudioReader) error
func EnsureStudioNameUnique ¶ added in v0.10.0
func EnsureStudioNameUnique(id int, name string, qb models.StudioReader) error
EnsureStudioNameUnique returns an error if the studio name provided is used as a name or alias of another existing tag.
Types ¶
type Importer ¶
type Importer struct {
ReaderWriter models.StudioReaderWriter
Input jsonschema.Studio
MissingRefBehaviour models.ImportMissingRefEnum
// contains filtered or unexported fields
}
func (*Importer) FindExistingID ¶
func (i *Importer) FindExistingID() (*int, error)
func (*Importer) PostImport ¶
func (i *Importer) PostImport(id int) error
type NameExistsError ¶ added in v0.10.0
type NameExistsError struct {
Name string
}
type NameUsedByAliasError ¶ added in v0.10.0
type NameUsedByAliasError struct {
Name string
OtherStudio string
}
Click to show internal directories.
Click to hide internal directories.