Documentation
¶
Overview ¶
Package web implements snagbox's server-rendered admin dashboard: managing projects, agents (queue consumers) and their per-project permissions, ingest tokens, and the Telegram user allowlist, plus an issue browser and the bot-first login-link redemption endpoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
Store *store.Store
Blob *blob.Store
AuthService LoginRedeemer
Sessions auth.SessionValidator
ServerSecret []byte
CookieSecure bool
// BotUsername is the Telegram bot's @username (without the @). When set,
// the login page shows a "Login with Telegram" button that deep-links to
// the bot with the login start parameter. Empty hides the button.
BotUsername string
Logger *slog.Logger
}
Deps carries the dependencies required to build a Server. AuthService may be nil, in which case login is disabled and protected pages redirect to /login.
type LoginRedeemer ¶
type LoginRedeemer interface {
RedeemLoginLink(ctx context.Context, in authkit.RedeemLoginLinkInput) (authkit.WebSession, error)
}
LoginRedeemer redeems a signed login-link token into a web session. It is satisfied by *authkit.AuthService and may be nil when login is disabled.