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 ¶
- type Service
- func (s *Service) DeletePostgresInstance(ctx context.Context, id string) error
- func (s *Service) GetPostgresInstance(ctx context.Context, id string) (domain.PostgresInstance, error)
- func (s *Service) HasPostgresInstances(ctx context.Context) (bool, error)
- func (s *Service) ListPostgresInstances(ctx context.Context) ([]domain.PostgresInstance, error)
- func (s *Service) RegisterPostgresInstance(ctx context.Context, host string, port int, ...) (string, error)
- func (s *Service) TestPostgresInstance(ctx context.Context, id string) error
- func (s *Service) UpdatePostgresInstance(ctx context.Context, id, host string, port int, ...) error
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 (*Service) GetPostgresInstance ¶
func (*Service) HasPostgresInstances ¶
func (*Service) ListPostgresInstances ¶
func (*Service) RegisterPostgresInstance ¶
func (*Service) TestPostgresInstance ¶
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.
Click to show internal directories.
Click to hide internal directories.