api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package api holds the admin HTTP handlers under /api/admin: the bundles, concepts, tokens, statistics, the query log and the audit log. Every route needs a bearer token with the admin scope. A token restricted to some bundles sees only those bundles, their concepts and episodes; the routes that show the whole installation (statistics, queries, audit, tokens, creating bundles) need an unrestricted admin token.

Index

Constants

View Source
const Prefix = "/api/admin"

Prefix is where the admin API is mounted.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler holds the admin handlers.

func NewHandler

func NewHandler(svc *service.Service) *Handler

NewHandler creates the handler.

func (*Handler) Register

func (h *Handler) Register(mux *http.ServeMux)

Register mounts the admin routes on the mux, each behind the admin scope.

Jump to

Keyboard shortcuts

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