Documentation
¶
Index ¶
- type FileTreeDB
- func (w *FileTreeDB) AddPhoto(catID, photoID uint64, photoData []byte) error
- func (w *FileTreeDB) AddPhotosBatch(photos []manul.PhotoItem) error
- func (w *FileTreeDB) Close() error
- func (w *FileTreeDB) GetAllCatIDs() ([]uint64, error)
- func (w *FileTreeDB) GetPhotoData(catID, photoID uint64) ([]byte, error)
- func (w *FileTreeDB) GetPhotoIDs(catID uint64) ([]uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileTreeDB ¶
type FileTreeDB struct {
// contains filtered or unexported fields
}
FileTreeDB implements DBWriter interface using bbolt for metadata and filesystem for photos
func NewReader ¶
func NewReader(dbDir string) (*FileTreeDB, error)
NewReader creates a new FileTreeDB for reading (read-only mode)
func (*FileTreeDB) AddPhoto ¶
func (w *FileTreeDB) AddPhoto(catID, photoID uint64, photoData []byte) error
func (*FileTreeDB) AddPhotosBatch ¶
func (w *FileTreeDB) AddPhotosBatch(photos []manul.PhotoItem) error
func (*FileTreeDB) Close ¶
func (w *FileTreeDB) Close() error
func (*FileTreeDB) GetAllCatIDs ¶
func (w *FileTreeDB) GetAllCatIDs() ([]uint64, error)
func (*FileTreeDB) GetPhotoData ¶
func (w *FileTreeDB) GetPhotoData(catID, photoID uint64) ([]byte, error)
func (*FileTreeDB) GetPhotoIDs ¶
func (w *FileTreeDB) GetPhotoIDs(catID uint64) ([]uint64, error)
Click to show internal directories.
Click to hide internal directories.