httpadmin

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHooks

func NewHooks(cfg *config.Config, base server.Hooks, opts ...service.Option) server.Hooks

NewHooks composes the admin router into the preview-server hook chain when admin is enabled.

func WrapHooks

func WrapHooks(base server.Hooks, admin *Router) server.Hooks

WrapHooks combines an existing preview-server hook set with the admin router.

Types

type Registrar

type Registrar func(*Router) []routeDef

Registrar returns a cohesive group of admin routes, such as auth, documents, management, or debug.

type Router

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

Router owns the authenticated admin HTTP surface and the theme-backed admin shell.

func New

func New(cfg *config.Config, svc *service.Service) *Router

New constructs the admin router and registers the built-in route groups.

func (*Router) RegisterRegistrar

func (r *Router) RegisterRegistrar(reg Registrar)

RegisterRegistrar appends an admin route group to the router.

func (*Router) RegisterRoutes

func (r *Router) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes mounts the admin shell, admin theme assets, plugin extension assets, and all registered admin route groups.

Jump to

Keyboard shortcuts

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