memoryapi

package
v1.137.0 Latest Latest
Warning

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

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

Documentation

Overview

Package memoryapi serves /api/v1/admin/memory/records: every memory record on the deployment, whoever wrote it (#1926).

The portal's /api/v1/portal/memory/records lists only the caller's own records, so without this route an administrator could not see, count or audit the memory on their deployment, while insights and changesets each had an admin list. It takes the portal route's filters and its limit/offset paging, plus created_by to narrow to one author.

It is a decomposition seam of pkg/admin (which sits at its package size budget); the parent registers it on the admin mux, so every route here is already behind the admin persona gate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

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

Register mounts the admin memory route on mux. It is read-only.

Types

type Config

type Config struct {
	Records Lister
}

Config carries what the route needs. A nil Records leaves it unregistered: a deployment without a memory store has nothing to list.

type Lister

type Lister interface {
	List(ctx context.Context, filter memory.Filter) ([]memory.Record, int, error)
}

Lister reads memory records by filter. Satisfied by memory.Store.

Jump to

Keyboard shortcuts

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