Documentation ¶
Index ¶
- Constants
- Variables
- func ConnectDatabase(c Connection) *sql.DB
- func EnsureMigrationTable(db *sql.DB)
- func EnsureSchema(db *sql.DB)
- func Get(project string) (string, error)
- func GetCurrentTimestamp() string
- func GetSupabaseToken(fs afero.Fs) (string, error)
- func Green(str string) string
- func MkdirIfNotExist(fs afero.Fs, path string) error
- func ParseConnectionString(connectionString string) *dburl.URL
- func ParseCount(count string) int
- func Red(str string) string
- func ResetMigrationTable(db *sql.DB)
- func ResetPublicSchema(db *sql.DB)
- func Test(db *sql.DB)
- func UseDBEnvironmentVariables(cmd *cobra.Command)
- func UseDBFlags(cmd *cobra.Command)
- func Yellow(str string) string
- type Connection
- type ConnectionEnv
Constants ¶
View Source
const AccessTokenKey = "access-token"
View Source
const SupagrateDirectory = "supagrate"
Variables ¶
View Source
var (
ErrMissingToken = errors.New("Access token not provided. Supply an access token by running " + Green("supabase login") + " or setting the SUPABASE_ACCESS_TOKEN environment variable.")
)
View Source
var Version string
Functions ¶
func ConnectDatabase ¶
func ConnectDatabase(c Connection) *sql.DB
func EnsureMigrationTable ¶
func EnsureSchema ¶
func GetCurrentTimestamp ¶
func GetCurrentTimestamp() string
func ParseConnectionString ¶
func ParseCount ¶
func ResetMigrationTable ¶
func ResetPublicSchema ¶
func UseDBFlags ¶
Types ¶
type Connection ¶
Local Supabase: postgresql://postgres:postgres@localhost:54322/postgres
func (Connection) ConnectionString ¶
func (c Connection) ConnectionString() string
func (Connection) URL ¶
func (c Connection) URL() *dburl.URL
type ConnectionEnv ¶
Click to show internal directories.
Click to hide internal directories.