Documentation ¶
Index ¶
- func CreateAt(path string) error
- type AbsolutePathResolutionError
- type FileTagDoesNotExist
- type Storage
- func (store *Storage) AddFile(tx *Tx, path string, fingerprint fingerprint.Fingerprint, modTime time.Time, ...) (*entities.File, error)
- func (storage *Storage) AddFileTag(tx *Tx, fileId entities.FileId, tagId entities.TagId, valueId entities.ValueId) (*entities.FileTag, error)
- func (storage Storage) AddImplication(tx *Tx, pair, impliedPair entities.TagIdValueIdPair) error
- func (storage *Storage) AddQuery(tx *Tx, text string) (*entities.Query, error)
- func (storage *Storage) AddTag(tx *Tx, name string) (*entities.Tag, error)
- func (storage *Storage) AddValue(tx *Tx, name string) (*entities.Value, error)
- func (storage *Storage) Begin() (*Tx, error)
- func (storage *Storage) Close() error
- func (storage *Storage) CopyFileTags(tx *Tx, sourceTagId, destTagId entities.TagId) error
- func (storage Storage) CopyTag(tx *Tx, sourceTagId entities.TagId, name string) (*entities.Tag, error)
- func (store *Storage) DeleteFile(tx *Tx, fileId entities.FileId) error
- func (store *Storage) DeleteFileIfUntagged(tx *Tx, fileId entities.FileId) error
- func (storage *Storage) DeleteFileTag(tx *Tx, fileId entities.FileId, tagId entities.TagId, valueId entities.ValueId) error
- func (storage *Storage) DeleteFileTagsByFileId(tx *Tx, fileId entities.FileId) error
- func (storage *Storage) DeleteFileTagsByTagId(tx *Tx, tagId entities.TagId) error
- func (storage *Storage) DeleteFileTagsByValueId(tx *Tx, valueId entities.ValueId) error
- func (storage Storage) DeleteImplication(tx *Tx, pair, impliedPair entities.TagIdValueIdPair) error
- func (storage Storage) DeleteImplicationsByTagId(tx *Tx, tagId entities.TagId) error
- func (storage Storage) DeleteImplicationsByValueId(tx *Tx, valueId entities.ValueId) error
- func (storage *Storage) DeleteQuery(tx *Tx, text string) error
- func (storage Storage) DeleteTag(tx *Tx, tagId entities.TagId) error
- func (store *Storage) DeleteUntaggedFiles(tx *Tx, fileIds entities.FileIds) error
- func (storage *Storage) DeleteValue(tx *Tx, valueId entities.ValueId) error
- func (store *Storage) DuplicateFiles(tx *Tx) ([]entities.Files, error)
- func (store *Storage) File(tx *Tx, id entities.FileId) (*entities.File, error)
- func (store *Storage) FileByPath(tx *Tx, path string) (*entities.File, error)
- func (store *Storage) FileCount(tx *Tx) (uint, error)
- func (store *Storage) FileCountByFingerprint(tx *Tx, fingerprint fingerprint.Fingerprint) (uint, error)
- func (store *Storage) FileCountForQuery(tx *Tx, expression query.Expression, path string, ...) (uint, error)
- func (storage *Storage) FileTagCount(tx *Tx) (uint, error)
- func (storage *Storage) FileTagCountByFileId(tx *Tx, fileId entities.FileId, explicitOnly bool) (uint, error)
- func (storage *Storage) FileTagCountByTagId(tx *Tx, tagId entities.TagId, explicitOnly bool) (uint, error)
- func (storage *Storage) FileTagCountByValueId(tx *Tx, valueId entities.ValueId) (uint, error)
- func (storage *Storage) FileTagExists(tx *Tx, fileId entities.FileId, tagId entities.TagId, valueId entities.ValueId, ...) (bool, error)
- func (storage *Storage) FileTags(tx *Tx) (entities.FileTags, error)
- func (storage *Storage) FileTagsByFileId(tx *Tx, fileId entities.FileId, explicitOnly bool) (entities.FileTags, error)
- func (storage *Storage) FileTagsByTagId(tx *Tx, tagId entities.TagId, explicitOnly bool) (entities.FileTags, error)
- func (storage *Storage) FileTagsByValueId(tx *Tx, valueId entities.ValueId) (entities.FileTags, error)
- func (store *Storage) Files(tx *Tx, sort string) (entities.Files, error)
- func (store *Storage) FilesByDirectories(tx *Tx, paths []string) (entities.Files, error)
- func (store *Storage) FilesByDirectory(tx *Tx, path string) (entities.Files, error)
- func (store *Storage) FilesByFingerprint(tx *Tx, fingerprint fingerprint.Fingerprint) (entities.Files, error)
- func (store *Storage) FilesForQuery(tx *Tx, expression query.Expression, path string, ...) (entities.Files, error)
- func (storage *Storage) Implications(tx *Tx) (entities.Implications, error)
- func (storage *Storage) ImplicationsFor(tx *Tx, pairs ...entities.TagIdValueIdPair) (entities.Implications, error)
- func (storage *Storage) ImplicationsImplying(tx *Tx, pairs ...entities.TagIdValueIdPair) (entities.Implications, error)
- func (storage *Storage) Queries(tx *Tx) (entities.Queries, error)
- func (storage *Storage) Query(tx *Tx, text string) (*entities.Query, error)
- func (storage Storage) RenameTag(tx *Tx, tagId entities.TagId, name string) (*entities.Tag, error)
- func (storage *Storage) RenameValue(tx *Tx, valueId entities.ValueId, newName string) (*entities.Value, error)
- func (storage *Storage) Setting(tx *Tx, name string) (*entities.Setting, error)
- func (storage *Storage) Settings(tx *Tx) (entities.Settings, error)
- func (storage Storage) Tag(tx *Tx, id entities.TagId) (*entities.Tag, error)
- func (storage Storage) TagByCasedName(tx *Tx, name string, ignoreCase bool) (*entities.Tag, error)
- func (storage Storage) TagByName(tx *Tx, name string) (*entities.Tag, error)
- func (storage *Storage) TagCount(tx *Tx) (uint, error)
- func (storage Storage) TagUsage(tx *Tx) ([]entities.TagFileCount, error)
- func (storage *Storage) Tags(tx *Tx) (entities.Tags, error)
- func (storage Storage) TagsByCasedNames(tx *Tx, names []string, ignoreCase bool) (entities.Tags, error)
- func (storage Storage) TagsByIds(tx *Tx, ids entities.TagIds) (entities.Tags, error)
- func (storage Storage) TagsByNames(tx *Tx, names []string) (entities.Tags, error)
- func (store *Storage) UntaggedFiles(tx *Tx) (entities.Files, error)
- func (storage *Storage) UnusedValues(tx *Tx) (entities.Values, error)
- func (store *Storage) UpdateFile(tx *Tx, fileId entities.FileId, path string, ...) (*entities.File, error)
- func (storage *Storage) UpdateSetting(tx *Tx, name, value string) (*entities.Setting, error)
- func (storage *Storage) Value(tx *Tx, id entities.ValueId) (*entities.Value, error)
- func (storage *Storage) ValueByCasedName(tx *Tx, name string, ignoreCase bool) (*entities.Value, error)
- func (storage *Storage) ValueByName(tx *Tx, name string) (*entities.Value, error)
- func (storage *Storage) ValueCount(tx *Tx) (uint, error)
- func (storage *Storage) Values(tx *Tx) (entities.Values, error)
- func (storage *Storage) ValuesByCasedNames(tx *Tx, names []string, ignoreCase bool) (entities.Values, error)
- func (storage Storage) ValuesByIds(tx *Tx, ids entities.ValueIds) (entities.Values, error)
- func (storage *Storage) ValuesByNames(tx *Tx, names []string) (entities.Values, error)
- func (storage *Storage) ValuesByTag(tx *Tx, tagId entities.TagId) (entities.Values, error)
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AbsolutePathResolutionError ¶
func (AbsolutePathResolutionError) Error ¶
func (err AbsolutePathResolutionError) Error() string
type FileTagDoesNotExist ¶
type FileTagDoesNotExist struct { FileId entities.FileId TagId entities.TagId ValueId entities.ValueId }
func (FileTagDoesNotExist) Error ¶
func (err FileTagDoesNotExist) Error() string
type Storage ¶
func (*Storage) AddFile ¶
func (store *Storage) AddFile(tx *Tx, path string, fingerprint fingerprint.Fingerprint, modTime time.Time, size int64, isDir bool) (*entities.File, error)
Adds a file to the database.
func (*Storage) AddFileTag ¶
func (storage *Storage) AddFileTag(tx *Tx, fileId entities.FileId, tagId entities.TagId, valueId entities.ValueId) (*entities.FileTag, error)
Adds a file tag.
func (Storage) AddImplication ¶
func (storage Storage) AddImplication(tx *Tx, pair, impliedPair entities.TagIdValueIdPair) error
Adds the specified implication.
func (*Storage) CopyFileTags ¶
Copies file tags from one tag to another.
func (Storage) CopyTag ¶
func (storage Storage) CopyTag(tx *Tx, sourceTagId entities.TagId, name string) (*entities.Tag, error)
Copies a tag.
func (*Storage) DeleteFile ¶
Deletes a file from the database.
func (*Storage) DeleteFileIfUntagged ¶
Deletes a file if it is untagged
func (*Storage) DeleteFileTag ¶
func (storage *Storage) DeleteFileTag(tx *Tx, fileId entities.FileId, tagId entities.TagId, valueId entities.ValueId) error
Delete file tag.
func (*Storage) DeleteFileTagsByFileId ¶
Deletes all of the file tags for the specified file.
func (*Storage) DeleteFileTagsByTagId ¶
Deletes all of the file tags for the specified tag.
func (*Storage) DeleteFileTagsByValueId ¶
Deletes all of the file tags for the specified value.
func (Storage) DeleteImplication ¶
func (storage Storage) DeleteImplication(tx *Tx, pair, impliedPair entities.TagIdValueIdPair) error
Deletes the specified implication
func (Storage) DeleteImplicationsByTagId ¶
Deletes implications for the specified tag.
func (Storage) DeleteImplicationsByValueId ¶
Deletes implications for the specified value.
func (*Storage) DeleteQuery ¶
Removes a query from the database.
func (*Storage) DeleteUntaggedFiles ¶
Deletes the specified files if they are untagged
func (*Storage) DeleteValue ¶
Deletes a value.
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 (store *Storage) FileCountByFingerprint(tx *Tx, fingerprint fingerprint.Fingerprint) (uint, error)
Retrieves the number of files with the specified fingerprint.
func (*Storage) FileCountForQuery ¶
func (store *Storage) FileCountForQuery(tx *Tx, expression query.Expression, path string, explicitOnly, ignoreCase bool) (uint, error)
Retrieves the count of files that match the specified query and matching the specified path.
func (*Storage) FileTagCount ¶
Retrieves the total count of file tags in the database.
func (*Storage) FileTagCountByFileId ¶
func (storage *Storage) FileTagCountByFileId(tx *Tx, fileId entities.FileId, explicitOnly bool) (uint, error)
Retrieves the count of file tags for the specified file.
func (*Storage) FileTagCountByTagId ¶
func (storage *Storage) FileTagCountByTagId(tx *Tx, tagId entities.TagId, explicitOnly bool) (uint, error)
Retrieves the count of file tags for the specified tag.
func (*Storage) FileTagCountByValueId ¶
Retrieves the count of file tags for the specified value.
func (*Storage) FileTagExists ¶
func (storage *Storage) FileTagExists(tx *Tx, fileId entities.FileId, tagId entities.TagId, valueId entities.ValueId, explicitOnly bool) (bool, error)
Determines whether the specified file has the specified tag applied.
func (*Storage) FileTagsByFileId ¶
func (storage *Storage) FileTagsByFileId(tx *Tx, fileId entities.FileId, explicitOnly bool) (entities.FileTags, error)
Retrieves the file tags for the specified file ID.
func (*Storage) FileTagsByTagId ¶
func (storage *Storage) FileTagsByTagId(tx *Tx, tagId entities.TagId, explicitOnly bool) (entities.FileTags, error)
Retrieves the file tags with the specified tag ID.
func (*Storage) FileTagsByValueId ¶
func (storage *Storage) FileTagsByValueId(tx *Tx, valueId entities.ValueId) (entities.FileTags, error)
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 (store *Storage) FilesByFingerprint(tx *Tx, fingerprint fingerprint.Fingerprint) (entities.Files, error)
Retrieves the set of files with the specified fingerprint.
func (*Storage) FilesForQuery ¶
func (store *Storage) FilesForQuery(tx *Tx, expression query.Expression, path string, explicitOnly, ignoreCase bool, sort string) (entities.Files, error)
Retrieves the set of files that match the specified query.
func (*Storage) Implications ¶
func (storage *Storage) Implications(tx *Tx) (entities.Implications, error)
Retrieves the complete set of tag implications.
func (*Storage) ImplicationsFor ¶
func (storage *Storage) ImplicationsFor(tx *Tx, pairs ...entities.TagIdValueIdPair) (entities.Implications, error)
Retrieves the set of implications for the specified tag and value pairs.
func (*Storage) ImplicationsImplying ¶
func (storage *Storage) ImplicationsImplying(tx *Tx, pairs ...entities.TagIdValueIdPair) (entities.Implications, error)
Retrieves the set of implications that imply the specified tag and value pairs.
func (*Storage) RenameValue ¶
func (storage *Storage) RenameValue(tx *Tx, valueId entities.ValueId, newName string) (*entities.Value, error)
Renames a value.
func (Storage) TagByCasedName ¶
Retrieves a specific tag with specified case-sensitivity.
func (Storage) TagUsage ¶
func (storage Storage) TagUsage(tx *Tx) ([]entities.TagFileCount, error)
Retrieves the tag usage.
func (Storage) TagsByCasedNames ¶
func (storage Storage) TagsByCasedNames(tx *Tx, names []string, ignoreCase bool) (entities.Tags, error)
Retrieves the set of named tags.
func (Storage) TagsByNames ¶
Retrieves the set of named tags.
func (*Storage) UntaggedFiles ¶
Retrieves the set of untagged files.
func (*Storage) UnusedValues ¶
Retrieves the set of unused values.
func (*Storage) UpdateFile ¶
func (store *Storage) UpdateFile(tx *Tx, fileId entities.FileId, path string, fingerprint fingerprint.Fingerprint, modTime time.Time, size int64, isDir bool) (*entities.File, error)
Updates a file in the database.
func (*Storage) UpdateSetting ¶
func (*Storage) ValueByCasedName ¶
func (storage *Storage) ValueByCasedName(tx *Tx, name string, ignoreCase bool) (*entities.Value, error)
Retrieves a specific value by name.
func (*Storage) ValueByName ¶
Retrieves a specific value by name.
func (*Storage) ValueCount ¶
Retrievse the count of values.
func (*Storage) ValuesByCasedNames ¶
func (storage *Storage) ValuesByCasedNames(tx *Tx, names []string, ignoreCase bool) (entities.Values, error)
Retrieves the set of values with the specified names.
func (Storage) ValuesByIds ¶
Retrieves a specific set of values.
func (*Storage) ValuesByNames ¶
Retrieves the set of values with the specified names.