httphandler

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package httphandler provides REST API endpoints for PostgreSQL management operations.

Register all handlers with an http.ServeMux:

httphandler.RegisterBackendHandlers(mux, "/api/v1", mgr)

This registers endpoints for roles, databases, schemas, objects, tablespaces, extensions, connections, settings, statements, replication slots, and Prometheus metrics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBackendHandlers added in v1.0.13

func RegisterBackendHandlers(router *http.ServeMux, prefix string, manager *manager.Manager)

func RegisterConnectionHandlers

func RegisterConnectionHandlers(router *http.ServeMux, prefix string, manager *manager.Manager)

RegisterConnectionHandlers registers HTTP handlers for connection operations on the provided router with the given path prefix. The manager must be non-nil.

func RegisterDatabaseHandlers

func RegisterDatabaseHandlers(router *http.ServeMux, prefix string, manager *manager.Manager)

RegisterDatabaseHandlers registers HTTP handlers for database CRUD operations on the provided router with the given path prefix. The manager must be non-nil.

func RegisterExtensionHandlers

func RegisterExtensionHandlers(router *http.ServeMux, prefix string, manager *manager.Manager)

RegisterExtensionHandlers registers HTTP handlers for extension CRUD operations on the provided router with the given path prefix. The manager must be non-nil.

func RegisterFrontendHandler added in v1.0.13

func RegisterFrontendHandler(router *http.ServeMux, prefix string)

RegisterFrontendHandler registers a fallback handler when frontend is not included

func RegisterMetricsHandler

func RegisterMetricsHandler(router *http.ServeMux, prefix string, manager *manager.Manager)

RegisterMetricsHandler registers a HTTP handler for prometheus metrics on the provided router with the given path prefix. The manager must be non-nil.

func RegisterObjectHandlers

func RegisterObjectHandlers(router *http.ServeMux, prefix string, manager *manager.Manager)

RegisterObjectHandlers registers HTTP handlers for object listing and retrieval on the provided router with the given path prefix. The manager must be non-nil.

func RegisterReplicationSlotHandlers

func RegisterReplicationSlotHandlers(router *http.ServeMux, prefix string, manager *manager.Manager)

RegisterReplicationSlotHandlers registers HTTP handlers for replication slot CRUD operations on the provided router with the given path prefix.

func RegisterRoleHandlers

func RegisterRoleHandlers(router *http.ServeMux, prefix string, manager *manager.Manager)

RegisterRoleHandlers registers HTTP handlers for role CRUD operations on the provided router with the given path prefix. The manager must be non-nil.

func RegisterSchemaHandlers

func RegisterSchemaHandlers(router *http.ServeMux, prefix string, manager *manager.Manager)

RegisterSchemaHandlers registers HTTP handlers for schema CRUD operations on the provided router with the given path prefix. The manager must be non-nil.

func RegisterSettingHandlers

func RegisterSettingHandlers(router *http.ServeMux, prefix string, manager *manager.Manager)

RegisterSettingHandlers registers HTTP handlers for server setting operations on the provided router with the given path prefix. The manager must be non-nil.

func RegisterStatementHandlers

func RegisterStatementHandlers(router *http.ServeMux, prefix string, manager *manager.Manager)

RegisterStatementHandlers registers HTTP handlers for pg_stat_statements operations on the provided router with the given path prefix. The manager must be non-nil.

func RegisterTablespaceHandlers

func RegisterTablespaceHandlers(router *http.ServeMux, prefix string, manager *manager.Manager)

RegisterTablespaceHandlers registers HTTP handlers for tablespace CRUD operations on the provided router with the given path prefix. The manager must be non-nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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