pginspect

module
v0.0.0-...-34a1f11 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT

README

pginspect

CI Go Version License

lightweight Go library for inspecting pgSQL database in a browser.
where it provides a simple UI to view schemas, tables, and table data via REST endpoints

Installation

go get github.com/epxhsid/pginspect
go mod tidy # needed to retrieve other dependencies
How to use
  1. Configuration example
eng, err := engine.NewConn(context.Background(), &engine.Options{
		Addr:     os.Getenv("DATABASE_URL"),
		MaxRows:  100,
		ReadOnly: true,
})
  1. Mount endpoint example
mux := http.NewServeMux()
httpui.Mount(mux, "/__db", eng)
  1. Access it via your defined endpoint, in this case:
http://ADDRESS:PORT/__db

Note

Note: engine.NewConn creates its own connection pool internally.
If you already have a *pgxpool.Pool, you can still use it by passing its connection string; this library will open a separate pool without affecting your existing connections.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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