Documentation ¶
Index ¶
- type Storage
- func (storage *Storage) AddFile(path string, fingerprint fingerprint.Fingerprint, modTime time.Time, ...) (*entities.File, error)
- func (storage *Storage) AddFileTag(fileId, tagId, valueId uint) (*entities.FileTag, error)
- func (storage Storage) AddImplication(tagId, impliedTagId uint) error
- func (storage *Storage) AddQuery(text string) (*entities.Query, error)
- func (storage *Storage) AddTag(name string) (*entities.Tag, error)
- func (storage *Storage) AddValue(name string) (*entities.Value, error)
- func (storage *Storage) Begin() error
- func (storage *Storage) Close() error
- func (storage *Storage) Commit() error
- func (storage *Storage) CopyFileTags(sourceTagId, destTagId uint) error
- func (storage Storage) CopyTag(sourceTagId uint, name string) (*entities.Tag, error)
- func (storage *Storage) DeleteFile(fileId uint) error
- func (storage *Storage) DeleteFileIfUntagged(fileId uint) error
- func (storage *Storage) DeleteFileTag(fileId, tagId, valueId uint) error
- func (storage *Storage) DeleteFileTagsByFileId(fileId uint) error
- func (storage *Storage) DeleteFileTagsByTagId(tagId uint) error
- func (storage *Storage) DeleteQuery(text string) error
- func (storage Storage) DeleteTag(tagId uint) error
- func (storage *Storage) DeleteUntaggedFiles() error
- func (storage *Storage) DeleteUnusedValues() error
- func (storage *Storage) DeleteValue(valueId uint) error
- func (storage *Storage) DeleteValueIfUnused(valueId uint) error
- func (storage *Storage) DuplicateFiles() ([]entities.Files, error)
- func (storage *Storage) File(id uint) (*entities.File, error)
- func (storage *Storage) FileByPath(path string) (*entities.File, error)
- func (storage *Storage) FileCount() (uint, error)
- func (storage *Storage) FileCountByFingerprint(fingerprint fingerprint.Fingerprint) (uint, error)
- func (storage *Storage) FileCountWithTags(tagNames []string, path string, explicitOnly bool) (uint, error)
- func (storage *Storage) FileTagCount() (uint, error)
- func (storage *Storage) FileTagCountByFileId(fileId uint, explicitOnly bool) (uint, error)
- func (storage *Storage) FileTagCountByTagId(tagId uint) (uint, error)
- func (storage *Storage) FileTagCountByValueId(valueId uint) (uint, error)
- func (storage *Storage) FileTagExists(fileId, tagId, valueId uint) (bool, error)
- func (storage *Storage) FileTags() (entities.FileTags, error)
- func (storage *Storage) FileTagsByFileId(fileId uint, explicitOnly bool) (entities.FileTags, error)
- func (storage *Storage) FileTagsByTagId(tagId uint) (entities.FileTags, error)
- func (storage *Storage) FileTagsByValueId(valueId uint) (entities.FileTags, error)
- func (storage *Storage) Files() (entities.Files, error)
- func (storage *Storage) FilesByDirectories(paths []string) (entities.Files, error)
- func (storage *Storage) FilesByDirectory(path string) (entities.Files, error)
- func (storage *Storage) FilesByFingerprint(fingerprint fingerprint.Fingerprint) (entities.Files, error)
- func (storage *Storage) FilesWithTags(tagNames []string, path string, explicitOnly bool) (entities.Files, error)
- func (storage *Storage) Implications() (entities.Implications, error)
- func (storage *Storage) ImplicationsForTags(tagIds ...uint) (entities.Implications, error)
- func (storage *Storage) Queries() (entities.Queries, error)
- func (storage *Storage) Query(text string) (*entities.Query, error)
- func (storage *Storage) QueryFileCount(expression query.Expression, path string, explicitOnly bool) (uint, error)
- func (storage *Storage) QueryFiles(expression query.Expression, path string, explicitOnly bool) (entities.Files, error)
- func (storage Storage) RemoveImplication(tagId, impliedTagId uint) error
- func (storage Storage) RemoveImplicationsForTagId(tagId uint) error
- func (storage Storage) RenameTag(tagId uint, name string) (*entities.Tag, error)
- func (storage *Storage) Rollback() error
- func (storage *Storage) Setting(name string) (*entities.Setting, error)
- func (storage *Storage) SettingAsBool(name string) (bool, error)
- func (storage *Storage) SettingAsString(name string) (string, error)
- func (storage *Storage) Settings() (entities.Settings, error)
- func (storage Storage) Tag(id uint) (*entities.Tag, error)
- func (storage Storage) TagByName(name string) (*entities.Tag, error)
- func (storage *Storage) TagCount() (uint, error)
- func (storage *Storage) Tags() (entities.Tags, error)
- func (storage Storage) TagsByIds(ids []uint) (entities.Tags, error)
- func (storage Storage) TagsByNames(names []string) (entities.Tags, error)
- func (storage Storage) TopTags(count uint) ([]entities.TagFileCount, error)
- func (storage *Storage) UntaggedFiles() (entities.Files, error)
- func (storage *Storage) UnusedValues() (entities.Values, error)
- func (storage *Storage) UpdateFile(fileId uint, path string, fingerprint fingerprint.Fingerprint, ...) (*entities.File, error)
- func (storage Storage) UpdateImplicationsForTagId(tagId, impliedTagId uint) error
- func (storage *Storage) Value(id uint) (*entities.Value, error)
- func (storage *Storage) ValueByName(name string) (*entities.Value, error)
- func (storage *Storage) ValueCount() (uint, error)
- func (storage *Storage) Values() (entities.Values, error)
- func (storage Storage) ValuesByIds(ids []uint) (entities.Values, error)
- func (storage *Storage) ValuesByNames(names []string) (entities.Values, error)
- func (storage *Storage) ValuesByTag(tagId uint) (entities.Values, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
func (*Storage) AddFile ¶
func (storage *Storage) AddFile(path string, fingerprint fingerprint.Fingerprint, modTime time.Time, size int64, isDir bool) (*entities.File, error)
Adds a file to the database.
func (*Storage) AddFileTag ¶
Adds a file tag.
func (Storage) AddImplication ¶ added in v0.2.0
Adds the specified implication.
func (*Storage) CopyFileTags ¶
Copies file tags from one tag to another.
func (*Storage) DeleteFile ¶ added in v0.4.0
Deletes a file from the database.
func (*Storage) DeleteFileIfUntagged ¶ added in v0.4.0
Deletes a file if it is untagged
func (*Storage) DeleteFileTag ¶ added in v0.4.0
Delete file tag.
func (*Storage) DeleteFileTagsByFileId ¶ added in v0.4.0
Deletes all of the file tags for the specified file.
func (*Storage) DeleteFileTagsByTagId ¶ added in v0.4.0
Deletes all of the file tags for the specified tag.
func (*Storage) DeleteQuery ¶ added in v0.3.0
Removes a query from the database.
func (*Storage) DeleteUntaggedFiles ¶ added in v0.4.0
Deletes all untagged files from the database.
func (*Storage) DeleteUnusedValues ¶ added in v0.4.0
Deletes unused values.
func (*Storage) DeleteValue ¶ added in v0.4.0
Deletes a value.
func (*Storage) DeleteValueIfUnused ¶ added in v0.4.0
Deletes the value if it is unused.
func (*Storage) DuplicateFiles ¶
Retrieves the sets of duplicate files within the database.
func (*Storage) FileByPath ¶
Retrieves the file with the specified path.
func (*Storage) FileCountByFingerprint ¶
func (storage *Storage) FileCountByFingerprint(fingerprint fingerprint.Fingerprint) (uint, error)
Retrieves the number of files with the specified fingerprint.
func (*Storage) FileCountWithTags ¶
func (storage *Storage) FileCountWithTags(tagNames []string, path string, explicitOnly bool) (uint, error)
Retrieves the count of files with the specified tags and matching the specified path.
func (*Storage) FileTagCount ¶
Retrieves the total count of file tags in the database.
func (*Storage) FileTagCountByFileId ¶
Retrieves the count of file tags for the specified file.
func (*Storage) FileTagCountByTagId ¶ added in v0.3.0
Retrieves the count of file tags for the specified tag.
func (*Storage) FileTagCountByValueId ¶ added in v0.4.0
Retrieves the count of file tags for the specified value.
func (*Storage) FileTagExists ¶
Determines whether the specified file has the specified tag applied.
func (*Storage) FileTagsByFileId ¶
Retrieves the file tags with the specified file ID.
func (*Storage) FileTagsByTagId ¶
Retrieves the file tags with the specified tag ID.
func (*Storage) FileTagsByValueId ¶ added in v0.4.0
Retrieves the file tags with the specified value ID.
func (*Storage) FilesByDirectories ¶
Retrieves all file that are under the specified directories.
func (*Storage) FilesByDirectory ¶
Retrieves all files that are under the specified directory.
func (*Storage) FilesByFingerprint ¶
func (storage *Storage) FilesByFingerprint(fingerprint fingerprint.Fingerprint) (entities.Files, error)
Retrieves the set of files with the specified fingerprint.
func (*Storage) FilesWithTags ¶
func (storage *Storage) FilesWithTags(tagNames []string, path string, explicitOnly bool) (entities.Files, error)
Retrieves the set of files with the specified tags and matching the specified path.
func (*Storage) Implications ¶ added in v0.2.0
func (storage *Storage) Implications() (entities.Implications, error)
Retrieves the complete set of tag implications.
func (*Storage) ImplicationsForTags ¶ added in v0.2.0
func (storage *Storage) ImplicationsForTags(tagIds ...uint) (entities.Implications, error)
Retrieves the set of implications for the specified tags.
func (*Storage) QueryFileCount ¶ added in v0.4.0
func (storage *Storage) QueryFileCount(expression query.Expression, path string, explicitOnly bool) (uint, error)
Retrieves the count of files that match the specified query and matching the specified path.
func (*Storage) QueryFiles ¶ added in v0.3.0
func (storage *Storage) QueryFiles(expression query.Expression, path string, explicitOnly bool) (entities.Files, error)
Retrieves the set of files that match the specified query.
func (Storage) RemoveImplication ¶ added in v0.2.0
Removes the specified implication
func (Storage) RemoveImplicationsForTagId ¶ added in v0.2.0
Removes implications featuring the specified tag.
func (*Storage) SettingAsBool ¶ added in v0.4.0
Retrieves the specified setting's boolean value.
func (*Storage) SettingAsString ¶ added in v0.4.0
Retrieves the specified setting's string value.
func (Storage) TagsByNames ¶
Retrieves the set of named tags.
func (Storage) TopTags ¶ added in v0.3.0
func (storage Storage) TopTags(count uint) ([]entities.TagFileCount, error)
Retrieves the most popular tags.
func (*Storage) UntaggedFiles ¶ added in v0.4.0
Retrieves the set of untagged files.
func (*Storage) UnusedValues ¶ added in v0.4.0
Retrievse the set of unused values.
func (*Storage) UpdateFile ¶
func (storage *Storage) UpdateFile(fileId uint, path string, fingerprint fingerprint.Fingerprint, modTime time.Time, size int64, isDir bool) (*entities.File, error)
Updates a file in the database.
func (Storage) UpdateImplicationsForTagId ¶ added in v0.2.0
Updates implications featuring the specified tag.
func (*Storage) ValueByName ¶ added in v0.4.0
Retrieves a specific value by name.
func (*Storage) ValueCount ¶ added in v0.4.0
Retrievse the count of values.
func (Storage) ValuesByIds ¶ added in v0.4.1
Retrieves a specific set of values.
func (*Storage) ValuesByNames ¶ added in v0.4.0
Retrieves the set of values with the specified names.