Documentation
¶
Overview ¶
Package cmdadmin holds the commands of the server's admin, on the base: create, list, disable and log out accounts, reset their password and change the server's secret and its settings.
Index ¶
- Variables
- func Activity(cobra *cobra.Command, args []string) error
- func AddUser(cobra *cobra.Command, args []string) error
- func Admin(cobra *cobra.Command, args []string) error
- func Cleanup(cobra *cobra.Command, args []string) error
- func DisableUser(cobra *cobra.Command, args []string) error
- func EnableUser(cobra *cobra.Command, args []string) error
- func ListUsers(cobra *cobra.Command, args []string) error
- func ResetPassword(cobra *cobra.Command, args []string) error
- func Restart(cobra *cobra.Command, args []string) error
- func RevokeSessions(cobra *cobra.Command, args []string) error
- func RotateSecret(cobra *cobra.Command, args []string) error
- func SeedPerf(cobra *cobra.Command, args []string) error
- func SetPlan(cobra *cobra.Command, args []string) error
- func Settings(cobra *cobra.Command, args []string) error
- func SettingsSet(cobra *cobra.Command, args []string) error
- func Status(cobra *cobra.Command, args []string) error
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("account not found")
ErrNotFound is an account name that matches none.
Functions ¶
func Activity ¶
Activity prints the journal of every account, or of args[0], the newest first, or as JSON with --json.
func Admin ¶
Admin opens the admin's screen: the server's state, the accounts and the settings, on the base like the other admin commands. It needs a terminal.
func Cleanup ¶
Cleanup runs serve's hourly round now: index the notes left unindexed, purge what expired.
func DisableUser ¶
DisableUser refuses an account to log in and its sessions and tokens, keeping its data.
func EnableUser ¶
EnableUser gives a disabled account back.
func ListUsers ¶
ListUsers prints every account with its plan, admin flag, activity, notes and sessions, or as JSON with --json.
func ResetPassword ¶
ResetPassword gives an account a new password and logs all its devices out: for a forgotten one.
func Restart ¶
Restart asks the running serve to restart a part of it, args[0] api or mcp, in the same process. The MCP comes back only while mcp_enabled is on.
func RevokeSessions ¶
RevokeSessions logs an account out of every device: its sessions and tokens are deleted.
func RotateSecret ¶
RotateSecret seals the keys of the accounts by TIDE_SECRET, in place of TIDE_OLD_SECRET.
func SeedPerf ¶
SeedPerf creates an account of generated notes, 50,000 unless args[1] says otherwise, to measure the app at scale.
func Settings ¶
Settings prints the settings of the server, one key: value per line. With no row yet they are the defaults, said on stderr so stdout stays the settings.
func SettingsSet ¶
SettingsSet changes one setting, args[0] its key and args[1] its value; a running server applies it at once.
Types ¶
This section is empty.