Documentation
¶
Overview ¶
Package dashboardauth provides a bcrypt-backed SQLite store for the launcher dashboard password. The database contains a single row (id=1) with the bcrypt hash; no plaintext is ever persisted.
Index ¶
Constants ¶
const (
// DBFilename is the SQLite database file stored under the PicoClaw home directory.
DBFilename = "launcher-auth.db"
)
Variables ¶
var ErrUnsupportedPlatform = errors.New("dashboard password store is unavailable on this platform")
ErrUnsupportedPlatform reports that the SQLite-backed password store is not available for the current target platform.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store holds a handle to the SQLite database that stores the bcrypt hash.
func New ¶
New opens (or creates) the database inside dir, using the package's canonical filename. This is the preferred constructor for most callers. Any error is wrapped with the resolved path so callers get actionable output.
func (*Store) IsInitialized ¶
IsInitialized reports whether a password hash has been stored.
func (*Store) SetPassword ¶
SetPassword hashes plain with bcrypt (cost 12) and stores (or replaces) it. The plaintext is never written to disk.