package
1.3.4
Repository: https://github.com/getdatcrypto/nimbus.git
Documentation: pkg.go.dev

# Functions

LoadJSON will load a persisted json object from disk.
NewFileLogger returns a logger that logs to logFilename.
NewLogger returns a logger that can be closed.
NewSafeFile returns a file that can atomically be written to disk, minimizing the risk of corruption.
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.
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.