Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
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 ¶
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.