Documentation
¶
Index ¶
Constants ¶
View Source
const ( HOST = "localhost" PORT = "5432" )
NOTE HOST and PORT, are use as default values, but they could be overwritten per build environment with LDFLAGS if omit in .env file
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PostgresEnvironment ¶
type PostgresEnvironment struct {
// contains filtered or unexported fields
}
func NewEnvironment ¶
func NewEnvironment() *PostgresEnvironment
func (*PostgresEnvironment) Connect ¶
func (env *PostgresEnvironment) Connect() *bun.DB
func (*PostgresEnvironment) GetEnvDBName ¶
func (env *PostgresEnvironment) GetEnvDBName() string
func (*PostgresEnvironment) GetEnvURI ¶
func (env *PostgresEnvironment) GetEnvURI() string
GetEnvURI escapes credentials via net/url; sslmode=disable since the local docker Postgres has no TLS.
func (*PostgresEnvironment) ReadEnv ¶
func (env *PostgresEnvironment) ReadEnv()
Click to show internal directories.
Click to hide internal directories.