Documentation ¶
Index ¶
- func ProcessToPostgressError(err error) string
- type Config
- type Postgresql
- func (p *Postgresql) ApplyPrivileges(ctx context.Context, username string, privileges []v1alpha1.PrivilegeSpec) error
- func (p *Postgresql) Close(ctx context.Context) error
- func (p *Postgresql) Connect(ctx context.Context) error
- func (p *Postgresql) CreateUser(ctx context.Context, username, password string) (map[string]string, error)
- func (p *Postgresql) DeleteUser(ctx context.Context, username string) error
- func (p *Postgresql) RevokePrivileges(ctx context.Context, username string, privileges []v1alpha1.PrivilegeSpec) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessToPostgressError ¶
Types ¶
type Config ¶ added in v0.1.0
type Config struct { Host string User string Password string DatabaseName string Port int SSLMode v1alpha1.PostgresSSLMode SSLCACert, SSLUserCert, SSLUserKey string SSLCAKey string // contains filtered or unexported fields }
func (*Config) ConnString ¶ added in v0.1.0
func (*Config) CreateCerts ¶ added in v0.1.0
type Postgresql ¶ added in v0.1.0
type Postgresql struct {
// contains filtered or unexported fields
}
func NewPostgresql ¶ added in v0.1.0
func NewPostgresql(c connection.Connection, config *Config, logger logr.Logger) *Postgresql
func (*Postgresql) ApplyPrivileges ¶ added in v0.1.0
func (p *Postgresql) ApplyPrivileges(ctx context.Context, username string, privileges []v1alpha1.PrivilegeSpec) error
func (*Postgresql) Connect ¶ added in v0.1.0
func (p *Postgresql) Connect(ctx context.Context) error
func (*Postgresql) CreateUser ¶ added in v0.1.0
func (*Postgresql) DeleteUser ¶ added in v0.1.0
func (p *Postgresql) DeleteUser(ctx context.Context, username string) error
func (*Postgresql) RevokePrivileges ¶ added in v0.1.0
func (p *Postgresql) RevokePrivileges(ctx context.Context, username string, privileges []v1alpha1.PrivilegeSpec) error
Click to show internal directories.
Click to hide internal directories.