admin

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package admin owns the /admin/* surface — the operator dashboard for users/orgs/repos/jobs/audit/system management. Every route is gated by RequireSiteAdmin; non-admins receive 404 (existence-leak guard) per the S34 spec.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Logger *slog.Logger
	Render *render.Renderer
	Pool   *pgxpool.Pool
	Audit  *audit.Recorder
	// SiteName is rendered into pages; matches Auth.SiteName from config.
	SiteName string
	// Version is the running shithubd version, surfaced on /admin/system.
	Version string
}

Deps wires the admin handler set.

type Handlers

type Handlers struct {
	// contains filtered or unexported fields
}

Handlers is the admin handler set.

func New

func New(d Deps) (*Handlers, error)

New constructs the admin handler set.

func (*Handlers) Mount

func (h *Handlers) Mount(r chi.Router)

Mount registers every /admin/* route. Caller wraps the whole set in RequireUser + RequireSiteAdmin so this method only registers paths and lets the middleware enforce.

Jump to

Keyboard shortcuts

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