config

package
v0.0.0-...-43a96cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

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

func PGURIFromEnvironment(database string) (string, error)

func PGURIFromEnvironmentWithParams

func PGURIFromEnvironmentWithParams(database, svc, path, svcDBUser string) (string, error)

Types

type Config

type Config struct {
	*platform.Config

	SvcDBUser string
}

func ConfigFromEnvironment

func ConfigFromEnvironment() (*Config, error)

func ConfigFromParams

func ConfigFromParams(svcName, svcPath, svcDBUser string) (*Config, error)

func (*Config) ExternalPGRootCertPath

func (c *Config) ExternalPGRootCertPath() string

func (*Config) GetPGConnInfoForSuperuser

func (c *Config) GetPGConnInfoForSuperuser() (*PGConnInfo, error)

func (*Config) GetPGConnInfoURI

func (c *Config) GetPGConnInfoURI(user string) (*PGConnInfo, error)

func (*Config) GetPGURI

func (c *Config) GetPGURI(dbname string) (string, error)

func (*Config) GetPGURIForUser

func (c *Config) GetPGURIForUser(dbname string, user string) (string, error)

func (*Config) IsExternalPG

func (c *Config) IsExternalPG() bool

func (*Config) LoadTemplates

func (c *Config) LoadTemplates(funcs template.FuncMap, opts ...TemplateOpt) (*template.Template, error)

func (*Config) PGServiceUser

func (c *Config) PGServiceUser() (string, error)

func (*Config) PGSuperUser

func (c *Config) PGSuperUser() (string, error)

func (*Config) TemplatesPath

func (c *Config) TemplatesPath() string

type PGConnInfo

type PGConnInfo struct {
	// contains filtered or unexported fields
}

func (*PGConnInfo) ConnURI

func (c *PGConnInfo) ConnURI(dbname string) string

func (*PGConnInfo) String

func (c *PGConnInfo) String() string

type TemplateOpt

type TemplateOpt func(*templateOptions)

func WithSecretsPath

func WithSecretsPath(path string) TemplateOpt

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL