Help us shape the future of Go! Take the 2026 Go Developer Survey

postgresql

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessToPostgressError

func ProcessToPostgressError(err error) string

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 NewConfig added in v0.1.0

func NewConfig(host string, port int, user, pass, dbname string, sslmode v1alpha1.PostgresSSLMode, sslCaCert, sslUserCert, sslUserKey, sslCAKey string) *Config

func (*Config) Close added in v0.1.0

func (c *Config) Close() error

func (*Config) ConnString added in v0.1.0

func (c *Config) ConnString() (string, error)

func (*Config) Copy added in v0.1.0

func (c *Config) Copy() *Config

func (*Config) CreateCerts added in v0.1.0

func (c *Config) CreateCerts() bool

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) Close added in v0.1.0

func (p *Postgresql) Close(ctx context.Context) 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 (p *Postgresql) CreateUser(ctx context.Context, username, password string) (map[string]string, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL