Documentation
¶
Index ¶
- Constants
- func Configuration(s *Setting) *typgo.Configuration
- func Connect(cfg *Config) (db *sql.DB, err error)
- func Disconnect(db *sql.DB) (err error)
- func DockerRecipeV3(s *Setting) *typdocker.Recipe
- func GetConfigName(s *Setting) string
- func GetDBName(s *Setting) string
- func GetDockerImage(s *Setting) string
- func GetDockerName(s *Setting) string
- func GetHost(s *Setting) string
- func GetMigrationSrc(s *Setting) string
- func GetPassword(s *Setting) string
- func GetPort(s *Setting) int
- func GetSeedSrc(s *Setting) string
- func GetUser(s *Setting) string
- func Utility(s *Setting) typgo.Utility
- type Config
- type Setting
Constants ¶
View Source
const ( DefaultDockerImage = "postgres" DefaultDockerName = "postgres" DefaultConfigName = "PG" DefaultDBName = "sample" DefaultUser = "postgres" DefaultPassword = "pgpass" DefaultHost = "localhost" DefaultPort = 5432 DefaultMigrationSrc = "scripts/db/migration" DefaultSeedSrc = "scripts/db/seed" )
Variables ¶
This section is empty.
Functions ¶
func Configuration ¶ added in v0.8.25
func Configuration(s *Setting) *typgo.Configuration
Configuration of postgres
func Disconnect ¶ added in v0.8.25
Disconnect from postgres server
func DockerRecipeV3 ¶ added in v0.8.25
DockerRecipeV3 of postgres
func GetConfigName ¶ added in v0.8.28
GetConfigName from setting
func GetDockerImage ¶ added in v0.8.28
GetDockerImage from setting
func GetDockerName ¶ added in v0.8.28
GetDockerName from setting
func GetMigrationSrc ¶ added in v0.8.28
GetMigrationSrc from setting if available or the default value
func GetSeedSrc ¶ added in v0.8.28
GetSeedSrc from setting if available or the default value
Types ¶
Click to show internal directories.
Click to hide internal directories.