Documentation
¶
Index ¶
- Variables
- func Commands(c *typbuildtool.Context) []*cli.Command
- func Connect(cfg *Config) (db *sql.DB, err error)
- func Disconnect(db *sql.DB) (err error)
- func DockerRecipeV3() *typdocker.Recipe
- func Module() *typapp.Module
- func Ping(db *sql.DB) (err error)
- func Utility() typbuildtool.Utility
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultConfigName is default lookup key for postgres configuration DefaultConfigName = "PG" // DefaultDBName is default value for dbName DefaultDBName = "sample" // DefaultUser is default value for user DefaultUser = "postgres" // DefaultPassword is default value for password DefaultPassword = "pgpass" // DefaultHost is default value for host DefaultHost = "localhost" // DefaultPort is default value for port DefaultPort = 5432 // DefaultConfig for postgres DefaultConfig = &Config{ DBName: DefaultDBName, User: DefaultUser, Password: DefaultPassword, Host: DefaultHost, Port: DefaultPort, } )
View Source
var ( // DefaultDockerImage is default docker image for postgres DefaultDockerImage = "postgres" // DefaultDockerName is default docker name for postgres DefaultDockerName = "postgres" )
View Source
var ( // DefaultMigrationSource is default migration source for postgres DefaultMigrationSource = "scripts/db/migration" // DefaultSeedSource is default seed source for postgres DefaultSeedSource = "scripts/db/seed" )
Functions ¶
func Commands ¶ added in v0.8.25
func Commands(c *typbuildtool.Context) []*cli.Command
Commands of module
func Disconnect ¶ added in v0.8.25
Disconnect to postgres server
func DockerRecipeV3 ¶ added in v0.8.25
DockerRecipeV3 return recipe for docker-compose v3
func Utility ¶ added in v0.8.25
func Utility() typbuildtool.Utility
Utility return new instance of PostgresUtility
Types ¶
Click to show internal directories.
Click to hide internal directories.