Documentation
¶
Index ¶
- Constants
- Variables
- type APIError
- type BackupRun
- type CertInsertResult
- type CloneInput
- type ConfigProvider
- type ConnectSettings
- type Database
- type DatabaseInput
- type DumpOptions
- type Engine
- type ExportInput
- type Flag
- type FlagInfo
- type Handler
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Shutdown(ctx context.Context)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- func (h *Handler) StartWorker(ctx context.Context) error
- type IPMapping
- type ImportInput
- type InMemoryBackend
- func (b *InMemoryBackend) CancelOperation(project, name string) error
- func (b *InMemoryBackend) CloneInstance(project, instance string, in CloneInput) (*Operation, error)
- func (b *InMemoryBackend) Close()
- func (b *InMemoryBackend) DeleteBackupRun(project, instance, id string) (*Operation, error)
- func (b *InMemoryBackend) DeleteDatabase(project, instance, name string) (*Operation, error)
- func (b *InMemoryBackend) DeleteInstance(project, name string) (*Operation, error)
- func (b *InMemoryBackend) DeleteSslCert(project, instance, fp string) (*Operation, error)
- func (b *InMemoryBackend) DeleteUser(project, instance, name, host string) (*Operation, error)
- func (b *InMemoryBackend) Drain()
- func (b *InMemoryBackend) EphemeralCert(project, instance, publicKey, validDuration string) (*SslCert, error)
- func (b *InMemoryBackend) ExportInstance(project, instance string, in ExportInput, raw map[string]any) (*Operation, error)
- func (b *InMemoryBackend) GetBackupRun(project, instance, id string) (*BackupRun, error)
- func (b *InMemoryBackend) GetConnectSettings(project, instance string) (*ConnectSettings, error)
- func (b *InMemoryBackend) GetDatabase(project, instance, name string) (*Database, error)
- func (b *InMemoryBackend) GetInstance(project, name string) (*Instance, error)
- func (b *InMemoryBackend) GetOperation(project, name string) (*Operation, error)
- func (b *InMemoryBackend) GetSslCert(project, instance, fp string) (*SslCert, error)
- func (b *InMemoryBackend) GetUser(project, instance, name, host string) (*User, error)
- func (b *InMemoryBackend) ImportInstance(project, instance string, in ImportInput, raw map[string]any) (*Operation, error)
- func (b *InMemoryBackend) InsertBackupRun(project, instance, description string) (*Operation, error)
- func (b *InMemoryBackend) InsertDatabase(project, instance string, in DatabaseInput) (*Operation, error)
- func (b *InMemoryBackend) InsertInstance(project string, in InstanceInput) (*Operation, error)
- func (b *InMemoryBackend) InsertSslCert(project, instance, commonName string) (*CertInsertResult, error)
- func (b *InMemoryBackend) InsertUser(project, instance string, in UserInput) (*Operation, error)
- func (b *InMemoryBackend) ListBackupRuns(project, instance string) ([]*BackupRun, error)
- func (b *InMemoryBackend) ListDatabases(project, instance string) ([]*Database, error)
- func (b *InMemoryBackend) ListInstances(project, token string, limit int) page.Page[*Instance]
- func (b *InMemoryBackend) ListOperations(project, instance, token string, limit int) page.Page[*Operation]
- func (b *InMemoryBackend) ListSslCerts(project, instance string) ([]*SslCert, error)
- func (b *InMemoryBackend) ListUsers(project, instance string) ([]*User, error)
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) RestartInstance(project, name string) (*Operation, error)
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) RestoreBackup(project, instance string, in RestoreBackupInput) (*Operation, error)
- func (b *InMemoryBackend) SetLauncher(l Launcher)
- func (b *InMemoryBackend) SetObjectStore(o ObjectStore)
- func (b *InMemoryBackend) SetRunContext(parent context.Context)
- func (b *InMemoryBackend) SetStartupTimeout(d time.Duration)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) UpdateDatabase(project, instance, name string, in DatabaseInput) (*Operation, error)
- func (b *InMemoryBackend) UpdateInstance(project, name string, in InstanceInput, replace bool) (*Operation, error)
- func (b *InMemoryBackend) UpdateUser(project, instance, name, host string, in UserInput) (*Operation, error)
- type Instance
- type InstanceInput
- type LaunchSpec
- type Launcher
- type ObjectStore
- type Operation
- type OperationError
- type OperationErrors
- type Provider
- type RestoreBackupInput
- type Settings
- type SslCert
- type TierInfo
- type User
- type UserInput
- type UserSpec
Constants ¶
const ( // DefaultPort is the dedicated listener's default TCP port. DefaultPort = 8130 // EngineAuto launches real database containers when a container runtime is reachable. EngineAuto = "auto" // EngineNone never starts containers: instances are state-only. EngineNone = "none" // DefaultStartupTimeout bounds how long a database container may take to accept connections. DefaultStartupTimeout = 5 * time.Minute )
Variables ¶
var ErrNilAppContext = errors.New("gcpsql: nil app context")
ErrNilAppContext is returned when Init is called with a nil AppContext.
ErrRuntimeUnavailable is returned by a Launcher when no container runtime is reachable; the instance then runs state-only.
var ErrSnapshotNull = errors.New("gcpsql: snapshot contains a null instance")
ErrSnapshotNull is returned when a snapshot holds a null instance.
Functions ¶
This section is empty.
Types ¶
type BackupRun ¶
type BackupRun struct {
Error *OperationError `json:"error,omitempty"`
EndTime string `json:"endTime"`
SelfLink string `json:"selfLink"`
Type string `json:"type"`
BackupKind string `json:"backupKind"`
Description string `json:"description,omitempty"`
EnqueuedTime string `json:"enqueuedTime"`
Status string `json:"status"`
WindowStartTime string `json:"windowStartTime"`
StartTime string `json:"startTime"`
Instance string `json:"instance"`
Kind string `json:"kind"`
Location string `json:"location"`
DatabaseVersion string `json:"databaseVersion"`
TimeZone string `json:"timeZone"`
ID string `json:"id"`
}
BackupRun is the sql#backupRun resource.
type CertInsertResult ¶
CertInsertResult is the sslCerts.insert response payload.
type CloneInput ¶
type CloneInput struct {
DestinationInstanceName string `json:"destinationInstanceName"`
DestinationProject string `json:"destinationProject"`
PointInTime string `json:"pointInTime"`
PitrTimestampMs string `json:"pitrTimestampMs"`
DatabaseNames []string `json:"databaseNames"`
}
CloneInput is the cloneContext of instances.clone.
type ConfigProvider ¶
type ConfigProvider interface {
GetGCPSQLSettings() Settings
}
ConfigProvider extracts Cloud SQL configuration from the AppContext Config.
type ConnectSettings ¶
type ConnectSettings struct {
Kind string `json:"kind"`
ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
DatabaseVersion string `json:"databaseVersion"`
BackendType string `json:"backendType"`
Region string `json:"region"`
Endpoint string `json:"gopherstackEndpoint,omitempty"`
IPAddresses []IPMapping `json:"ipAddresses,omitempty"`
}
ConnectSettings is the connect.get response.
type Database ¶
type Database struct {
Kind string `json:"kind"`
Name string `json:"name"`
Instance string `json:"instance"`
Project string `json:"project"`
Charset string `json:"charset,omitempty"`
Collation string `json:"collation,omitempty"`
Etag string `json:"etag"`
SelfLink string `json:"selfLink"`
System bool `json:"-"`
}
Database is the sql#database resource.
type DatabaseInput ¶
type DatabaseInput struct {
Name string `json:"name"`
Charset string `json:"charset"`
Collation string `json:"collation"`
}
DatabaseInput is the writable part of sql#database.
type DumpOptions ¶
DumpOptions tunes a dump. Markers prefixes each database with a switch line; Portable drops ownership and privileges so the file loads on an instance that lacks the original roles.
type Engine ¶
type Engine interface {
// Endpoint is the host and published port clients connect to.
Endpoint() (string, int)
CreateDatabase(ctx context.Context, name, charset, collation string) error
DropDatabase(ctx context.Context, name string) error
ListDatabases(ctx context.Context) ([]string, error)
UpsertUser(ctx context.Context, u UserSpec) error
DropUser(ctx context.Context, name, host string) error
// Restart applies flags (persisted in the data directory) and restarts the database.
Restart(ctx context.Context, flags []Flag) error
Stop(ctx context.Context) error
Start(ctx context.Context) error
// Dump returns a logical SQL dump of dbs.
Dump(ctx context.Context, dbs []string, opts DumpOptions) ([]byte, error)
// Restore runs a SQL file; db is the default database when the file carries no switch lines.
Restore(ctx context.Context, db string, data []byte) error
Query(ctx context.Context, db, query string) ([][]string, error)
InsertRows(ctx context.Context, db, table string, columns []string, rows [][]string) error
Close(ctx context.Context)
}
Engine is one running database. Methods are safe for sequential use per instance.
type ExportInput ¶
type ExportInput struct {
CSV *struct{ SelectQuery string } `json:"csvExportOptions"`
FileType string `json:"fileType"`
URI string `json:"uri"`
Databases []string `json:"databases"`
}
ExportInput is the exportContext of instances.export.
type FlagInfo ¶
type FlagInfo struct {
Name string `json:"name"`
Type string `json:"type"`
Kind string `json:"kind"`
MinValue string `json:"minValue,omitempty"`
MaxValue string `json:"maxValue,omitempty"`
AppliesTo []string `json:"appliesTo"`
AllowedStringValues []string `json:"allowedStringValues,omitempty"`
RequiresRestart bool `json:"requiresRestart"`
}
FlagInfo is one entry of flags.list.
type Handler ¶
type Handler struct {
Backend *InMemoryBackend
Port int
// contains filtered or unexported fields
}
Handler serves the Cloud SQL Admin REST API.
func NewHandler ¶
func NewHandler(backend *InMemoryBackend) *Handler
NewHandler creates a Handler; callers override Port from Settings.
func (*Handler) ExtractOperation ¶
ExtractOperation returns the operation name for metrics.
func (*Handler) ExtractResource ¶
ExtractResource returns project[/instance] for metrics.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations lists the supported operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler for all Cloud SQL requests.
func (*Handler) MatchPriority ¶
MatchPriority is irrelevant because RouteMatcher never matches.
func (*Handler) RouteMatcher ¶
RouteMatcher never matches: Cloud SQL runs on its own listener.
type ImportInput ¶
type ImportInput struct {
CSV *struct {
Table string `json:"table"`
Columns []string `json:"columns"`
} `json:"csvImportOptions"`
FileType string `json:"fileType"`
URI string `json:"uri"`
Database string `json:"database"`
}
ImportInput is the importContext of instances.import.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend holds all Cloud SQL state under one lock.
func NewInMemoryBackend ¶
func NewInMemoryBackend() *InMemoryBackend
NewInMemoryBackend creates an empty backend without a database launcher (state-only instances).
func (*InMemoryBackend) CancelOperation ¶
func (b *InMemoryBackend) CancelOperation(project, name string) error
CancelOperation cancels an operation that has not started; running or finished operations are unchanged.
func (*InMemoryBackend) CloneInstance ¶
func (b *InMemoryBackend) CloneInstance(project, instance string, in CloneInput) (*Operation, error)
CloneInstance creates a new instance with the settings, accounts and data of the source.
func (*InMemoryBackend) Close ¶
func (b *InMemoryBackend) Close()
Close stops every engine and releases the runtime client.
func (*InMemoryBackend) DeleteBackupRun ¶
func (b *InMemoryBackend) DeleteBackupRun(project, instance, id string) (*Operation, error)
DeleteBackupRun removes a backup run.
func (*InMemoryBackend) DeleteDatabase ¶
func (b *InMemoryBackend) DeleteDatabase(project, instance, name string) (*Operation, error)
DeleteDatabase drops a database.
func (*InMemoryBackend) DeleteInstance ¶
func (b *InMemoryBackend) DeleteInstance(project, name string) (*Operation, error)
DeleteInstance removes an instance and its engine.
func (*InMemoryBackend) DeleteSslCert ¶
func (b *InMemoryBackend) DeleteSslCert(project, instance, fp string) (*Operation, error)
DeleteSslCert revokes a client certificate.
func (*InMemoryBackend) DeleteUser ¶
func (b *InMemoryBackend) DeleteUser(project, instance, name, host string) (*Operation, error)
DeleteUser drops an account.
func (*InMemoryBackend) Drain ¶
func (b *InMemoryBackend) Drain()
Drain blocks until every queued operation has finished.
func (*InMemoryBackend) EphemeralCert ¶
func (b *InMemoryBackend) EphemeralCert(project, instance, publicKey, validDuration string) (*SslCert, error)
EphemeralCert signs a short-lived client certificate for a caller supplied public key.
func (*InMemoryBackend) ExportInstance ¶
func (b *InMemoryBackend) ExportInstance( project, instance string, in ExportInput, raw map[string]any, ) (*Operation, error)
ExportInstance writes a SQL dump or CSV query result to object storage.
func (*InMemoryBackend) GetBackupRun ¶
func (b *InMemoryBackend) GetBackupRun(project, instance, id string) (*BackupRun, error)
GetBackupRun returns a backup run.
func (*InMemoryBackend) GetConnectSettings ¶
func (b *InMemoryBackend) GetConnectSettings(project, instance string) (*ConnectSettings, error)
GetConnectSettings returns what a client needs to reach the instance.
func (*InMemoryBackend) GetDatabase ¶
func (b *InMemoryBackend) GetDatabase(project, instance, name string) (*Database, error)
GetDatabase returns a database.
func (*InMemoryBackend) GetInstance ¶
func (b *InMemoryBackend) GetInstance(project, name string) (*Instance, error)
GetInstance returns an instance.
func (*InMemoryBackend) GetOperation ¶
func (b *InMemoryBackend) GetOperation(project, name string) (*Operation, error)
GetOperation returns an operation.
func (*InMemoryBackend) GetSslCert ¶
func (b *InMemoryBackend) GetSslCert(project, instance, fp string) (*SslCert, error)
GetSslCert returns a client certificate by fingerprint.
func (*InMemoryBackend) GetUser ¶
func (b *InMemoryBackend) GetUser(project, instance, name, host string) (*User, error)
GetUser returns an account.
func (*InMemoryBackend) ImportInstance ¶
func (b *InMemoryBackend) ImportInstance( project, instance string, in ImportInput, raw map[string]any, ) (*Operation, error)
ImportInstance loads a SQL file or CSV from object storage.
func (*InMemoryBackend) InsertBackupRun ¶
func (b *InMemoryBackend) InsertBackupRun(project, instance, description string) (*Operation, error)
InsertBackupRun takes an on-demand logical backup of every user database.
func (*InMemoryBackend) InsertDatabase ¶
func (b *InMemoryBackend) InsertDatabase(project, instance string, in DatabaseInput) (*Operation, error)
InsertDatabase creates a database.
func (*InMemoryBackend) InsertInstance ¶
func (b *InMemoryBackend) InsertInstance(project string, in InstanceInput) (*Operation, error)
InsertInstance creates an instance and starts its engine.
func (*InMemoryBackend) InsertSslCert ¶
func (b *InMemoryBackend) InsertSslCert(project, instance, commonName string) (*CertInsertResult, error)
InsertSslCert issues a client certificate and private key.
func (*InMemoryBackend) InsertUser ¶
func (b *InMemoryBackend) InsertUser(project, instance string, in UserInput) (*Operation, error)
InsertUser creates a database account.
func (*InMemoryBackend) ListBackupRuns ¶
func (b *InMemoryBackend) ListBackupRuns(project, instance string) ([]*BackupRun, error)
ListBackupRuns lists backup runs, newest first.
func (*InMemoryBackend) ListDatabases ¶
func (b *InMemoryBackend) ListDatabases(project, instance string) ([]*Database, error)
ListDatabases lists the databases of an instance sorted by name.
func (*InMemoryBackend) ListInstances ¶
ListInstances lists the instances of a project sorted by name.
func (*InMemoryBackend) ListOperations ¶
func (b *InMemoryBackend) ListOperations(project, instance, token string, limit int) page.Page[*Operation]
ListOperations lists operations of a project, newest first, optionally of one instance.
func (*InMemoryBackend) ListSslCerts ¶
func (b *InMemoryBackend) ListSslCerts(project, instance string) ([]*SslCert, error)
ListSslCerts lists client certificates by creation time.
func (*InMemoryBackend) ListUsers ¶
func (b *InMemoryBackend) ListUsers(project, instance string) ([]*User, error)
ListUsers lists the accounts of an instance sorted by name and host.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset removes every instance and stops its engine.
func (*InMemoryBackend) RestartInstance ¶
func (b *InMemoryBackend) RestartInstance(project, name string) (*Operation, error)
RestartInstance restarts the engine, applying the configured flags.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a snapshot and relaunches the engines of its instances.
func (*InMemoryBackend) RestoreBackup ¶
func (b *InMemoryBackend) RestoreBackup(project, instance string, in RestoreBackupInput) (*Operation, error)
RestoreBackup replaces the databases of the target instance with a backup of the same engine family.
func (*InMemoryBackend) SetLauncher ¶
func (b *InMemoryBackend) SetLauncher(l Launcher)
SetLauncher wires the database engine source; nil keeps instances state-only.
func (*InMemoryBackend) SetObjectStore ¶
func (b *InMemoryBackend) SetObjectStore(o ObjectStore)
SetObjectStore wires the object store export and import read and write.
func (*InMemoryBackend) SetRunContext ¶
func (b *InMemoryBackend) SetRunContext(parent context.Context)
SetRunContext derives the context engines run under; cancelling parent aborts launches in flight.
func (*InMemoryBackend) SetStartupTimeout ¶
func (b *InMemoryBackend) SetStartupTimeout(d time.Duration)
SetStartupTimeout bounds how long an engine launch may take.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state. Engine data is not part of it.
func (*InMemoryBackend) UpdateDatabase ¶
func (b *InMemoryBackend) UpdateDatabase(project, instance, name string, in DatabaseInput) (*Operation, error)
UpdateDatabase accepts a patch or update that leaves the immutable charset and collation unchanged.
func (*InMemoryBackend) UpdateInstance ¶
func (b *InMemoryBackend) UpdateInstance(project, name string, in InstanceInput, replace bool) (*Operation, error)
UpdateInstance patches (merge) or replaces (PUT) the settings of an instance.
func (*InMemoryBackend) UpdateUser ¶
func (b *InMemoryBackend) UpdateUser(project, instance, name, host string, in UserInput) (*Operation, error)
UpdateUser changes the password and policy of an account.
type Instance ¶
type Instance struct {
Settings map[string]any `json:"settings,omitempty"`
ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
Kind string `json:"kind"`
State string `json:"state"`
DatabaseVersion string `json:"databaseVersion"`
Etag string `json:"etag"`
InstanceType string `json:"instanceType"`
Project string `json:"project"`
ServiceAccountEmailAddress string `json:"serviceAccountEmailAddress,omitempty"`
BackendType string `json:"backendType"`
SelfLink string `json:"selfLink"`
ConnectionName string `json:"connectionName"`
Name string `json:"name"`
Region string `json:"region"`
GceZone string `json:"gceZone,omitempty"`
CreateTime string `json:"createTime"`
MaintenanceVersion string `json:"maintenanceVersion,omitempty"`
SQLNetworkArchitecture string `json:"sqlNetworkArchitecture,omitempty"`
GopherstackEndpoint string `json:"gopherstackEndpoint,omitempty"`
IPAddresses []IPMapping `json:"ipAddresses,omitempty"`
}
Instance is the sql#instance resource.
type InstanceInput ¶
type InstanceInput struct {
Settings map[string]any `json:"settings"`
Name string `json:"name"`
Region string `json:"region"`
DatabaseVersion string `json:"databaseVersion"`
RootPassword string `json:"rootPassword"`
InstanceType string `json:"instanceType"`
MasterInstanceName string `json:"masterInstanceName"`
MaintenanceVersion string `json:"maintenanceVersion"`
}
InstanceInput is the writable part of sql#instance.
type LaunchSpec ¶
LaunchSpec describes the engine of one instance.
type Launcher ¶
type Launcher interface {
Launch(ctx context.Context, spec LaunchSpec) (Engine, error)
}
Launcher starts engines.
type ObjectStore ¶
type ObjectStore interface {
ReadObject(bucket, name string) ([]byte, error)
WriteObject(bucket, name string, data []byte, contentType string) error
}
ObjectStore is the object storage export and import files live in (the GCS emulator).
type Operation ¶
type Operation struct {
Error *OperationErrors `json:"error,omitempty"`
ExportContext map[string]any `json:"exportContext,omitempty"`
ImportContext map[string]any `json:"importContext,omitempty"`
BackupContext map[string]any `json:"backupContext,omitempty"`
Kind string `json:"kind"`
Name string `json:"name"`
OperationType string `json:"operationType"`
Status string `json:"status"`
TargetID string `json:"targetId"`
TargetLink string `json:"targetLink"`
TargetProject string `json:"targetProject"`
SelfLink string `json:"selfLink"`
User string `json:"user,omitempty"`
InsertTime string `json:"insertTime"`
StartTime string `json:"startTime,omitempty"`
EndTime string `json:"endTime,omitempty"`
// contains filtered or unexported fields
}
Operation is the sql#operation resource.
type OperationError ¶
type OperationError struct {
Kind string `json:"kind"`
Code string `json:"code"`
Message string `json:"message"`
}
OperationError is one error of a failed operation.
type OperationErrors ¶
type OperationErrors struct {
Kind string `json:"kind"`
Errors []OperationError `json:"errors"`
}
OperationErrors is the error payload of a failed operation.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for Google Cloud SQL. It serves the Admin REST API on its own listener (see Handler.StartWorker) and never matches on the shared AWS router.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init creates the backend and handler; the port is bound in StartWorker.
type RestoreBackupInput ¶
type RestoreBackupInput struct {
BackupRunID json.Number `json:"backupRunId"`
InstanceID string `json:"instanceId"`
Project string `json:"project"`
}
RestoreBackupInput is the restoreBackupContext of instances.restoreBackup.
type Settings ¶
type Settings struct {
Engine string `` //nolint:lll // config struct tags are intentionally verbose
/* 219-byte string literal not displayed */
Port int `` //nolint:lll // config struct tags are intentionally verbose
/* 208-byte string literal not displayed */
StartupTimeout time.Duration `` //nolint:lll // config struct tags are intentionally verbose
/* 194-byte string literal not displayed */
}
Settings holds service-level configuration, embedded in the root CLI command as CLI.GCPSQL.
func DefaultSettings ¶
func DefaultSettings() Settings
DefaultSettings returns the settings used when no ConfigProvider is available.
type SslCert ¶
type SslCert struct {
Kind string `json:"kind"`
CertSerialNumber string `json:"certSerialNumber,omitempty"`
Cert string `json:"cert,omitempty"`
CommonName string `json:"commonName,omitempty"`
Sha1Fingerprint string `json:"sha1Fingerprint,omitempty"`
Instance string `json:"instance,omitempty"`
CreateTime string `json:"createTime,omitempty"`
ExpirationTime string `json:"expirationTime,omitempty"`
SelfLink string `json:"selfLink,omitempty"`
}
SslCert is a server CA, client or ephemeral certificate.
type TierInfo ¶
type TierInfo struct {
Tier string `json:"tier"`
Kind string `json:"kind"`
RAM string `json:"RAM"`
DiskQuota string `json:"DiskQuota"`
Region []string `json:"region"`
}
TierInfo is one entry of tiers.list.
type User ¶
type User struct {
PasswordPolicy map[string]any `json:"passwordPolicy,omitempty"`
Kind string `json:"kind"`
Name string `json:"name"`
Host string `json:"host,omitempty"`
Instance string `json:"instance"`
Project string `json:"project"`
Type string `json:"type,omitempty"`
Etag string `json:"etag"`
DatabaseRoles []string `json:"databaseRoles,omitempty"`
}
User is the sql#user resource; the password is never serialised.