storage

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2013 License: BSD-3-Clause, GPL-3.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	Db *database.Database
}

func Open

func Open() (*Storage, error)

func OpenAt

func OpenAt(path string) (*Storage, error)

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

func (storage *Storage) AddFileTag(fileId, tagId uint) (*database.FileTag, error)

Adds an file tag.

func (*Storage) AddFileTags

func (storage *Storage) AddFileTags(fileId uint, tagIds []uint) error

Adds a set of file tags.

func (Storage) AddImplication added in v0.2.0

func (storage Storage) AddImplication(tagId, impliedTagId uint) error

Adds the specified implication.

func (*Storage) AddTag

func (storage *Storage) AddTag(name string) (*database.Tag, error)

Adds a tag.

func (*Storage) Close

func (storage *Storage) Close() error

func (*Storage) CopyFileTags

func (storage *Storage) CopyFileTags(sourceTagId, destTagId uint) error

Copies file tags from one tag to another.

func (Storage) CopyTag

func (storage Storage) CopyTag(sourceTagId uint, name string) (*database.Tag, error)

Copies a tag.

func (Storage) DeleteTag

func (storage Storage) DeleteTag(tagId uint) error

Deletes a tag.

func (*Storage) DuplicateFiles

func (storage *Storage) DuplicateFiles() ([]database.Files, error)

Retrieves the sets of duplicate files within the database.

func (*Storage) File

func (storage *Storage) File(id uint) (*database.File, error)

Retrieves a specific file.

func (*Storage) FileByPath

func (storage *Storage) FileByPath(path string) (*database.File, error)

Retrieves the file with the specified path.

func (*Storage) FileCount

func (storage *Storage) FileCount() (uint, error)

Retrieves the total number of tracked files.

func (*Storage) FileCountByFingerprint

func (storage *Storage) FileCountByFingerprint(fingerprint fingerprint.Fingerprint) (uint, error)

Retrieves the number of files with the specified fingerprint.

func (*Storage) FileCountWithTag

func (storage *Storage) FileCountWithTag(tagId uint) (uint, error)

The number of files with the specified tag.

func (*Storage) FileCountWithTags

func (storage *Storage) FileCountWithTags(tagIds []uint) (uint, error)

The number of files with the specified set of tags.

func (*Storage) FileTagCount

func (storage *Storage) FileTagCount() (uint, error)

Retrieves the total count of file tags in the database.

func (*Storage) FileTagCountByFileId

func (storage *Storage) FileTagCountByFileId(fileId uint) (uint, error)

Retrieves the count of file tags for the specified file.

func (*Storage) FileTagExists

func (storage *Storage) FileTagExists(fileId, tagId uint) (bool, error)

Determines whether the specified file has the specified tag applied.

func (*Storage) FileTags

func (storage *Storage) FileTags() (database.FileTags, error)

Retrieves the complete set of file tags.

func (*Storage) FileTagsByFileId

func (storage *Storage) FileTagsByFileId(fileId uint) (database.FileTags, error)

Retrieves the file tags with the specified file ID.

func (*Storage) FileTagsByTagId

func (storage *Storage) FileTagsByTagId(tagId uint) (database.FileTags, error)

Retrieves the file tags with the specified tag ID.

func (*Storage) Files

func (storage *Storage) Files() (database.Files, error)

The complete set of tracked files.

func (*Storage) FilesByDirectories

func (storage *Storage) FilesByDirectories(paths []string) (database.Files, error)

Retrieves all file that are under the specified directories.

func (*Storage) FilesByDirectory

func (storage *Storage) FilesByDirectory(path string) (database.Files, error)

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

func (storage *Storage) FilesWithTag(tagId uint) (database.Files, error)

Retrieves the set of files with the specified tag.

func (*Storage) FilesWithTags

func (storage *Storage) FilesWithTags(includeTagIds, excludeTagIds []uint) (database.Files, error)

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

func (storage *Storage) RemoveFile(fileId uint) error

Removes a file from the database.

func (*Storage) RemoveFileTag

func (storage *Storage) RemoveFileTag(fileId, tagId uint) error

Remove file tag.

func (*Storage) RemoveFileTagsByFileId

func (storage *Storage) RemoveFileTagsByFileId(fileId uint) error

Removes all of the file tags for the specified file.

func (*Storage) RemoveFileTagsByTagId

func (storage *Storage) RemoveFileTagsByTagId(tagId uint) error

Removes all of the file tags for the specified tag.

func (Storage) RemoveImplication added in v0.2.0

func (storage Storage) RemoveImplication(tagId, impliedTagId uint) error

Removes the specified implication

func (Storage) RemoveImplicationsForTagId added in v0.2.0

func (storage Storage) RemoveImplicationsForTagId(tagId uint) error

Removes implications featuring the specified tag.

func (Storage) RenameTag

func (storage Storage) RenameTag(tagId uint, name string) (*database.Tag, error)

Renames a tag.

func (Storage) Tag

func (storage Storage) Tag(id uint) (*database.Tag, error)

Retrieves a spceific tag.

func (Storage) TagByName

func (storage Storage) TagByName(name string) (*database.Tag, error)

Retrieves a specific tag.

func (*Storage) TagCount

func (storage *Storage) TagCount() (uint, error)

The number of tags in the database.

func (*Storage) Tags

func (storage *Storage) Tags() (database.Tags, error)

The set of tags.

func (*Storage) TagsByFileId

func (storage *Storage) TagsByFileId(fileId uint) (database.Tags, error)

Retrieves the set of tags for the specified file.

func (Storage) TagsByNames

func (storage Storage) TagsByNames(names []string) (database.Tags, error)

Retrieves the set of named tags.

func (*Storage) TagsForPath

func (storage *Storage) TagsForPath(path string) (database.Tags, error)

Retrieves the set of tags for the specified path.

func (Storage) TagsForTags

func (storage Storage) TagsForTags(tagIds []uint) (database.Tags, error)

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

func (storage Storage) UpdateImplicationsForTagId(tagId, impliedTagId uint) error

Updates implications featuring the specified tag.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL