Documentation
¶
Index ¶
- func FormatConfigComment(key, prefix string) string
- type PgBouncerConfigGenerator
- func (g *PgBouncerConfigGenerator) AddCustomSetting(key, value string)
- func (g *PgBouncerConfigGenerator) AddDatabase(name string, config pkg.DatabaseConfig)
- func (g *PgBouncerConfigGenerator) GenerateConfig() *pkg.PgBouncerIni
- func (g *PgBouncerConfigGenerator) GenerateConfigFile() string
- func (g *PgBouncerConfigGenerator) SetDatabaseConfig(name, host string, port int, dbname, user string)
- type PgHBAConfigGenerator
- func (g *PgHBAConfigGenerator) AddEntry(entry pkg.PostgrestHBA)
- func (g *PgHBAConfigGenerator) AddHostEntry(database, user, address string, method pkg.PostgrestHBAMethod)
- func (g *PgHBAConfigGenerator) AddSSLEntry(database, user, address string, method pkg.PostgrestHBAMethod)
- func (g *PgHBAConfigGenerator) AddSocketEntry(database, user string)
- func (g *PgHBAConfigGenerator) GenerateConfigFile() string
- type PostgRESTConfigGenerator
- func (g *PostgRESTConfigGenerator) AddCustomSetting(key, value string)
- func (g *PostgRESTConfigGenerator) GenerateConfig() (*pkg.PostgrestConf, error)
- func (g *PostgRESTConfigGenerator) GenerateConfigFile() (string, error)
- func (g *PostgRESTConfigGenerator) GenerateEnvFile() (string, error)
- func (g *PostgRESTConfigGenerator) GenerateUserSetupSQL() string
- func (g *PostgRESTConfigGenerator) SetDatabaseConfig(name, host string, port int, user, password string)
- type PostgreSQLConfigGenerator
- func (g *PostgreSQLConfigGenerator) AddCustomSetting(key, value string)
- func (g *PostgreSQLConfigGenerator) GenerateConfig() *pkg.PostgresConf
- func (g *PostgreSQLConfigGenerator) GenerateConfigFile() string
- func (g *PostgreSQLConfigGenerator) SetExtensions(extensions map[string]pkg.ExtensionConfig)
- func (g *PostgreSQLConfigGenerator) SetPGAuditConf(conf *pkg.PGAuditConf)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatConfigComment ¶
Types ¶
type PgBouncerConfigGenerator ¶
type PgBouncerConfigGenerator struct {
SystemInfo *sysinfo.SystemInfo
TunedParams *pgtune.TunedParameters
DatabaseName string
DatabaseHost string
DatabasePort int
DatabaseUser string
CustomSettings map[string]string
DatabaseOverrides map[string]pkg.DatabaseConfig
// contains filtered or unexported fields
}
PgBouncerConfigGenerator generates pgbouncer.ini configuration
func NewPgBouncerConfigGenerator ¶
func NewPgBouncerConfigGenerator(sysInfo *sysinfo.SystemInfo, params *pgtune.TunedParameters) *PgBouncerConfigGenerator
NewPgBouncerConfigGenerator creates a new PgBouncer configuration generator
func (*PgBouncerConfigGenerator) AddCustomSetting ¶
func (g *PgBouncerConfigGenerator) AddCustomSetting(key, value string)
AddCustomSetting adds a custom setting to the configuration
func (*PgBouncerConfigGenerator) AddDatabase ¶
func (g *PgBouncerConfigGenerator) AddDatabase(name string, config pkg.DatabaseConfig)
AddDatabase adds a database configuration
func (*PgBouncerConfigGenerator) GenerateConfig ¶
func (g *PgBouncerConfigGenerator) GenerateConfig() *pkg.PgBouncerIni
GenerateConfig generates a PgBouncer configuration struct
func (*PgBouncerConfigGenerator) GenerateConfigFile ¶
func (g *PgBouncerConfigGenerator) GenerateConfigFile() string
GenerateConfigFile generates the actual pgbouncer.ini file content
func (*PgBouncerConfigGenerator) SetDatabaseConfig ¶
func (g *PgBouncerConfigGenerator) SetDatabaseConfig(name, host string, port int, dbname, user string)
SetDatabaseConfig sets the default database configuration
type PgHBAConfigGenerator ¶
type PgHBAConfigGenerator struct {
Entries []pkg.PostgrestHBA
}
PgHBAConfigGenerator generates pg_hba.conf configuration
func NewPgHBAConfigGenerator ¶
func NewPgHBAConfigGenerator(authMethod pkg.PostgrestHBAMethod) *PgHBAConfigGenerator
NewPgHBAConfigGenerator creates a new pg_hba.conf configuration generator
func (*PgHBAConfigGenerator) AddEntry ¶
func (g *PgHBAConfigGenerator) AddEntry(entry pkg.PostgrestHBA)
AddEntry adds an authentication entry
func (*PgHBAConfigGenerator) AddHostEntry ¶
func (g *PgHBAConfigGenerator) AddHostEntry(database, user, address string, method pkg.PostgrestHBAMethod)
AddHostEntry adds a TCP/IP connection entry
func (*PgHBAConfigGenerator) AddSSLEntry ¶
func (g *PgHBAConfigGenerator) AddSSLEntry(database, user, address string, method pkg.PostgrestHBAMethod)
AddSSLEntry adds an SSL-only connection entry
func (*PgHBAConfigGenerator) AddSocketEntry ¶ added in v1.0.4
func (g *PgHBAConfigGenerator) AddSocketEntry(database, user string)
AddHostEntry adds a TCP/IP connection entry
func (*PgHBAConfigGenerator) GenerateConfigFile ¶
func (g *PgHBAConfigGenerator) GenerateConfigFile() string
GenerateConfigFile generates the actual pg_hba.conf file content
type PostgRESTConfigGenerator ¶
type PostgRESTConfigGenerator struct {
SystemInfo *sysinfo.SystemInfo
TunedParams *pgtune.TunedParameters
DatabaseName string
DatabaseHost string
DatabasePort int
DatabaseUser string
DatabasePass string
CustomSettings map[string]string
// contains filtered or unexported fields
}
PostgRESTConfigGenerator generates PostgREST configuration
func NewPostgRESTConfigGenerator ¶
func NewPostgRESTConfigGenerator(sysInfo *sysinfo.SystemInfo, params *pgtune.TunedParameters) *PostgRESTConfigGenerator
NewPostgRESTConfigGenerator creates a new PostgREST configuration generator
func (*PostgRESTConfigGenerator) AddCustomSetting ¶
func (g *PostgRESTConfigGenerator) AddCustomSetting(key, value string)
AddCustomSetting adds a custom setting to the configuration
func (*PostgRESTConfigGenerator) GenerateConfig ¶
func (g *PostgRESTConfigGenerator) GenerateConfig() (*pkg.PostgrestConf, error)
GenerateConfig generates a PostgREST configuration struct
func (*PostgRESTConfigGenerator) GenerateConfigFile ¶
func (g *PostgRESTConfigGenerator) GenerateConfigFile() (string, error)
GenerateConfigFile generates the actual PostgREST configuration file content
func (*PostgRESTConfigGenerator) GenerateEnvFile ¶
func (g *PostgRESTConfigGenerator) GenerateEnvFile() (string, error)
GenerateEnvFile generates a .env file for PostgREST
func (*PostgRESTConfigGenerator) GenerateUserSetupSQL ¶
func (g *PostgRESTConfigGenerator) GenerateUserSetupSQL() string
GenerateUserSetupSQL generates SQL commands to set up PostgREST users and roles
func (*PostgRESTConfigGenerator) SetDatabaseConfig ¶
func (g *PostgRESTConfigGenerator) SetDatabaseConfig(name, host string, port int, user, password string)
SetDatabaseConfig sets the database connection parameters
type PostgreSQLConfigGenerator ¶
type PostgreSQLConfigGenerator struct {
SystemInfo *sysinfo.SystemInfo
TunedParams *pgtune.TunedParameters
CustomSettings map[string]string
// contains filtered or unexported fields
}
PostgreSQLConfigGenerator generates postgresql.conf configuration
func NewPostgreSQLConfigGenerator ¶
func NewPostgreSQLConfigGenerator(sysInfo *sysinfo.SystemInfo, params *pgtune.TunedParameters) *PostgreSQLConfigGenerator
NewPostgreSQLConfigGenerator creates a new PostgreSQL configuration generator
func (*PostgreSQLConfigGenerator) AddCustomSetting ¶
func (g *PostgreSQLConfigGenerator) AddCustomSetting(key, value string)
AddCustomSetting adds a custom setting to the configuration
func (*PostgreSQLConfigGenerator) GenerateConfig ¶
func (g *PostgreSQLConfigGenerator) GenerateConfig() *pkg.PostgresConf
GenerateConfig generates a PostgreSQL configuration struct
func (*PostgreSQLConfigGenerator) GenerateConfigFile ¶
func (g *PostgreSQLConfigGenerator) GenerateConfigFile() string
GenerateConfigFile generates the actual postgresql.conf file content
func (*PostgreSQLConfigGenerator) SetExtensions ¶
func (g *PostgreSQLConfigGenerator) SetExtensions(extensions map[string]pkg.ExtensionConfig)
SetExtensions sets the extensions configuration
func (*PostgreSQLConfigGenerator) SetPGAuditConf ¶
func (g *PostgreSQLConfigGenerator) SetPGAuditConf(conf *pkg.PGAuditConf)
SetPGAuditConf sets the PGAudit configuration