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 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.
func ToJSON ¶
func ToJSON(reader models.StudioReader, studio *models.Studio) (*jsonschema.Studio, error)
ToJSON converts a Studio object into its JSON equivalent.
Types ¶
type Importer ¶
type Importer struct { ReaderWriter models.StudioReaderWriter Input jsonschema.Studio MissingRefBehaviour models.ImportMissingRefEnum // contains filtered or unexported fields }
func (*Importer) FindExistingID ¶
func (*Importer) PostImport ¶
type NameExistsError ¶ added in v0.10.0
type NameExistsError struct {
Name string
}
func (*NameExistsError) Error ¶ added in v0.10.0
func (e *NameExistsError) Error() string
type NameUsedByAliasError ¶ added in v0.10.0
func (*NameUsedByAliasError) Error ¶ added in v0.10.0
func (e *NameUsedByAliasError) Error() string
Click to show internal directories.
Click to hide internal directories.