cmd

package
v0.5.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: PostgreSQL Imports: 32 Imported by: 0

Documentation

Overview

Package cmd wires the pgEdge Managed command tree: the module root, its persistent flags, and the authenticated API client shared by every resource command.

Index

Constants

View Source
const (
	ExitOK       = conn.ExitOK
	ExitGeneral  = conn.ExitGeneral
	ExitUsage    = conn.ExitUsage
	ExitTimeout  = conn.ExitTimeout
	ExitNotFound = conn.ExitNotFound
	ExitAuth     = conn.ExitAuth
)

Exit codes and the error type belong to the starfleet conn package, whose connection managed shares. They are aliased here as byoc does; internal/starfleet/byoc/cmd/client.go says why each tree keeps its own package-local names.

Variables

This section is empty.

Functions

func NewBackupCmd

func NewBackupCmd(rt *module.Runtime) *cobra.Command

NewBackupCmd builds the `pgedge starfleet managed backup` command group. There is no delete verb: retention belongs to the platform, and the CNPG Backup CR is the source of truth the API only mirrors.

func NewClientIPCmd

func NewClientIPCmd(rt *module.Runtime) *cobra.Command

NewClientIPCmd builds `pgedge starfleet managed client-ip`, a leaf rather than a resource: there is nothing to list, create or delete.

func NewDatabaseAllowlistCmd

func NewDatabaseAllowlistCmd(rt *module.Runtime) *cobra.Command

NewDatabaseAllowlistCmd builds `pgedge starfleet managed database allowlist`, the source-address rules for one endpoint of a managed database. The API stores the list as a field and replaces it whole on every write; these verbs read, splice and write it back so a caller never retypes the list.

func NewDatabaseBranchCmd

func NewDatabaseBranchCmd(rt *module.Runtime) *cobra.Command

NewDatabaseBranchCmd builds `pgedge starfleet managed database branch`, a copy-on-write branch of a managed database.

func NewDatabaseCmd

func NewDatabaseCmd(rt *module.Runtime) *cobra.Command

NewDatabaseCmd builds the `pgedge starfleet managed database` command group. The plural "databases" is kept as a plural alias (unlisted in help).

func NewDatabaseMCPCmd

func NewDatabaseMCPCmd(rt *module.Runtime) *cobra.Command

NewDatabaseMCPCmd builds the `pgedge starfleet managed database mcp` command group, which manages the MCP server deployed on a managed database.

func NewDatabasePostgRESTCmd

func NewDatabasePostgRESTCmd(rt *module.Runtime) *cobra.Command

NewDatabasePostgRESTCmd builds the `pgedge starfleet managed database postgrest` command group, which manages the PostgREST API deployed on a managed database.

func NewDatabaseRAGCmd

func NewDatabaseRAGCmd(rt *module.Runtime) *cobra.Command

NewDatabaseRAGCmd builds the `pgedge starfleet managed database rag` command group, which manages the RAG server deployed on a managed database.

func NewDatabaseServiceCmd

func NewDatabaseServiceCmd(rt *module.Runtime) *cobra.Command

NewDatabaseServiceCmd builds the `pgedge starfleet managed database service` command group, which manages the services deployed alongside a managed database.

func NewManagedCmd

func NewManagedCmd(rt *module.Runtime) *cobra.Command

NewManagedCmd builds the `pgedge starfleet managed` command tree: the sub-tree root and its resource subcommands.

managed declares no connection flags of its own. The starfleet root owns the connection flags (--api-url, --client-id, --client-secret and the per-request --timeout) for the whole product, and every leaf here reads them off its inherited flag set (connFlags in client.go).

managed has no doctor of its own either: it owns no connection. The Starfleet connection it borrows is diagnosed by `pgedge starfleet doctor`, and the install itself by `pgedge doctor`.

func NewPgVersionCmd

func NewPgVersionCmd(rt *module.Runtime) *cobra.Command

NewPgVersionCmd builds the `pgedge starfleet managed pg-version` command group.

func NewRegionCmd

func NewRegionCmd(rt *module.Runtime) *cobra.Command

NewRegionCmd builds the `pgedge starfleet managed region` command group.

func NewSizeCmd

func NewSizeCmd(rt *module.Runtime) *cobra.Command

NewSizeCmd builds the `pgedge starfleet managed size` command group.

func NewTaskCmd

func NewTaskCmd(rt *module.Runtime) *cobra.Command

NewTaskCmd builds the `pgedge starfleet managed task` command group, which inspects the asynchronous tasks the platform spawns for mutations. The plural "tasks" is kept as a plural alias (unlisted in help).

The API serves the same task resource under both product prefixes, so this is byoc's task group over `/managed/v1/tasks`. Tasks are scoped per product: a managed database's tasks appear here, not under `pgedge starfleet byoc task`.

Types

type ExitError

type ExitError = conn.ExitError

ExitError is conn.ExitError. See the note on the exit codes above.

Jump to

Keyboard shortcuts

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