Documentation ¶
Index ¶
- Constants
- Variables
- func AddOpDefinition(ods *[]OpDefinition, defType string, defPath string, defValue interface{})
- func ConfigPath() (string, error)
- func CreateTempDir() (string, error)
- func GenerateEnvName(prefix string) string
- func GetFormattedQuery(query string) string
- func GetUUID() string
- func RunCommand(cmd *exec.Cmd) (string, string, error)
- func SetPermissions(pathToFile string, mode os.FileMode) error
- func WriteFile(data string) (string, error)
- type BOSHCloudConfig
- type BOSHConfig
- type BOSHDirector
- func (bd BOSHDirector) GetEnv(envName string) *DeploymentData
- func (bd *BOSHDirector) SetDeploymentFromManifest(manifestFilePath string, releasesVersions map[string]string, ...) error
- func (bd BOSHDirector) UploadLatestReleaseFromURL(organization string, repo string) error
- func (bd BOSHDirector) UploadPostgresReleaseFromURL(version int) error
- func (bd BOSHDirector) UploadReleaseFromURL(organization string, repo string, version int) error
- type BOSHJobNetwork
- type DeployHelper
- func (d DeployHelper) ConnectToPostgres(pgHost string, pgprops Properties) (PGData, error)
- func (d DeployHelper) Deploy() error
- func (d *DeployHelper) EnablePrintDiffs()
- func (d DeployHelper) GetDeployment() *DeploymentData
- func (d DeployHelper) GetDeploymentName() string
- func (d DeployHelper) GetPGPropsAndHost() (Properties, string, error)
- func (d DeployHelper) GetPostgresJobProps() (Properties, error)
- func (d DeployHelper) GetVariable(name string) interface{}
- func (d *DeployHelper) InitializeVariables()
- func (d *DeployHelper) SetDeploymentName(prefix string)
- func (d *DeployHelper) SetOpDefs(opDefs []OpDefinition)
- func (d *DeployHelper) SetPGVersion(version int)
- func (d *DeployHelper) SetVariable(name string, value interface{})
- func (d DeployHelper) UploadLatestReleaseFromURL(organization string, project string) error
- func (d DeployHelper) WriteSSHKey() (string, error)
- type DeploymentData
- func (dd DeploymentData) ContainsVariables() bool
- func (dd DeploymentData) CreateOrUpdateDeployment() error
- func (dd DeploymentData) DeleteDeployment() error
- func (dd *DeploymentData) EvaluateTemplate(vars map[string]interface{}, opDefs []OpDefinition, opts EvaluateOptions) error
- func (dd DeploymentData) GetJobsProperties() (ManifestProperties, error)
- func (dd DeploymentData) GetVariable(key string) interface{}
- func (dd DeploymentData) GetVmAddress(vmname string) (string, error)
- func (dd DeploymentData) GetVmAddresses(vmname string) ([]string, error)
- func (dd DeploymentData) GetVmDNS(vmname string) (string, error)
- func (dd DeploymentData) GetVmIdByAddress(vmaddress string) (string, error)
- func (dd DeploymentData) IsVmProcessRunning(vmid string, processName string) (bool, error)
- func (dd DeploymentData) IsVmRunning(vmid string) (bool, error)
- func (dd DeploymentData) PrintDeploymentDiffs() error
- func (dd DeploymentData) Restart(instanceGroupName string) error
- func (dd DeploymentData) Start(instanceGroupName string) error
- func (dd DeploymentData) Stop(instanceGroupName string) error
- func (dd DeploymentData) UpdateResurrection(enable bool) error
- type EvaluateOptions
- type Janitor
- type LoadType
- type ManifestProperties
- type MapVariables
- type OpDefinition
- func DefineHooks(hooks_timeout string, pre_start string, post_start string, pre_stop string, ...) []OpDefinition
- func Define_add_bad_role() []OpDefinition
- func Define_bbr_client_certs() []OpDefinition
- func Define_bbr_not_colocated_ops() []OpDefinition
- func Define_bbr_ops() []OpDefinition
- func Define_bbr_ssl_verify_ca() []OpDefinition
- func Define_bbr_ssl_verify_full() []OpDefinition
- func Define_mutual_ssl_ops() []OpDefinition
- func Define_ssl_ops() []OpDefinition
- func Define_upgrade_no_copy_ops() []OpDefinition
- type PGColumnSorter
- type PGCommon
- type PGConn
- type PGCount
- type PGDBSorter
- type PGData
- func (pg *PGData) ChangeSSLMode(sslmode string, sslrootcert string) error
- func (pg PGData) CheckRoleExist(role_name string) (bool, error)
- func (pg PGData) CheckTableExist(table_name string, dbName string) (bool, error)
- func (pg *PGData) CloseConnections()
- func (pg PGData) ConvertToPostgresDate(inputDate string) (string, error)
- func (pg PGData) CreateAndPopulateTables(dbName string, loadType LoadType) error
- func (pg PGData) CreateAndPopulateTablesWithPrefix(dbName string, loadType LoadType, prefix string) error
- func (pg PGData) DropTable(dbName string, tableName string) error
- func (pg *PGData) GetDBConnection(dbname string) (PGConn, error)
- func (pg PGData) GetDBConnectionForUser(dbname string, user User) (PGConn, error)
- func (pg *PGData) GetDBSuperUserConnection(dbname string) (PGConn, error)
- func (pg PGData) GetData() (PGOutputData, error)
- func (pg *PGData) GetDefaultConnection() (PGConn, error)
- func (pg PGData) GetPostgreSQLVersion() (PGVersion, error)
- func (pg *PGData) GetSuperUserConnection() (PGConn, error)
- func (pg PGData) ListDatabaseExtensions(dbName string) ([]PGDatabaseExtensions, error)
- func (pg PGData) ListDatabaseTables(dbName string) ([]PGTable, error)
- func (pg PGData) ListDatabases() ([]PGDatabase, error)
- func (pg PGData) ListRoles() (map[string]PGRole, error)
- func (pg *PGData) OpenConnection(dbname string, user User) (PGConn, error)
- func (pg PGData) ReadAllSettings() (map[string]string, error)
- func (pg *PGData) SetCertUserCertificates(user string, certs map[interface{}]interface{}) error
- func (pg *PGData) UseCertAuthentication(useCert bool) error
- type PGDatabase
- type PGDatabaseExtensions
- type PGLoadTable
- type PGOutputData
- type PGRole
- type PGSetting
- type PGTable
- type PGTableColumn
- type PGTableSorter
- type PGVersion
- type PgAdditionalConfig
- type PgAdditionalConfigMap
- type PgDBProperties
- type PgDBPropsSorter
- type PgProperties
- type PgRoleProperties
- type PgTLS
- type PgatsConfig
- type PostgresReleaseVersions
- type Properties
- type User
- type Validator
- func (v Validator) CompareTablesTo(data PGOutputData) bool
- func (v Validator) MatchSetting(key string, value interface{}) error
- func (v Validator) ValidateAll() error
- func (v Validator) ValidateDatabases() error
- func (v Validator) ValidatePostgreSQLVersion() error
- func (v Validator) ValidateRoles() error
- func (v Validator) ValidateSettings() error
- type VarsCertLoader
Constants ¶
View Source
const ConvertToDateCommand = "SELECT '%s'::timestamptz"
View Source
const CountTableRowsQuery = "SELECT COUNT(*) FROM %s"
View Source
const DefaultDB = "postgres"
View Source
const DeployLatestVersion = -1
View Source
const DropTable = "DROP TABLE %s"
View Source
const ExtraDatabaseValidationError = "Extra database %s has been created"
View Source
const ExtraExtensionValidationError = "Extra extension %s for database %s has been created"
View Source
const ExtraRoleValidationError = "Extra role %s has been created"
View Source
const GetPostgreSQLVersionQuery = "SELECT version()"
View Source
const GetRoleQuery = "SELECT * from pg_roles where rolname='%s'"
View Source
const GetSettingsQuery = "SELECT * FROM pg_settings"
View Source
const GetTableQuery = "SELECT * from pg_catalog.pg_tables where tablename='%s'"
View Source
const IncorrectEnvMsg = "$PGATS_CONFIG %q does not specify an absolute path to test config file"
View Source
const IncorrectRolePrmissionValidationError = "Incorrect permissions for role %s"
View Source
const IncorrectSSLModeErr = "Incorrect SSL mode specified"
View Source
const IncorrectSettingValidationError = "Incorrect value %v instead of %v for setting %s"
View Source
const ListDBExtensionsQuery = "SELECT extname from pg_extension"
View Source
const ListDatabasesQuery = "SELECT datname from pg_database where datistemplate=false"
View Source
const ListRolesQuery = "SELECT * from pg_roles"
View Source
const ListTableColumnsQuery = "" /* 157-byte string literal not displayed */
View Source
const ListTablesQuery = "SELECT * from pg_catalog.pg_tables where schemaname not like 'pg_%' and schemaname != 'information_schema'"
View Source
const MissingCertCertErr = "No certificate specified for cert user"
View Source
const MissingCertKeyErr = "No private key specified for cert user's certificate"
View Source
const MissingCertUserErr = "No user specified to authenticate with certificates"
View Source
const MissingCertificateMsg = "missing `director_ca_cert` - specify BOSH director CA certificate"
View Source
const MissingDBAddressErr = "Database address not specified"
View Source
const MissingDBPortErr = "Database port not specified"
View Source
const MissingDatabaseValidationError = "Database %s has not been created"
View Source
const MissingDefaultPasswordErr = "Default password not specified"
View Source
const MissingDefaultUserErr = "Default user not specified"
View Source
const MissingDeploymentNameMsg = "Invalid manifest: deployment name not present"
View Source
const MissingExtensionValidationError = "Extension %s for database %s has not been created"
View Source
const MissingRoleValidationError = "Role %s has not been created"
View Source
const MissingSSLRootCertErr = "SSL Root Certificate missing"
View Source
const MissingSettingValidationError = "Missing setting %s"
View Source
const NoConnectionAvailableErr = "No connections available"
View Source
const NoSuperUserProvidedErr = "No super user provided"
View Source
const ProcessNotPresentInVmMsg = "Process %s does not exist in vm %s"
View Source
const QueryResultAsJson = "SELECT row_to_json(t) from (%s) as t;"
View Source
const VMNotPresentMsg = "No VM exists with name %s"
View Source
const WrongPostreSQLVersionError = "Actual PostgreSQL version %s should be %s"
Variables ¶
View Source
var DefaultBOSHConfig = BOSHConfig{
Target: "192.168.50.4",
Username: "admin",
Password: "admin",
}
View Source
var DefaultCloudConfig = BOSHCloudConfig{ AZs: []string{"z1"}, Networks: []BOSHJobNetwork{ BOSHJobNetwork{ Name: "default", }, }, PersistentDiskType: "10GB", VmType: "small", StemcellOs: "ubuntu-xenial", StemcellVersion: "latest", }
View Source
var DefaultPgatsConfig = PgatsConfig{ Bosh: DefaultBOSHConfig, BoshCC: DefaultCloudConfig, PGReleaseVersion: "latest", PostgreSQLVersion: "current", VersionsFile: "", }
View Source
var LargeLoad = LoadType{NumTables: 100, NumColumns: 10, NumRows: 20000}
View Source
var MediumLoad = LoadType{NumTables: 10, NumColumns: 10, NumRows: 100}
View Source
var RowSamples = [][]interface{}{
[]interface{}{"character varying not null", "short_string"},
[]interface{}{"character varying not null", "long_string_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},
[]interface{}{"integer", 0},
}
View Source
var SmallLoad = LoadType{NumTables: 2, NumColumns: 10, NumRows: 50}
View Source
var Test1Load = LoadType{NumTables: 1, NumColumns: 1, NumRows: 1}
View Source
var Test2Load = LoadType{NumTables: 2, NumColumns: 4, NumRows: 5}
Functions ¶
func AddOpDefinition ¶
func AddOpDefinition(ods *[]OpDefinition, defType string, defPath string, defValue interface{})
func ConfigPath ¶
func CreateTempDir ¶
func GenerateEnvName ¶
func GetFormattedQuery ¶
Types ¶
type BOSHCloudConfig ¶
type BOSHCloudConfig struct { AZs []string `yaml:"default_azs"` Networks []BOSHJobNetwork `yaml:"default_networks"` PersistentDiskType string `yaml:"default_persistent_disk_type"` VmType string `yaml:"default_vm_type"` StemcellOs string `yaml:"default_stemcell_os"` StemcellVersion string `yaml:"default_stemcell_version"` }
type BOSHConfig ¶
type BOSHDirector ¶
type BOSHDirector struct { Director boshdir.Director DeploymentsInfo map[string]*DeploymentData DirectorConfig BOSHConfig CloudConfig BOSHCloudConfig DefaultReleasesVersion map[string]string }
func NewBOSHDirector ¶
func NewBOSHDirector(boshConfig BOSHConfig, cloudConfig BOSHCloudConfig, releasesVersions map[string]string) (BOSHDirector, error)
func (BOSHDirector) GetEnv ¶
func (bd BOSHDirector) GetEnv(envName string) *DeploymentData
func (*BOSHDirector) SetDeploymentFromManifest ¶
func (BOSHDirector) UploadLatestReleaseFromURL ¶
func (bd BOSHDirector) UploadLatestReleaseFromURL(organization string, repo string) error
func (BOSHDirector) UploadPostgresReleaseFromURL ¶
func (bd BOSHDirector) UploadPostgresReleaseFromURL(version int) error
func (BOSHDirector) UploadReleaseFromURL ¶
func (bd BOSHDirector) UploadReleaseFromURL(organization string, repo string, version int) error
type BOSHJobNetwork ¶
type DeployHelper ¶
type DeployHelper struct {
// contains filtered or unexported fields
}
func NewDeployHelper ¶
func NewDeployHelper(params PgatsConfig, prefix string, pgVersion int) (DeployHelper, error)
func (DeployHelper) ConnectToPostgres ¶
func (d DeployHelper) ConnectToPostgres(pgHost string, pgprops Properties) (PGData, error)
func (DeployHelper) Deploy ¶
func (d DeployHelper) Deploy() error
func (*DeployHelper) EnablePrintDiffs ¶
func (d *DeployHelper) EnablePrintDiffs()
func (DeployHelper) GetDeployment ¶
func (d DeployHelper) GetDeployment() *DeploymentData
func (DeployHelper) GetDeploymentName ¶
func (d DeployHelper) GetDeploymentName() string
func (DeployHelper) GetPGPropsAndHost ¶
func (d DeployHelper) GetPGPropsAndHost() (Properties, string, error)
func (DeployHelper) GetPostgresJobProps ¶
func (d DeployHelper) GetPostgresJobProps() (Properties, error)
func (DeployHelper) GetVariable ¶
func (d DeployHelper) GetVariable(name string) interface{}
func (*DeployHelper) InitializeVariables ¶
func (d *DeployHelper) InitializeVariables()
func (*DeployHelper) SetDeploymentName ¶
func (d *DeployHelper) SetDeploymentName(prefix string)
func (*DeployHelper) SetOpDefs ¶
func (d *DeployHelper) SetOpDefs(opDefs []OpDefinition)
func (*DeployHelper) SetPGVersion ¶
func (d *DeployHelper) SetPGVersion(version int)
func (*DeployHelper) SetVariable ¶
func (d *DeployHelper) SetVariable(name string, value interface{})
func (DeployHelper) UploadLatestReleaseFromURL ¶
func (d DeployHelper) UploadLatestReleaseFromURL(organization string, project string) error
func (DeployHelper) WriteSSHKey ¶
func (d DeployHelper) WriteSSHKey() (string, error)
type DeploymentData ¶
type DeploymentData struct { ManifestBytes []byte ManifestData map[string]interface{} Deployment boshdir.Deployment Variables boshtempl.Variables }
func (DeploymentData) ContainsVariables ¶
func (dd DeploymentData) ContainsVariables() bool
func (DeploymentData) CreateOrUpdateDeployment ¶
func (dd DeploymentData) CreateOrUpdateDeployment() error
func (DeploymentData) DeleteDeployment ¶
func (dd DeploymentData) DeleteDeployment() error
func (*DeploymentData) EvaluateTemplate ¶
func (dd *DeploymentData) EvaluateTemplate(vars map[string]interface{}, opDefs []OpDefinition, opts EvaluateOptions) error
func (DeploymentData) GetJobsProperties ¶
func (dd DeploymentData) GetJobsProperties() (ManifestProperties, error)
func (DeploymentData) GetVariable ¶
func (dd DeploymentData) GetVariable(key string) interface{}
func (DeploymentData) GetVmAddress ¶
func (dd DeploymentData) GetVmAddress(vmname string) (string, error)
func (DeploymentData) GetVmAddresses ¶
func (dd DeploymentData) GetVmAddresses(vmname string) ([]string, error)
func (DeploymentData) GetVmIdByAddress ¶
func (dd DeploymentData) GetVmIdByAddress(vmaddress string) (string, error)
func (DeploymentData) IsVmProcessRunning ¶
func (dd DeploymentData) IsVmProcessRunning(vmid string, processName string) (bool, error)
func (DeploymentData) IsVmRunning ¶
func (dd DeploymentData) IsVmRunning(vmid string) (bool, error)
func (DeploymentData) PrintDeploymentDiffs ¶
func (dd DeploymentData) PrintDeploymentDiffs() error
func (DeploymentData) Restart ¶
func (dd DeploymentData) Restart(instanceGroupName string) error
func (DeploymentData) Start ¶
func (dd DeploymentData) Start(instanceGroupName string) error
func (DeploymentData) Stop ¶
func (dd DeploymentData) Stop(instanceGroupName string) error
func (DeploymentData) UpdateResurrection ¶
func (dd DeploymentData) UpdateResurrection(enable bool) error
type EvaluateOptions ¶
type EvaluateOptions boshtempl.EvaluateOpts
type Janitor ¶
func (Janitor) GetOpDefinitions ¶
func (j Janitor) GetOpDefinitions() []OpDefinition
type ManifestProperties ¶
type ManifestProperties struct {
ByJob map[string][]Properties
}
func (ManifestProperties) GetJobProperties ¶
func (mp ManifestProperties) GetJobProperties(jobName string) []Properties
func (*ManifestProperties) LoadJobProperties ¶
func (mp *ManifestProperties) LoadJobProperties(jobName string, yamlData []byte) error
type MapVariables ¶
type MapVariables struct {
Entries *boshtempl.StaticVariables
}
func (*MapVariables) Add ¶
func (v *MapVariables) Add(name string, value interface{})
func (MapVariables) Get ¶
func (v MapVariables) Get(varDef boshtempl.VariableDefinition) (interface{}, bool, error)
func (MapVariables) List ¶
func (v MapVariables) List() ([]boshtempl.VariableDefinition, error)
type OpDefinition ¶
type OpDefinition patch.OpDefinition
func DefineHooks ¶
func Define_add_bad_role ¶
func Define_add_bad_role() []OpDefinition
func Define_bbr_client_certs ¶
func Define_bbr_client_certs() []OpDefinition
func Define_bbr_not_colocated_ops ¶
func Define_bbr_not_colocated_ops() []OpDefinition
func Define_bbr_ops ¶
func Define_bbr_ops() []OpDefinition
func Define_bbr_ssl_verify_ca ¶
func Define_bbr_ssl_verify_ca() []OpDefinition
func Define_bbr_ssl_verify_full ¶
func Define_bbr_ssl_verify_full() []OpDefinition
func Define_mutual_ssl_ops ¶
func Define_mutual_ssl_ops() []OpDefinition
func Define_ssl_ops ¶
func Define_ssl_ops() []OpDefinition
func Define_upgrade_no_copy_ops ¶
func Define_upgrade_no_copy_ops() []OpDefinition
type PGColumnSorter ¶
type PGColumnSorter []PGTableColumn
func (PGColumnSorter) Len ¶
func (a PGColumnSorter) Len() int
func (PGColumnSorter) Less ¶
func (a PGColumnSorter) Less(i, j int) bool
func (PGColumnSorter) Swap ¶
func (a PGColumnSorter) Swap(i, j int)
type PGConn ¶
type PGDBSorter ¶
type PGDBSorter []PGDatabase
func (PGDBSorter) Len ¶
func (a PGDBSorter) Len() int
func (PGDBSorter) Less ¶
func (a PGDBSorter) Less(i, j int) bool
func (PGDBSorter) Swap ¶
func (a PGDBSorter) Swap(i, j int)
type PGData ¶
func NewPostgres ¶
func (*PGData) ChangeSSLMode ¶
func (PGData) CheckTableExist ¶
func (*PGData) CloseConnections ¶
func (pg *PGData) CloseConnections()
func (PGData) ConvertToPostgresDate ¶
func (PGData) CreateAndPopulateTables ¶
func (PGData) CreateAndPopulateTablesWithPrefix ¶
func (PGData) GetDBConnectionForUser ¶
func (*PGData) GetDBSuperUserConnection ¶
func (PGData) GetData ¶
func (pg PGData) GetData() (PGOutputData, error)
func (*PGData) GetDefaultConnection ¶
func (PGData) GetPostgreSQLVersion ¶
func (*PGData) GetSuperUserConnection ¶
func (PGData) ListDatabaseExtensions ¶
func (pg PGData) ListDatabaseExtensions(dbName string) ([]PGDatabaseExtensions, error)
func (PGData) ListDatabaseTables ¶
func (PGData) ListDatabases ¶
func (pg PGData) ListDatabases() ([]PGDatabase, error)
func (*PGData) OpenConnection ¶
func (*PGData) SetCertUserCertificates ¶
func (*PGData) UseCertAuthentication ¶
type PGDatabase ¶
type PGDatabase struct { Name string `json:"datname"` DBExts []PGDatabaseExtensions Tables []PGTable }
type PGDatabaseExtensions ¶
type PGDatabaseExtensions struct {
Name string `json:"extname"`
}
type PGLoadTable ¶
type PGLoadTable struct { Name string ColumnNames []string ColumnTypes []string SampleRow []interface{} NumRows int }
func GetSampleLoadWithPrefix ¶
func GetSampleLoadWithPrefix(loadType LoadType, prefix string) []PGLoadTable
func (PGLoadTable) PrepareCreate ¶
func (table PGLoadTable) PrepareCreate() string
func (PGLoadTable) PrepareRow ¶
func (table PGLoadTable) PrepareRow(rowIdx int) []interface{}
func (PGLoadTable) PrepareStatement ¶
func (table PGLoadTable) PrepareStatement() string
type PGOutputData ¶
type PGOutputData struct { Roles map[string]PGRole Databases []PGDatabase Settings map[string]string Version PGVersion }
func (PGOutputData) CopyData ¶
func (o PGOutputData) CopyData() (PGOutputData, error)
type PGRole ¶
type PGRole struct { Name string `json:"rolname"` Super bool `json:"rolsuper"` Inherit bool `json:"rolinherit"` CreateRole bool `json:"rolcreaterole"` CreateDb bool `json:"rolcreatedb"` CanLogin bool `json:"rolcanlogin"` Replication bool `json:"rolreplication"` ConnLimit int `json:"rolconnlimit"` ValidUntil string `json:"rolvaliduntil"` }
type PGTable ¶
type PGTable struct { SchemaName string `json:"schemaname"` TableName string `json:"tablename"` TableOwner string `json:"tableowner"` TableColumns []PGTableColumn TableRowsCount PGCount }
type PGTableColumn ¶
type PGTableSorter ¶
type PGTableSorter []PGTable
func (PGTableSorter) Len ¶
func (a PGTableSorter) Len() int
func (PGTableSorter) Less ¶
func (a PGTableSorter) Less(i, j int) bool
func (PGTableSorter) Swap ¶
func (a PGTableSorter) Swap(i, j int)
type PgAdditionalConfig ¶
type PgAdditionalConfig interface{}
type PgAdditionalConfigMap ¶
type PgAdditionalConfigMap map[string]PgAdditionalConfig
type PgDBProperties ¶
type PgDBPropsSorter ¶
type PgDBPropsSorter []PgDBProperties
func (PgDBPropsSorter) Len ¶
func (a PgDBPropsSorter) Len() int
func (PgDBPropsSorter) Less ¶
func (a PgDBPropsSorter) Less(i, j int) bool
func (PgDBPropsSorter) Swap ¶
func (a PgDBPropsSorter) Swap(i, j int)
type PgProperties ¶
type PgProperties struct { Port int `yaml:"port"` Databases []PgDBProperties `yaml:"databases,omitempty"` Roles []PgRoleProperties `yaml:"roles,omitempty"` MaxConnections int `yaml:"max_connections"` LogLinePrefix string `yaml:"log_line_prefix"` CollectStatementStats bool `yaml:"collect_statement_statistics"` MonitTimeout int `yaml:"monit_timeout,omitempty"` AdditionalConfig PgAdditionalConfigMap `yaml:"additional_config,omitempty"` TLS PgTLS `yaml:"tls,omitempty"` }
type PgRoleProperties ¶
type PgatsConfig ¶
type PgatsConfig struct { Bosh BOSHConfig `yaml:"bosh"` BoshCC BOSHCloudConfig `yaml:"cloud_configs"` PGReleaseVersion string `yaml:"postgres_release_version"` PostgreSQLVersion string `yaml:"postgresql_version"` VersionsFile string `yaml:"versions_file"` }
func LoadConfig ¶
func LoadConfig(configFilePath string) (PgatsConfig, error)
type PostgresReleaseVersions ¶
type PostgresReleaseVersions struct { Versions map[int]string `yaml:"versions"` Old int `yaml:"old"` // contains filtered or unexported fields }
func NewPostgresReleaseVersions ¶
func NewPostgresReleaseVersions(versionFile string) (PostgresReleaseVersions, error)
func (PostgresReleaseVersions) GetLatestVersion ¶
func (v PostgresReleaseVersions) GetLatestVersion() int
func (PostgresReleaseVersions) GetOldVersion ¶
func (v PostgresReleaseVersions) GetOldVersion() int
func (PostgresReleaseVersions) GetPostgreSQLVersion ¶
func (v PostgresReleaseVersions) GetPostgreSQLVersion(key int) string
type Properties ¶
type Properties struct {
Databases PgProperties `yaml:"databases"`
}
type Validator ¶
type Validator struct { ManifestProps Properties PostgresData PGOutputData PG PGData PostgreSQLVersion string }
func NewValidator ¶
func NewValidator(props Properties, pgData PGOutputData, pg PGData, postgresqlVersion string) Validator
func (Validator) CompareTablesTo ¶
func (v Validator) CompareTablesTo(data PGOutputData) bool
func (Validator) MatchSetting ¶
TODO cover all setting types PostgreSQL stores setting as formatted strings the value in the postgresql.conf may not match the value from pg_settings view e.g. the shared_buffer property is stored as an int but can be specified as 128MB
func (Validator) ValidateAll ¶
func (Validator) ValidateDatabases ¶
func (Validator) ValidatePostgreSQLVersion ¶
func (Validator) ValidateRoles ¶
func (Validator) ValidateSettings ¶
type VarsCertLoader ¶
type VarsCertLoader struct {
// contains filtered or unexported fields
}
func NewVarsCertLoader ¶
func NewVarsCertLoader(vars boshtempl.Variables) VarsCertLoader
func (VarsCertLoader) LoadCerts ¶
func (l VarsCertLoader) LoadCerts(name string) (*x509.Certificate, *rsa.PrivateKey, error)
Click to show internal directories.
Click to hide internal directories.