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) error
- func Compact(debug bool) 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) (finds []string, records int, err error)
- type Bucket
- type Filepath
- type Lists
- type Matches
Constants ¶
const (
FileMode fs.FileMode = 0600
)
Variables ¶
Functions ¶
func AllBuckets ¶ added in v0.0.4
AllBuckets lists all the stored bucket names in the database.
func Clean ¶
Clean the stale items from all database buckets. Stale items are file pointers that no longer exist on the host file system.
Types ¶
type Bucket ¶ added in v0.0.4
type Bucket string
Bucket is the absolute path to a directory that's used as the bucket name.
type Lists ¶ added in v0.0.4
Lists are a collection of fetched filepaths and their SHA256 checksums.
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.