Documentation ¶
Index ¶
- Constants
- Variables
- func AssertDockerIsRunning() error
- func AssertPortIsAvailable(port string) error
- func AssertSupabaseStartIsRunning()
- func DockerExec(ctx context.Context, container string, cmd []string) (io.Reader, error)
- func DockerRemoveAll()
- func DockerRun(ctx context.Context, name string, config *container.Config, ...) (io.Reader, error)
- func GetCurrentBranch() (*string, error)
- func GetCurrentTimestamp() string
- func GetGitRoot() (*string, error)
- func IsSchemaIgnoredFromDump(schema string) bool
- func LoadConfig()
- func ProcessDiffOutput(p *tea.Program, out io.Reader) ([]byte, error)
- func ProcessPsqlOutput(out io.Reader, p *tea.Program) error
- func ProcessPullOutput(out io.ReadCloser, p *tea.Program) error
- type DiffEntry
- type ProgressMsg
- type PsqlMsg
- type StatusMsg
Constants ¶
View Source
const ( ShadowDbName = "supabase_shadow" PgbouncerImage = "edoburu/pgbouncer:1.15.0" KongImage = "library/kong:2.1" GotrueImage = "supabase/gotrue:v2.1.8" RealtimeImage = "supabase/realtime:v0.15.0" PostgrestImage = "postgrest/postgrest:v8.0.0" StorageImage = "supabase/storage-api:v0.9.3" DifferImage = "supabase/pgadmin-schema-diff:cli-0.0.3" PgmetaImage = "supabase/postgres-meta:v0.26.1" )
Variables ¶
View Source
var ( // pg_dumpall --globals-only --no-role-passwords --dbname $DB_URL \ // | sed '/^CREATE ROLE postgres;/d' \ // | sed '/^ALTER ROLE postgres WITH /d' \ // | sed "/^ALTER ROLE .* WITH .* LOGIN /s/;$/ PASSWORD 'postgres';/" //go:embed templates/fallback_globals_sql FallbackGlobalsSql []byte Docker = func() *client.Client { docker, err := client.NewClientWithOpts(client.FromEnv) if err != nil { fmt.Fprintln(os.Stderr, "❌ Failed to initialize Docker client.") os.Exit(1) } return docker }() ApiPort string DbPort string PgmetaPort string DbImage string ProjectId string NetId string DbId string PgbouncerId string KongId string GotrueId string RealtimeId string RestId string StorageId string DifferId string PgmetaId string )
Functions ¶
func AssertDockerIsRunning ¶
func AssertDockerIsRunning() error
func AssertPortIsAvailable ¶ added in v0.7.0
func AssertSupabaseStartIsRunning ¶
func AssertSupabaseStartIsRunning()
func DockerExec ¶
func DockerRemoveAll ¶
func DockerRemoveAll()
func GetCurrentBranch ¶
func GetCurrentTimestamp ¶
func GetCurrentTimestamp() string
func GetGitRoot ¶ added in v0.8.0
func IsSchemaIgnoredFromDump ¶ added in v0.9.0
func LoadConfig ¶
func LoadConfig()
func ProcessDiffOutput ¶ added in v0.9.0
func ProcessPsqlOutput ¶ added in v0.10.0
func ProcessPullOutput ¶ added in v0.9.0
func ProcessPullOutput(out io.ReadCloser, p *tea.Program) error
Types ¶
type DiffEntry ¶
type DiffEntry struct { Type string `json:"type"` Title string `json:"title"` Status string `json:"status"` SourceDdl string `json:"source_ddl"` TargetDdl string `json:"target_ddl"` DiffDdl string `json:"diff_ddl"` GroupName string `json:"group_name"` SourceSchemaName *string `json:"source_schema_name"` }
type ProgressMsg ¶ added in v0.9.0
type ProgressMsg *float64
Click to show internal directories.
Click to hide internal directories.