adminui

package
v1.1.18 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package adminui exposes the admin plugin's embedded shell for Go hosts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(options ShellOptions) http.Handler

Handler serves the embedded admin shell with the supplied host options.

func ShellHTML

func ShellHTML(options ShellOptions) ([]byte, error)

ShellHTML renders the embedded shell index with host-specific endpoints.

Types

type AuthMode

type AuthMode string

AuthMode controls how the browser shell obtains admin credentials.

const (
	// AuthModeBearer stores a bearer token in localStorage and sends it to admin APIs.
	AuthModeBearer AuthMode = "bearer"
	// AuthModeSession lets the host provide credentials through same-origin cookies.
	AuthModeSession AuthMode = "session"
)

type ShellOptions

type ShellOptions struct {
	ContributionsEndpoint string
	LoginEndpoint         string
	TokenStorageKey       string
	AuthMode              AuthMode
}

ShellOptions configures the embedded admin shell for a host application.

Jump to

Keyboard shortcuts

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