admin

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package admin provides admin mode and impersonation functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handlers

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

Handlers provides HTTP handlers for admin mode and impersonation.

func NewHandlers

func NewHandlers(
	sessionStore sessions.Store,
	cookieName string,
	userStore auth.UserStore,
	auditLogger auth.AuditLogger,
	adminModeTimeout time.Duration,
) *Handlers

NewHandlers creates new admin handlers.

func (*Handlers) AdminModeDisableHandler

func (h *Handlers) AdminModeDisableHandler(w http.ResponseWriter, r *http.Request)

AdminModeDisableHandler handles POST /api/admin/mode/disable.

func (*Handlers) AdminModeEnableHandler

func (h *Handlers) AdminModeEnableHandler(w http.ResponseWriter, r *http.Request)

AdminModeEnableHandler handles POST /api/admin/mode/enable.

func (*Handlers) AdminModeStatusHandler

func (h *Handlers) AdminModeStatusHandler(w http.ResponseWriter, r *http.Request)

AdminModeStatusHandler handles GET /api/admin/mode/status.

func (*Handlers) ImpersonationStartHandler

func (h *Handlers) ImpersonationStartHandler(w http.ResponseWriter, r *http.Request)

ImpersonationStartHandler handles POST /api/admin/impersonate/start.

func (*Handlers) ImpersonationStatusHandler

func (h *Handlers) ImpersonationStatusHandler(w http.ResponseWriter, r *http.Request)

ImpersonationStatusHandler handles GET /api/admin/impersonate/status.

func (*Handlers) ImpersonationStopHandler

func (h *Handlers) ImpersonationStopHandler(w http.ResponseWriter, r *http.Request)

ImpersonationStopHandler handles POST /api/admin/impersonate/stop.

Jump to

Keyboard shortcuts

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