Documentation ¶
Index ¶
- Constants
- func EscapeLiteral(str string) string
- func EscapeLiteralWithoutQuotes(str string) string
- func EscapeString(str string) string
- func GenPostgresCertFromCA(userName string, secretData map[string][]byte) (map[string][]byte, error)
- func IgnoreAlreadyExists(err error) error
- func Intersect(set1, set2 []authv1alpha1.Privilege) []authv1alpha1.Privilege
- func IntersectDefinedPrivsWithDB(definedPrivs, dbPrivsMap map[authv1alpha1.Privilege]struct{}) ([]authv1alpha1.Privilege, []authv1alpha1.Privilege)
- func IsAlreadyExists(err error) bool
- func NewPostgresFromConfig(config *authv1alpha1.Config, userResource *authv1alpha1.User, ...) common.DatabaseInterface
- func ProcessToPostgressError(err error) string
- type DBType
- type Postgres
- type PostgresConfig
Constants ¶
View Source
const NotAPostgresError string = "Not a postgres error"
Variables ¶
This section is empty.
Functions ¶
func EscapeLiteral ¶
func EscapeString ¶
func GenPostgresCertFromCA ¶
func IgnoreAlreadyExists ¶
func Intersect ¶
func Intersect(set1, set2 []authv1alpha1.Privilege) []authv1alpha1.Privilege
func IntersectDefinedPrivsWithDB ¶
func IntersectDefinedPrivsWithDB(definedPrivs, dbPrivsMap map[authv1alpha1.Privilege]struct{}) ([]authv1alpha1.Privilege, []authv1alpha1.Privilege)
func IsAlreadyExists ¶
func NewPostgresFromConfig ¶
func NewPostgresFromConfig(config *authv1alpha1.Config, userResource *authv1alpha1.User, client common.KubeInterface, logger logr.Logger) common.DatabaseInterface
func ProcessToPostgressError ¶
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func NewPostgres ¶
func NewPostgres(config *PostgresConfig, configResource *authv1alpha1.PostgreSQLConfig, userResource *authv1alpha1.User, client common.KubeInterface, logger logr.Logger) *Postgres
type PostgresConfig ¶
type PostgresConfig struct { // connConfig *pgx.ConnConfig Host string User string Password string Dbname string Port int SSLMode database.PostgresSSLMode SSLCACert, SSLUserCert, SSLUserKey string }
func NewPostgresConfig ¶
func NewPostgresConfig(host string, port int, user, pass, dbname string, sslmode database.PostgresSSLMode, sslCaCert, sslUserCert, sslUserKey string) *PostgresConfig
func (*PostgresConfig) Copy ¶
func (in *PostgresConfig) Copy() *PostgresConfig
func (*PostgresConfig) GetConfig ¶
func (c *PostgresConfig) GetConfig() string
Click to show internal directories.
Click to hide internal directories.