Documentation
¶
Index ¶
- func CloseBadgerDB(db *badger.DB)
- func GetBadgerDBValue(db *badger.DB, hashKey string) (string, error)
- func IterateWithPrefix(db *badger.DB, prefix string) ([]string, error)
- func Md5Sum(filePath string) (string, error)
- func OpenBadgerDB(path string) (*badger.DB, error)
- func PutBadgerDB(db *badger.DB, hashKey string, fileNameValue string) error
- func ReadJpegDate(ctx context.Context, db *badger.DB, src_dirname string, recursive bool) ([]FileObject, []ErroredFileObject)
- func ReadVideoCreationTimeMetadata(ctx context.Context, db *badger.DB, src_dirname string, recursive bool) ([]FileObject, []ErroredFileObject)
- func ScanAndGenerateMd5sumFiles(ctx context.Context, db *badger.DB, dirname string, prefix string)
- func ScanFiles(ctx context.Context, src_dirname string, dst_dirname string)
- func SortFilesByDate(files []FileObject)
- type ErroredFileObject
- type FileObject
- type FileProcessor
- type MatchObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseBadgerDB ¶
func ReadJpegDate ¶
func ReadJpegDate(ctx context.Context, db *badger.DB, src_dirname string, recursive bool) ([]FileObject, []ErroredFileObject)
func ReadVideoCreationTimeMetadata ¶
func ReadVideoCreationTimeMetadata(ctx context.Context, db *badger.DB, src_dirname string, recursive bool) ([]FileObject, []ErroredFileObject)
func SortFilesByDate ¶
func SortFilesByDate(files []FileObject)
Types ¶
type ErroredFileObject ¶
type ErroredFileObject FileObject
type FileObject ¶
type FileObject struct { DateTime time.Time Name string Path string Md5Sum string ErrorMessage string }
func RemoveSourceFile ¶
func RemoveSourceFile(src_dirname string) []FileObject
type FileProcessor ¶
func (*FileProcessor) CopyImageFiles ¶
func (fp *FileProcessor) CopyImageFiles(ctx context.Context, srcdir string, destdir string) ([]FileObject, []ErroredFileObject, []FileObject)
func (*FileProcessor) CopyVideoFiles ¶
func (fp *FileProcessor) CopyVideoFiles(ctx context.Context, srcdir string, destdir string) ([]FileObject, []ErroredFileObject, []FileObject)
type MatchObject ¶
type MatchObject struct { SrcFileName string `json:"src_file_name"` DstFileName string `json:"dst_file_name"` }
func ValidateMd5sumFiles ¶
func ValidateMd5sumFiles(ctx context.Context, src_prefix string, dst_prefix string) []MatchObject
Click to show internal directories.
Click to hide internal directories.