cmdadmin

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cmdadmin is the admin's commands of callback-server: they run on the base, on the server's machine.

Index

Constants

View Source
const DefaultUser = "admin"

DefaultUser is the name of the account EnsurePassword creates without CALLBACK_USER.

Variables

This section is empty.

Functions

func Backup

func Backup(cobra *cobra.Command, db bun.IDB, file string) error

Backup copies the base to file while the server runs: VACUUM INTO writes a clean copy in one read transaction. The image has no sqlite3 to do it. A Postgres base has pg_dump.

func EnsurePassword

func EnsurePassword(ctx context.Context, db bun.IDB, multi bool) error

EnsurePassword creates the account of a base that has none, named CALLBACK_USER (DefaultUser when unset) with the password CALLBACK_PASSWORD: a server put up from a compose file is usable at once. In the multi mode, without CALLBACK_PASSWORD, the base waits for its first sign-up instead. On a base of one account, CALLBACK_USER renames it; otherwise it does nothing.

func ResetPassword

func ResetPassword(cobra *cobra.Command, db bun.IDB) error

ResetPassword changes the password of the account of --user, which a base of one account may leave out: from CALLBACK_PASSWORD, or asked on the terminal.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL