Documentation ¶
Index ¶
- func ByAlias(qb models.TagReader, alias string) (*models.Tag, error)
- func ByName(qb models.TagReader, name string) (*models.Tag, error)
- func EnsureAliasesUnique(id int, aliases []string, qb models.TagReader) error
- func EnsureTagNameUnique(id int, name string, qb models.TagReader) error
- func GetIDs(tags []*models.Tag) []int
- func GetNames(tags []*models.Tag) []string
- func MergeHierarchy(destination int, sources []int, qb models.TagReader) ([]int, []int, error)
- func ToJSON(reader models.TagReader, tag *models.Tag) (*jsonschema.Tag, error)
- func ValidateHierarchy(tag *models.Tag, parentIDs, childIDs []int, qb models.TagReader) error
- type Importer
- type InvalidTagHierarchyError
- type NameExistsError
- type NameUsedByAliasError
- type ParentTagNotExistError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureAliasesUnique ¶ added in v0.8.0
func EnsureTagNameUnique ¶ added in v0.8.0
EnsureTagNameUnique returns an error if the tag name provided is used as a name or alias of another existing tag.
func MergeHierarchy ¶ added in v0.10.0
Types ¶
type Importer ¶
type Importer struct { ReaderWriter models.TagReaderWriter Input jsonschema.Tag MissingRefBehaviour models.ImportMissingRefEnum // contains filtered or unexported fields }
func (*Importer) FindExistingID ¶
func (*Importer) PostImport ¶
type InvalidTagHierarchyError ¶ added in v0.10.0
type InvalidTagHierarchyError struct { Direction string CurrentRelation string InvalidTag string ApplyingTag string TagPath string }
func (*InvalidTagHierarchyError) Error ¶ added in v0.10.0
func (e *InvalidTagHierarchyError) Error() string
type NameExistsError ¶ added in v0.8.0
type NameExistsError struct {
Name string
}
func (*NameExistsError) Error ¶ added in v0.8.0
func (e *NameExistsError) Error() string
type NameUsedByAliasError ¶ added in v0.8.0
func (*NameUsedByAliasError) Error ¶ added in v0.8.0
func (e *NameUsedByAliasError) Error() string
type ParentTagNotExistError ¶ added in v0.10.0
type ParentTagNotExistError struct {
// contains filtered or unexported fields
}
func (ParentTagNotExistError) Error ¶ added in v0.10.0
func (e ParentTagNotExistError) Error() string
func (ParentTagNotExistError) MissingParent ¶ added in v0.10.0
func (e ParentTagNotExistError) MissingParent() string
Click to show internal directories.
Click to hide internal directories.