apiroutesapi

package
v1.129.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package apiroutesapi serves /api/v1/admin/api-route-connections: the operations a persona's API route rules can be written against.

It is the authoring counterpart to the two browse surfaces #1478 shipped. Those answer what a reader reaches and are route-policy filtered; this one answers what exists, filtered by nothing. The difference matters here and nowhere else: an operator writing rules for one persona is not that persona, and a listing narrowed by the operator's own rules would hide exactly the operations they are trying to grant back.

A decomposition seam of pkg/admin, which is at its package size budget; the parent registers it on the admin mux alongside the persona routes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(mux *http.ServeMux, cfg Config)

Register mounts the route. A deployment that cannot enumerate its toolkits registers nothing rather than answering "there are no API connections", which the editor would render as a persona having nothing to be granted.

Types

type Config

type Config struct {
	// Toolkits is the live registry, read per request so a connection added
	// through the admin API appears without a restart. Nil leaves the route
	// unregistered.
	Toolkits ToolkitLister
}

Config wires the surface to the registry it reads.

type ToolkitLister

type ToolkitLister interface {
	All() []registry.Toolkit
}

ToolkitLister is the live toolkit registry, narrowed to the enumeration this surface needs. Satisfied by *registry.Registry.

Jump to

Keyboard shortcuts

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