postgresinstances

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package postgresinstances is the admin CRUD service for the shared pool of Postgres servers (admin pool or BYOK) that per-vault databases are provisioned on — mirrors internal/service/v1/s3instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(repo repository.Repo) *Service

func (*Service) DeletePostgresInstance

func (s *Service) DeletePostgresInstance(ctx context.Context, id string) error

func (*Service) GetPostgresInstance

func (s *Service) GetPostgresInstance(ctx context.Context, id string) (domain.PostgresInstance, error)

func (*Service) HasPostgresInstances

func (s *Service) HasPostgresInstances(ctx context.Context) (bool, error)

func (*Service) ListPostgresInstances

func (s *Service) ListPostgresInstances(ctx context.Context) ([]domain.PostgresInstance, error)

func (*Service) RegisterPostgresInstance

func (s *Service) RegisterPostgresInstance(
	ctx context.Context,
	host string, port int, adminDatabase, username, password, sslMode string,
) (string, error)

func (*Service) TestPostgresInstance

func (s *Service) TestPostgresInstance(ctx context.Context, id string) error

TestPostgresInstance opens a connection to id's admin database and pings it, without mutating anything — mirrors s3instances.Service.TestS3Instance. vaultpg.AdminClient does not expose a raw ping/query method (only the DDL helpers EnsureRole/EnsureDatabase/DropDatabase/DropRole), so this opens its own *sql.DB from vaultpg.Config.DSN() rather than going through AdminClient.

func (*Service) UpdatePostgresInstance

func (s *Service) UpdatePostgresInstance(
	ctx context.Context,
	id, host string, port int, adminDatabase, username, password, sslMode string,
) error

Jump to

Keyboard shortcuts

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