Documentation
¶
Overview ¶
Package server implements the subcommands of teanode-server: running the mail server, and the few operations that write the database directly rather than going through a running server.
The line between this package and internal/cmd is who writes. The client never writes the database; everything it changes goes through the API, so that a change made from a shell behaves exactly like the same change made in the dashboard. The commands here are the exceptions that have to exist: creating the schema before there is a server, importing a configuration into an empty database, generating a development certificate, and putting an account back when nobody can log in.
Index ¶
Constants ¶
const AllowMigrationRevert = bootstrap.Prefix + "ALLOW_MIGRATION_REVERT"
AllowMigrationRevert is the variable that says an older binary may undo what a newer one did to the database.
Variables ¶
This section is empty.
Functions ¶
func NewConfigCommand ¶
NewConfigCommand builds the "teanode config" command group.
func NewEvaluateCommand ¶ added in v0.94.0
NewEvaluateCommand builds "teanode-server evaluate".
func NewPasswordCommand ¶
NewPasswordCommand builds "teanode-server password", which turns a password into the bcrypt hash that goes into users[].passwordHash of an exported configuration. Editing the file by hand is not the usual way to add an account — "teanode user add" is — but it is what is left when the server will not start.
func NewRunCommand ¶
NewRunCommand builds "teanode run", the server itself.
func NewUserCommand ¶
NewUserCommand builds "teanode-server user", the accounts on this server, edited in the database directly.
These exist for a server that will not start, or that nobody can log into. Day to day the accounts are managed through the API — "teanode user" from the client, or the web UI — which checks who is asking. Nothing here does: whoever can run this on the host holds the database anyway, which is why every change made here is recorded in the audit log as a rescue.
Types ¶
This section is empty.