# Functions
LoadJSON will load a persisted json object from disk.
NewDiscardLogger creates a logger on which all calls succceed but do nothing.
NewFileLogger returns a logger that logs to logFilename.
NewLazyBoltBucket creates a new lazy BoltDB bucket, see `LazyBoltBucket` for more information.
NewLogger returns a logger that can be closed.
OpenDatabase opens a database and validates its metadata.
RandomSuffix returns a 20 character base32 suffix for a filename.
RemoveFile removes an atomic file from disk, along with any uncommitted or temporary files.
SaveJSON will save a json object to disk in a durable, atomic way.
# Variables
ErrBadFilenameSuffix indicates that SaveJSON or LoadJSON was called using a filename that has a bad suffix.
ErrBadHeader indicates that the file opened is not the file that was expected.
ErrBadVersion indicates that the version number of the file is not compatible with the current codebase.
ErrFileInUse is returned if SaveJSON or LoadJSON is called on a file that's already being manipulated in another thread by the persist package.
# Structs
BoltDatabase is a persist-level wrapper for the bolt database, providing extra information such as a version number.
LazyBoltBucket is a lazy implementation of the bolt DB, allowing you to only actually get the bucket from bolt db if you need it.
Logger is a wrapper for the standard library logger that enforces logging with the Sia-standard settings.
Metadata contains the header and version of the data being stored.