sqladmin

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	Client   *api.Client
	Projects []string
}

Driver wraps Cloud SQL Admin user operations used by rds-account-check. `instanceID` is the Cloud SQL instance name (without project prefix); the driver picks the project from the credential's `Projects` slice.

func (*Driver) CreateAccount

func (d *Driver) CreateAccount(ctx context.Context, instanceID string) (schema.DatabaseActionResult, error)

CreateAccount provisions a Cloud SQL user. Username/password come from the `rds-account-check` config. Host is left blank (Cloud SQL semantics: empty host == any host for MySQL; ignored for Postgres).

func (*Driver) DeleteAccount

func (d *Driver) DeleteAccount(ctx context.Context, instanceID string) (schema.DatabaseActionResult, error)

DeleteAccount removes the Cloud SQL user named by `rds-account-check` from instanceID.

func (*Driver) GetDatabases

func (d *Driver) GetDatabases(ctx context.Context) ([]schema.Database, error)

GetDatabases lists Cloud SQL instances across the configured projects and surfaces them as the cloudlist `database` asset. CSPM-relevant fields: engine version, primary IP address, and whether IPv4 is publicly enabled.

Jump to

Keyboard shortcuts

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