Versions in this module Expand all Collapse all v0 v0.2.0 Sep 16, 2026 v0.1.0 Sep 14, 2026 Changes in this version + const CSRFCookie + const CertificatePath + const CertificateRemovePath + const ClientDownloadPath + const ClientsPath + const DataPath + const DevicesPath + const DriversPath + const EnterpriseNote + const MaxCertificateBytes + const PairPath + const PluginsPath + const Prefix + const PruneConfirmation + const PruneTimeout + const SessionCookie + const SessionTTL + const SessionsRevokePath + const SettingsPath + const StintsPath + func Authenticate(ctx context.Context, store *db.Store, email, password string) (db.Admin, bool, error) + func Certificate(store *db.Store, keyring *auth.Keyring) func(context.Context) (*clientbuild.Certificate, error) + func ClientAddress(typed string) (string, error) + type Deps struct + Clients clientbuild.Builder + Discovery func(config.Settings) wire.Discovery + Keyring *auth.Keyring + Log *slog.Logger + Now func() time.Time + OnLogin func(outcome string) + OnSettingsChanged func() + PluginDir string + Plugins Plugins + SaveDataKey func(context.Context, auth.SecretKey) error + Settings func(context.Context) (config.Settings, error) + StartedAt time.Time + Store *db.Store + Version string + type Panel struct + func New(d Deps) (*Panel, error) + func (p *Panel) PruneProgress() PruneProgress + func (p *Panel) Routes(mux *http.ServeMux) + func (p *Panel) SignedInAdmin(r *http.Request) string + type Plugins interface + All func(ctx context.Context) ([]plugins.Status, error) + Disable func(ctx context.Context, name string) error + Discover func(ctx context.Context) error + Enable func(ctx context.Context, name string) error + InterfaceVersion func() int + Remove func(ctx context.Context, name string) error + Restart func(ctx context.Context, name string) error + SetDailyCap func(ctx context.Context, name string, tokens int64) error + Spending func(ctx context.Context, name string) (plugins.Spending, error) + Status func(ctx context.Context, name string) (plugins.Status, error) + type PruneProgress struct + Actor string + Cutoff time.Time + Done int64 + Err string + FinishedAt time.Time + Freed int64 + Running bool + StartedAt time.Time + Total int64 + func (p PruneProgress) Percent() int + func (p PruneProgress) Started() bool + type Sessions struct + func NewSessions(store *db.Store, now func() time.Time) *Sessions + func (s *Sessions) CheckCSRF(r *http.Request) bool + func (s *Sessions) Current(ctx context.Context, r *http.Request) (db.AdminSession, bool) + func (s *Sessions) End(ctx context.Context, w http.ResponseWriter, r *http.Request) error + func (s *Sessions) EnsureCSRF(w http.ResponseWriter, r *http.Request) string + func (s *Sessions) Start(ctx context.Context, w http.ResponseWriter, r *http.Request, adminID int64) (string, error)