http

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Overview

Package http exposes the plugin marketplace REST API.

Routes (all under /api/v1/admin/plugins, require admin role):

GET    /api/v1/admin/plugins/catalog          – list remote plugin catalog
POST   /api/v1/admin/plugins/catalog/refresh  – force catalog refresh
GET    /api/v1/admin/plugins                  – list installed plugins
POST   /api/v1/admin/plugins                  – install a plugin
GET    /api/v1/admin/plugins/{id}             – get a single plugin
PATCH  /api/v1/admin/plugins/{id}/config      – update plugin config
POST   /api/v1/admin/plugins/{id}/enable      – enable plugin
POST   /api/v1/admin/plugins/{id}/disable     – disable plugin
DELETE /api/v1/admin/plugins/{id}             – remove plugin
GET    /api/v1/admin/plugins/{id}/status      – live container/gRPC status
POST   /api/v1/admin/plugins/{id}/set-active  – set as active IDP

Authenticated (any role):

GET    /api/v1/plugins/catalog  – marketplace catalog; admins see all, others see type=ui only

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthHandler

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

AuthHandler owns all platform-level auth endpoints. Plugins act as IDP adapters — the platform standardizes the HTTP surface.

func NewAuthHandler

func NewAuthHandler(manager ports.PluginManager, logger *slog.Logger) *AuthHandler

func (*AuthHandler) RegisterPublicRoutes

func (h *AuthHandler) RegisterPublicRoutes(r chi.Router)

RegisterPublicRoutes attaches unauthenticated auth endpoints.

func (*AuthHandler) RegisterRoutes

func (h *AuthHandler) RegisterRoutes(r chi.Router)

RegisterRoutes attaches authenticated auth endpoints.

type Handler

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

Handler is the plugin marketplace HTTP handler.

func NewHandler

func NewHandler(
	manager ports.PluginManager,
	registry ports.PluginRegistry,
	logger *slog.Logger,
) *Handler

NewHandler wires the marketplace handler.

func (*Handler) RegisterPublicRoutes added in v0.1.1

func (h *Handler) RegisterPublicRoutes(r chi.Router)

RegisterPublicRoutes attaches authenticated-but-not-admin plugin routes.

func (*Handler) RegisterRoutes

func (h *Handler) RegisterRoutes(r chi.Router)

RegisterRoutes attaches all plugin routes to the provided router.

type SetupHandler

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

SetupHandler exposes unauthenticated plugin installation endpoints for the initial platform setup (before any IDP is configured). All endpoints return 403 once an IDP is active.

func NewSetupHandler

func NewSetupHandler(
	manager ports.PluginManager,
	registry ports.PluginRegistry,
	logger *slog.Logger,
) *SetupHandler

func (*SetupHandler) RegisterPublicRoutes

func (h *SetupHandler) RegisterPublicRoutes(r chi.Router)

RegisterPublicRoutes attaches setup routes — no auth required.

Jump to

Keyboard shortcuts

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