Documentation
¶
Overview ¶
Package admin provides admin mode and impersonation functionality.
Index ¶
- type Handlers
- func (h *Handlers) AdminModeDisableHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) AdminModeEnableHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) AdminModeStatusHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) ImpersonationStartHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) ImpersonationStatusHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) ImpersonationStopHandler(w http.ResponseWriter, r *http.Request)
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.
Click to show internal directories.
Click to hide internal directories.