Documentation
¶
Overview ¶
Package database interacts with Dupers bbolt database and buckets.
Index ¶
- Constants
- Variables
- func Abs(bucket string) ([]byte, error)
- func AllBuckets() (names []string, err error)
- func Backup() (name string, written int64, err error)
- func Clean(quiet, debug bool, buckets ...string) error
- func Compact(debug bool) error
- func CopyFile(name, dest string) (int64, error)
- func Count(b *bolt.Bucket, db *bolt.DB) (int, error)
- func DB() (string, error)
- func Info() (string, error)
- func IsEmpty() (bool, error)
- func RM(name string) error
- func Seek(sum [32]byte, bucket string, db *bolt.DB) (finds []string, records int, err error)
- type Bucket
- type Filepath
- type Lists
- type Matches
Constants ¶
View Source
const ( FileMode fs.FileMode = 0600 PrivateDir fs.FileMode = 0700 )
Variables ¶
Functions ¶
func AllBuckets ¶
AllBuckets lists all the stored bucket names in the database.
func Clean ¶
Clean the stale items from database buckets. Stale items are file pointers that no longer exist on the host file system.
Types ¶
type Bucket ¶
type Bucket string
Bucket is the absolute path to a directory that's used as the bucket name.
type Matches ¶
Matches are a collection of fetched filepaths and the bucket they were sourced from.
func Compare ¶
Compare finds exact matches of the string contained within the stored filenames and paths.
func CompareBase ¶
CompareBase finds exact matches of the string contained within the stored filenames.
func CompareBaseNoCase ¶
CompareBaseNoCase finds case insensitive matches of the string contained within the stored filenames.
Click to show internal directories.
Click to hide internal directories.