Documentation
¶
Index ¶
- Variables
- func PGURIFromEnvironment(database string) (string, error)
- type Config
- func (c *Config) ExternalPGRootCertPath() string
- func (c *Config) GetPGConnInfoForSuperuserWithRole(role string) (*PGConnInfo, error)
- func (c *Config) GetPGConnInfoURI(user string, opts ...ConnInfoOpts) (*PGConnInfo, error)
- func (c *Config) GetPGURI(dbname string) (string, error)
- func (c *Config) GetPGURIForUser(dbname string, user string) (string, error)
- func (c *Config) IsExternalPG() bool
- func (c *Config) LoadTemplates(funcs template.FuncMap) (*template.Template, error)
- func (c *Config) PGServiceUser() (string, error)
- func (c *Config) PGSuperUser() (string, error)
- func (c *Config) TemplatesPath() string
- type ConnInfoOpts
- type PGConnInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoPlatformEnvironment = errors.New("Platform environment not correctly configured." +
" Both A2_SVC_NAME and A2_SVC_PATH must be set in the environment")
Functions ¶
func PGURIFromEnvironment ¶
Types ¶
type Config ¶
func ConfigFromEnvironment ¶
func (*Config) ExternalPGRootCertPath ¶
func (*Config) GetPGConnInfoForSuperuserWithRole ¶
func (c *Config) GetPGConnInfoForSuperuserWithRole(role string) (*PGConnInfo, error)
func (*Config) GetPGConnInfoURI ¶
func (c *Config) GetPGConnInfoURI(user string, opts ...ConnInfoOpts) (*PGConnInfo, error)
func (*Config) GetPGURIForUser ¶
func (*Config) IsExternalPG ¶
func (*Config) LoadTemplates ¶
func (*Config) PGServiceUser ¶
func (*Config) PGSuperUser ¶
func (*Config) TemplatesPath ¶
type ConnInfoOpts ¶
type ConnInfoOpts func(c *connInfoConfig)
func WithPGRole ¶
func WithPGRole(role string) ConnInfoOpts
type PGConnInfo ¶
type PGConnInfo struct {
// contains filtered or unexported fields
}
func (*PGConnInfo) ConnURI ¶
func (c *PGConnInfo) ConnURI(dbname string) string
func (*PGConnInfo) PsqlCmdOptions ¶
func (c *PGConnInfo) PsqlCmdOptions() []command.Opt
func (*PGConnInfo) String ¶
func (c *PGConnInfo) String() string
Directories
¶
Path | Synopsis |
---|---|
Package command is a wrapper for os/exec that provides a mock-able interface to make testing easier.
|
Package command is a wrapper for os/exec that provides a mock-able interface to make testing easier. |
Package platform encapsulates platform-specific behavior.
|
Package platform encapsulates platform-specific behavior. |
Click to show internal directories.
Click to hide internal directories.