{"modulePath":"github.com/superfly/flyctl","version":"v0.5.27","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package postgres\n\n## Variables\n\n```go\nvar (\n\tDuration10s, _      = time.ParseDuration(\"10s\")\n\tDuration15s, _      = time.ParseDuration(\"15s\")\n\tCheckPathConnection = \"/flycheck/connection\"\n\tCheckPathRole       = \"/flycheck/role\"\n\tCheckPathVm         = \"/flycheck/vm\"\n)\n```\n\n## Functions\n\n```go\nfunc AttachCluster(ctx context.Context, params AttachParams) error\n```\nAttachCluster is mean't to be called from an external package.\n\n```go\nfunc CreateCluster(ctx context.Context, org *uiex.Organization, region *fly.Region, params *ClusterParams) (err error)\n```\nCreateCluster creates a Postgres cluster with an optional name. The name will be prompted for if not supplied.\n\n```go\nfunc ExecOnLeader(ctx context.Context, client flapsutil.FlapsClient, appName, command string) error\n```\nRuns a command on the leader of the named cluster.\n\n```go\nfunc ExecOnMachine(ctx context.Context, client flapsutil.FlapsClient, appName, machineId, command string) error\n```\nRuns a command on the specified machine ID in the named app.\n\n```go\nfunc IsFlex(machine *fly.Machine) bool\n```\n\n```go\nfunc MachineVMSizes() []fly.VMSize\n```\nmachineVMSizes represents the available VM configurations for Machines.\n\n```go\nfunc New() *cobra.Command\n```\n\n```go\nfunc UnregisterMember(ctx context.Context, app *flaps.App, org *uiex.Organization, machine *fly.Machine) error\n```\n\n## Types\n\n```go\ntype AttachParams struct {\n\tDbName       string\n\tAppName      string\n\tPgAppName    string\n\tDbUser       string\n\tVariableName string\n\tSuperUser    bool\n\tForce        bool\n}\n```\n\n```go\ntype ClusterParams struct {\n\tPostgresConfiguration\n\tPassword    string\n\tSnapshotID  string\n\tDetach      bool\n\tManager     string\n\tForkFrom    string\n\tAutostart   bool\n\tScaleToZero *bool\n\t// Network is the custom private network to create the cluster on. Empty\n\t// means the organization's default network.\n\tNetwork string\n}\n```\n\n```go\ntype PostgresConfiguration struct {\n\tName               string\n\tDescription        string\n\tImageRef           string\n\tInitialClusterSize int\n\tVMSize             string\n\tMemoryMb           int\n\tDiskGb             int\n}\n```\n\n","path":"github.com/superfly/flyctl/internal/command/postgres","name":"postgres","synopsis":"","isRedistributable":true}
