tablesapi

package
v1.169.4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 10 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 tablesapi is the admin REST surface over table registrations (#2136): every registration on the platform, and a connection's scratch schema reconciled against them -- tables no registration holds, registrations whose table is gone, tables reading somewhere their registration does not say -- with the repairs the platform can prove are its own to make.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

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

Register mounts the routes, each behind wrap, the admin API's authentication.

Types

type Config

type Config struct {
	// Registrations lists. Nil mounts nothing.
	Registrations Registrations
	// Reconciler reconciles. Nil mounts the listing alone.
	Reconciler Reconciler
	// Caller is the acting administrator, as a repair's audit event records
	// them.
	Caller func(*http.Request) tableregister.Caller
}

Config carries what the routes act through.

type Reconciler

type Reconciler interface {
	Reconcile(ctx context.Context, connection string) (*tablereconcile.Reconciliation, error)
	Repair(ctx context.Context, caller tableregister.Caller, connection string, items []tablereconcile.RepairItem) ([]tablereconcile.RepairOutcome, error)
}

Reconciler reconciles and repairs a connection. tablereconcile.Reconciler satisfies it.

type RegistrationList

type RegistrationList struct {
	Registrations []tableregister.Registration `json:"registrations"`
	Total         int                          `json:"total"`
}

RegistrationList is a page of registrations and the total the filter matched.

type Registrations

type Registrations interface {
	List(ctx context.Context, f tableregister.Filter) ([]tableregister.Registration, int, error)
}

Registrations lists registrations. tableregister.Registrar satisfies it.

type RepairRequest

type RepairRequest struct {
	Connection string                      `json:"connection"`
	Repair     []tablereconcile.RepairItem `json:"repair"`
}

RepairRequest is the body of a repair.

type RepairResponse

type RepairResponse struct {
	Outcomes []tablereconcile.RepairOutcome `json:"outcomes"`
}

RepairResponse is what each repair did.

Jump to

Keyboard shortcuts

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