Documentation ¶
Index ¶
- type Database
- func (db *Database) AddFileTag(fileId, tagId uint) (*FileTag, error)
- func (db *Database) AddFileTags(fileId uint, tagIds []uint) error
- func (db Database) AddImplication(tagId, impliedTagId uint) error
- func (db *Database) Close() error
- func (db *Database) CopyFileTags(sourceTagId uint, destTagId uint) error
- func (db Database) CreateSchema() error
- func (db *Database) DeleteFile(fileId uint) error
- func (db *Database) DeleteFileTag(fileId, tagId uint) error
- func (db *Database) DeleteFileTagsByFileId(fileId uint) error
- func (db *Database) DeleteFileTagsByTagId(tagId uint) error
- func (db Database) DeleteImplication(tagId, impliedTagId uint) error
- func (db Database) DeleteImplicationsForTagId(tagId uint) error
- func (db Database) DeleteTag(tagId uint) error
- func (db *Database) DuplicateFiles() ([]Files, error)
- func (db *Database) File(id uint) (*File, error)
- func (db *Database) FileByPath(path string) (*File, error)
- func (db *Database) FileCount() (uint, error)
- func (db *Database) FileCountByFingerprint(fingerprint fingerprint.Fingerprint) (uint, error)
- func (db *Database) FileCountWithTag(tagId uint) (uint, error)
- func (db *Database) FileCountWithTags(tagIds []uint) (uint, error)
- func (db *Database) FileTagCount() (uint, error)
- func (db *Database) FileTagCountByFileId(fileId uint) (uint, error)
- func (db *Database) FileTagExists(fileId, tagId uint) (bool, error)
- func (db *Database) FileTags() (FileTags, error)
- func (db *Database) FileTagsByFileId(fileId uint) (FileTags, error)
- func (db *Database) FileTagsByTagId(tagId uint) (FileTags, error)
- func (db *Database) Files() (Files, error)
- func (db *Database) FilesByDirectory(path string) (Files, error)
- func (db *Database) FilesByFingerprint(fingerprint fingerprint.Fingerprint) (Files, error)
- func (db *Database) FilesWithTag(tagId uint) (Files, error)
- func (db *Database) FilesWithTags(tagIds []uint) (Files, error)
- func (db *Database) Implications() (Implications, error)
- func (db *Database) ImplicationsForTags(tagIds []uint) (Implications, error)
- func (db *Database) InsertFile(path string, fingerprint fingerprint.Fingerprint, modTime time.Time, ...) (*File, error)
- func (db Database) InsertTag(name string) (*Tag, error)
- func (db Database) RenameTag(tagId uint, name string) (*Tag, error)
- func (db Database) Tag(id uint) (*Tag, error)
- func (db Database) TagByName(name string) (*Tag, error)
- func (db *Database) TagCount() (uint, error)
- func (db Database) Tags() (Tags, error)
- func (db *Database) TagsByFileId(fileId uint) (Tags, error)
- func (db Database) TagsByNames(names []string) (Tags, error)
- func (db *Database) UpdateFile(fileId uint, path string, fingerprint fingerprint.Fingerprint, ...) (*File, error)
- func (db Database) UpdateImplicationsForTagId(implyingTagId, impliedTagId uint) error
- type File
- type FileTag
- type FileTags
- type Files
- type Implication
- type Implications
- type Tag
- type Tags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) AddFileTag ¶
Adds a file tag.
func (*Database) AddFileTags ¶
Adds a set of file tags.
func (Database) AddImplication ¶ added in v0.2.0
Adds the specified implications
func (*Database) CopyFileTags ¶
Copies file tags from one tag to another.
func (Database) CreateSchema ¶
func (*Database) DeleteFile ¶
Removes a file from the database.
func (*Database) DeleteFileTag ¶
Removes an file tag.
func (*Database) DeleteFileTagsByFileId ¶
Removes all of the file tags for the specified file.
func (*Database) DeleteFileTagsByTagId ¶
Removes all of the file tags for the specified tag.
func (Database) DeleteImplication ¶ added in v0.2.0
Deletes the specified implications
func (Database) DeleteImplicationsForTagId ¶ added in v0.2.0
Deletes implications featuring the specified tag.
func (*Database) DuplicateFiles ¶
Retrieves the sets of duplicate files within the database.
func (*Database) FileByPath ¶
Retrieves the file with the specified path.
func (*Database) FileCountByFingerprint ¶
func (db *Database) FileCountByFingerprint(fingerprint fingerprint.Fingerprint) (uint, error)
Retrieves the number of files with the specified fingerprint.
func (*Database) FileCountWithTag ¶
Retrieves the count of files with the specified tag.
func (*Database) FileCountWithTags ¶
Retrieves the count of files with the specified tags.
func (*Database) FileTagCount ¶
Retrieves the total count of file tags in the database.
func (*Database) FileTagCountByFileId ¶
Retrieves the count of file tags for the specified file.
func (*Database) FileTagExists ¶
Determines whether the specified file has the specified tag applied.
func (*Database) FileTagsByFileId ¶
Retrieves the set of file tags with the specified file ID.
func (*Database) FileTagsByTagId ¶
Retrieves the set of file tags with the specified tag ID.
func (*Database) FilesByDirectory ¶
Retrieves all files that are under the specified directory.
func (*Database) FilesByFingerprint ¶
func (db *Database) FilesByFingerprint(fingerprint fingerprint.Fingerprint) (Files, error)
Retrieves the set of files with the specified fingerprint.
func (*Database) FilesWithTag ¶
Retrieves the set of files with the specified tag.
func (*Database) FilesWithTags ¶
Retrieves the set of files with the specified tags.
func (*Database) Implications ¶ added in v0.2.0
func (db *Database) Implications() (Implications, error)
Retrieves the complete set of tag implications.
func (*Database) ImplicationsForTags ¶ added in v0.2.0
func (db *Database) ImplicationsForTags(tagIds []uint) (Implications, error)
Retrieves the set of tags implied by the specified tags.
func (*Database) InsertFile ¶
func (db *Database) InsertFile(path string, fingerprint fingerprint.Fingerprint, modTime time.Time, size int64, isDir bool) (*File, error)
Adds a file to the database.
func (*Database) TagsByFileId ¶
Retrieves the set of tags for the specified file.
func (Database) TagsByNames ¶
Retrieves the set of named tags.
func (*Database) UpdateFile ¶
func (db *Database) UpdateFile(fileId uint, path string, fingerprint fingerprint.Fingerprint, modTime time.Time, size int64, isDir bool) (*File, error)
Updates a file in the database.
func (Database) UpdateImplicationsForTagId ¶ added in v0.2.0
Updates implications featuring the specified tag.
type File ¶
type File struct { Id uint Directory string Name string Fingerprint fingerprint.Fingerprint ModTime time.Time Size int64 IsDir bool }
A tracked file.
type Implication ¶ added in v0.2.0
type Implications ¶ added in v0.2.0
type Implications []*Implication