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
- func NewBackupCmd(rt *module.Runtime) *cobra.Command
- func NewClientIPCmd(rt *module.Runtime) *cobra.Command
- func NewDatabaseAllowlistCmd(rt *module.Runtime) *cobra.Command
- func NewDatabaseBranchCmd(rt *module.Runtime) *cobra.Command
- func NewDatabaseCmd(rt *module.Runtime) *cobra.Command
- func NewDatabaseMCPCmd(rt *module.Runtime) *cobra.Command
- func NewDatabasePostgRESTCmd(rt *module.Runtime) *cobra.Command
- func NewDatabaseRAGCmd(rt *module.Runtime) *cobra.Command
- func NewDatabaseServiceCmd(rt *module.Runtime) *cobra.Command
- func NewManagedCmd(rt *module.Runtime) *cobra.Command
- func NewPgVersionCmd(rt *module.Runtime) *cobra.Command
- func NewRegionCmd(rt *module.Runtime) *cobra.Command
- func NewSizeCmd(rt *module.Runtime) *cobra.Command
- func NewTaskCmd(rt *module.Runtime) *cobra.Command
- type ExitError
Constants ¶
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 ¶
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 ¶
NewClientIPCmd builds `pgedge starfleet managed client-ip`, a leaf rather than a resource: there is nothing to list, create or delete.
func NewDatabaseAllowlistCmd ¶
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 ¶
NewDatabaseBranchCmd builds `pgedge starfleet managed database branch`, a copy-on-write branch of a managed database.
func NewDatabaseCmd ¶
NewDatabaseCmd builds the `pgedge starfleet managed database` command group. The plural "databases" is kept as a plural alias (unlisted in help).
func NewDatabaseMCPCmd ¶
NewDatabaseMCPCmd builds the `pgedge starfleet managed database mcp` command group, which manages the MCP server deployed on a managed database.
func NewDatabasePostgRESTCmd ¶
NewDatabasePostgRESTCmd builds the `pgedge starfleet managed database postgrest` command group, which manages the PostgREST API deployed on a managed database.
func NewDatabaseRAGCmd ¶
NewDatabaseRAGCmd builds the `pgedge starfleet managed database rag` command group, which manages the RAG server deployed on a managed database.
func NewDatabaseServiceCmd ¶
NewDatabaseServiceCmd builds the `pgedge starfleet managed database service` command group, which manages the services deployed alongside a managed database.
func NewManagedCmd ¶
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 ¶
NewPgVersionCmd builds the `pgedge starfleet managed pg-version` command group.
func NewRegionCmd ¶
NewRegionCmd builds the `pgedge starfleet managed region` command group.
func NewSizeCmd ¶
NewSizeCmd builds the `pgedge starfleet managed size` command group.
func NewTaskCmd ¶
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).
saas 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 ¶
Source Files
¶
- allowlist.go
- backup.go
- catalog.go
- client.go
- client_ip.go
- database.go
- database_allowlist.go
- database_branch.go
- database_branch_logs.go
- database_branch_metrics.go
- database_connection_string.go
- database_inspect.go
- database_logs.go
- database_mcp.go
- database_metrics.go
- database_postgrest.go
- database_rag.go
- database_role.go
- database_service.go
- database_size.go
- helpers.go
- paging.go
- pgversion.go
- region.go
- root.go
- size.go
- task.go
- wait.go