Documentation ¶
Index ¶
- type Storage
- func (storage *Storage) AddFile(path string, fingerprint fingerprint.Fingerprint, modTime time.Time, ...) (*database.File, error)
- func (storage *Storage) AddFileTag(fileId, tagId uint) (*database.FileTag, error)
- func (storage *Storage) AddFileTags(fileId uint, tagIds []uint) error
- func (storage Storage) AddImplication(tagId, impliedTagId uint) error
- func (storage *Storage) AddTag(name string) (*database.Tag, error)
- func (storage *Storage) Close() error
- func (storage *Storage) CopyFileTags(sourceTagId, destTagId uint) error
- func (storage Storage) CopyTag(sourceTagId uint, name string) (*database.Tag, error)
- func (storage Storage) DeleteTag(tagId uint) error
- func (storage *Storage) DuplicateFiles() ([]database.Files, error)
- func (storage *Storage) File(id uint) (*database.File, error)
- func (storage *Storage) FileByPath(path string) (*database.File, error)
- func (storage *Storage) FileCount() (uint, error)
- func (storage *Storage) FileCountByFingerprint(fingerprint fingerprint.Fingerprint) (uint, error)
- func (storage *Storage) FileCountWithTag(tagId uint) (uint, error)
- func (storage *Storage) FileCountWithTags(tagIds []uint) (uint, error)
- func (storage *Storage) FileTagCount() (uint, error)
- func (storage *Storage) FileTagCountByFileId(fileId uint) (uint, error)
- func (storage *Storage) FileTagExists(fileId, tagId uint) (bool, error)
- func (storage *Storage) FileTags() (database.FileTags, error)
- func (storage *Storage) FileTagsByFileId(fileId uint) (database.FileTags, error)
- func (storage *Storage) FileTagsByTagId(tagId uint) (database.FileTags, error)
- func (storage *Storage) Files() (database.Files, error)
- func (storage *Storage) FilesByDirectories(paths []string) (database.Files, error)
- func (storage *Storage) FilesByDirectory(path string) (database.Files, error)
- func (storage *Storage) FilesByFingerprint(fingerprint fingerprint.Fingerprint) (database.Files, error)
- func (storage *Storage) FilesWithTag(tagId uint) (database.Files, error)
- func (storage *Storage) FilesWithTags(includeTagIds, excludeTagIds []uint) (database.Files, error)
- func (storage *Storage) Implications() (database.Implications, error)
- func (storage *Storage) ImplicationsForTags(tagIds ...uint) (database.Implications, error)
- func (storage *Storage) RemoveFile(fileId uint) error
- func (storage *Storage) RemoveFileTag(fileId, tagId uint) error
- func (storage *Storage) RemoveFileTagsByFileId(fileId uint) error
- func (storage *Storage) RemoveFileTagsByTagId(tagId uint) error
- func (storage Storage) RemoveImplication(tagId, impliedTagId uint) error
- func (storage Storage) RemoveImplicationsForTagId(tagId uint) error
- func (storage Storage) RenameTag(tagId uint, name string) (*database.Tag, error)
- func (storage Storage) Tag(id uint) (*database.Tag, error)
- func (storage Storage) TagByName(name string) (*database.Tag, error)
- func (storage *Storage) TagCount() (uint, error)
- func (storage *Storage) Tags() (database.Tags, error)
- func (storage *Storage) TagsByFileId(fileId uint) (database.Tags, error)
- func (storage Storage) TagsByNames(names []string) (database.Tags, error)
- func (storage *Storage) TagsForPath(path string) (database.Tags, error)
- func (storage Storage) TagsForTags(tagIds []uint) (database.Tags, error)
- func (storage *Storage) UpdateFile(fileId uint, path string, fingerprint fingerprint.Fingerprint, ...) (*database.File, error)
- func (storage Storage) UpdateImplicationsForTagId(tagId, impliedTagId uint) 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) (*database.File, error)
Adds a file to the database.
func (*Storage) AddFileTag ¶
Adds an file tag.
func (*Storage) AddFileTags ¶
Adds a set of file tags.
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) 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) FileCountWithTag ¶
The number of files with the specified tag.
func (*Storage) FileCountWithTags ¶
The number of files with the specified set of tags.
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) 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) 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) (database.Files, error)
Retrieves the set of files with the specified fingerprint.
func (*Storage) FilesWithTag ¶
Retrieves the set of files with the specified tag.
func (*Storage) FilesWithTags ¶
Retrieves the set of files with the specified set of tags.
func (*Storage) Implications ¶ added in v0.2.0
func (storage *Storage) Implications() (database.Implications, error)
Retrieves the complete set of tag implications.
func (*Storage) ImplicationsForTags ¶ added in v0.2.0
func (storage *Storage) ImplicationsForTags(tagIds ...uint) (database.Implications, error)
Retrieves the set of implications for the specified tags.
func (*Storage) RemoveFile ¶
Removes a file from the database.
func (*Storage) RemoveFileTag ¶
Remove file tag.
func (*Storage) RemoveFileTagsByFileId ¶
Removes all of the file tags for the specified file.
func (*Storage) RemoveFileTagsByTagId ¶
Removes all of the file tags for the specified tag.
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) TagsByFileId ¶
Retrieves the set of tags for the specified file.
func (Storage) TagsByNames ¶
Retrieves the set of named tags.
func (*Storage) TagsForPath ¶
Retrieves the set of tags for the specified path.
func (Storage) TagsForTags ¶
The set of further tags for which there are tagged files given a particular set of tags.
func (*Storage) UpdateFile ¶
func (storage *Storage) UpdateFile(fileId uint, path string, fingerprint fingerprint.Fingerprint, modTime time.Time, size int64, isDir bool) (*database.File, error)
Updates a file in the database.
func (Storage) UpdateImplicationsForTagId ¶ added in v0.2.0
Updates implications featuring the specified tag.