Documentation
¶
Index ¶
Constants ¶
View Source
const SourceType string = "postgres"
Variables ¶
This section is empty.
Functions ¶
func BuildPostgresURL ¶ added in v1.2.0
BuildPostgresURL assembles a postgres connection URL from its components. It uses net.JoinHostPort so IPv6 host literals are wrapped in brackets as required by RFC 3986 (e.g. "[::1]:5432"); IPv4 addresses and hostnames are left unchanged. Query parameters are encoded with url.Values so special characters are escaped correctly and the output is deterministic.
func ParseQueryExecMode ¶
func ParseQueryExecMode(queryExecMode string) (pgx.QueryExecMode, error)
Types ¶
type Config ¶
type Config struct {
Name string `yaml:"name" validate:"required"`
Type string `yaml:"type" validate:"required"`
Host string `yaml:"host" validate:"required"`
Port string `yaml:"port" validate:"required"`
User string `yaml:"user" validate:"required"`
Password string `yaml:"password" validate:"required"`
Database string `yaml:"database" validate:"required"`
QueryParams map[string]string `yaml:"queryParams"`
QueryExecMode string `yaml:"queryExecMode" validate:"omitempty,oneof=cache_statement cache_describe describe_exec exec simple_protocol"`
}
func (Config) Initialize ¶
func (Config) SourceConfigType ¶
type Source ¶
func (*Source) PostgresPool ¶
func (*Source) SourceType ¶
func (*Source) ToConfig ¶
func (s *Source) ToConfig() sources.SourceConfig
Click to show internal directories.
Click to hide internal directories.