Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data interface {
CreateFile(string, time.Time) (uuid.UUID, error)
CreateFileWithID(string, time.Time, uuid.UUID) error
CreateFileWithTags(string, time.Time, []string) (uuid.UUID, error)
CreateFileWithIDAndTags(string, time.Time, uuid.UUID, []string) error
RemoveFile(uuid.UUID) error
FindFilesWithDate(time.Time) ([]*records.File, error)
FindFilesWithTags(tagNames []string) ([]*records.File, error)
FindFilesWithIdPrefix(idPrefix string) ([]*records.File, error)
GetFileWithDate(string, time.Time) (*records.File, error)
GetFileYears() ([]int, error)
GetFileMonths(int) ([]int, error)
GetFileDays(int, int) ([]int, error)
AllFiles() (records.FileIterator, error)
GetFile(id uuid.UUID) (*records.File, error)
GetFileByHash(hash string) (*records.File, error)
UpdateFile(*records.File) error
UpdateFileHash(uuid.UUID, string) error
UpdateFileDate(uuid.UUID, string, time.Time) error
AllTags() (records.TagIterator, error)
GetTags([]string) ([]*records.Tag, error)
GetTagsForFile(uuid.UUID) (records.TagIterator, error)
FindTagByName(string) (*records.Tag, error)
CreateTags([]string) ([]uuid.UUID, error)
UpdateFileTags(id uuid.UUID, addedTags []string, removedTags []string) error
FindMetadataByHash(hash string) (*records.FileMetadata, error)
CreateMetadataWithID(string, uint64, uuid.UUID) error
}
type OpenFile ¶
type OpenFile interface {
io.ReadWriteSeeker
Flush() error
// Close closes a file opened for reading
Close() error
// Claim closes a file opened for writing and keeps it in
// persistent storage with the given ID
Claim(uuid.UUID) error
// Drop closes a file opened for writing and removes it
// from storage
Drop() error
}
Click to show internal directories.
Click to hide internal directories.