admin

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminConfig

type AdminConfig struct {
	DB            *meta.DB
	Store         *store.Store
	Auth          *auth.Auth
	AdminToken    string
	Log           *slog.Logger
	Metrics       *maintenance.Metrics
	SigningSecret string
	ListenAddr    string
	TLSEnabled    bool
}

AdminConfig holds the configuration for the admin API handler.

type Handler

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

Handler serves the admin API for managing accounts and tokens.

func NewHandler

func NewHandler(cfg AdminConfig) *Handler

NewHandler creates a new admin API handler.

func (*Handler) Close

func (h *Handler) Close() error

Close signals the auth-failure sweeper to stop. Safe to call multiple times.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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