Documentation
¶
Index ¶
- func GetMpgConnectParams(ctx context.Context, localProxyPort string, username string, clusterID string, ...) (*mpgv2.ManagedCluster, *proxy.ConnectParams, ...)
- func GetMpgProxyParams(ctx context.Context, localProxyPort string, clusterID string, ...) (*mpgv2.ManagedCluster, *proxy.ConnectParams, error)
- func RunAttach(ctx context.Context, clusterID string) error
- func RunBackupCreate(ctx context.Context, clusterID string) error
- func RunBackupList(ctx context.Context, clusterID string) error
- func RunConnect(ctx context.Context, clusterID string, resolvedOrgSlug string, ...) (err error)
- func RunCreate(ctx context.Context, orgRawSlug string, params *CreateClusterParams, ...) error
- func RunDatabasesCreate(ctx context.Context, clusterID string) error
- func RunDatabasesList(ctx context.Context, clusterID string) error
- func RunDestroy(ctx context.Context, clusterId string) error
- func RunDetach(ctx context.Context, clusterID string, appName string) error
- func RunExtensionsDisable(ctx context.Context, clusterID, database, name string, force bool) error
- func RunExtensionsEnable(ctx context.Context, clusterID, database, name, schema string, ...) error
- func RunExtensionsList(ctx context.Context, clusterID, database string) error
- func RunProxy(ctx context.Context, clusterID string, resolvedOrgSlug string, ...) error
- func RunRestore(ctx context.Context, clusterID string, backupID string, name string, ...) error
- func RunStatus(ctx context.Context, clusterID string) error
- func RunUsersCreate(ctx context.Context, clusterID string) error
- func RunUsersDelete(ctx context.Context, clusterID string) error
- func RunUsersList(ctx context.Context, clusterID string) error
- func RunUsersSetRole(ctx context.Context, clusterID string) error
- type CreateClusterParams
- type CreatePlanDisplay
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMpgConnectParams ¶ added in v0.4.101
func GetMpgConnectParams( ctx context.Context, localProxyPort string, username string, clusterID string, resolvedOrgSlug string, ) (*mpgv2.ManagedCluster, *proxy.ConnectParams, *mpgv2.GetClusterCredentialsResponse, error)
GetMpgConnectParams resolves credentials and proxy parameters.
func GetMpgProxyParams ¶
func GetMpgProxyParams( ctx context.Context, localProxyPort string, clusterID string, resolvedOrgSlug string, ) (*mpgv2.ManagedCluster, *proxy.ConnectParams, error)
GetMpgProxyParams builds proxy connection parameters for a given cluster without requiring database credentials. resolvedOrgSlug should already be the aliased slug suitable for wireguard tunnels.
func RunConnect ¶
func RunCreate ¶
func RunCreate(ctx context.Context, orgRawSlug string, params *CreateClusterParams, planDisplay *CreatePlanDisplay) error
RunCreate provisions a new Managed Postgres cluster via the public Machines API (flaps) and prints the connection string once ready.
Unlike the other migrated MPG commands, this one deliberately does NOT fall back to the private client on a failed or ambiguous create call: retrying a mutating create against a different backend risks double-provisioning a cluster. Errors from CreateManagedPostgresCluster are propagated to the caller as-is.
orgRawSlug is accepted for API parity with the previous implementation; region discovery is now driven by the non-org-scoped Machines API region list (mpgutil.AvailableRegions).
func RunExtensionsDisable ¶ added in v0.4.68
func RunExtensionsEnable ¶ added in v0.4.68
func RunExtensionsList ¶ added in v0.4.68
func RunRestore ¶
func RunStatus ¶
RunStatus shows cluster status.
Human output prefers the public Machines API; the legacy MPGv2 client is used only as a fallback when the public API returns a classified 404. Other public API errors are propagated without falling back.
--json skips the public API because the legacy response envelope carries private credentials the public API does not expose; reusing the legacy client preserves the existing JSON shape byte-for-byte.