Documentation
¶
Index ¶
- Constants
- func Definition() addon.AddonDefinition
- func IsSharedVariant(variantName string) bool
- func RegisterDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *resultCapture) error
- func RegisterDeprovisionDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework) error
- func RegisterDeprovisionSharedSaga(registry *saga.Registry, fw *addon.ProviderFramework) error
- func RegisterEnsureSharedServerSaga(registry *saga.Registry, fw *addon.ProviderFramework) error
- func RegisterRotateDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *rotateCapture) error
- func RegisterRotateSharedSuperuserSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *rotateCapture) error
- func RegisterRotateSharedUserSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *rotateCapture) error
- func RegisterSharedSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *resultCapture) error
- func UndoActivateSharedServer(ctx context.Context, in ActivateSharedServerIn, out ActivateSharedServerOut) error
- func UndoAlterDedicatedUserPassword(ctx context.Context, in AlterDedicatedUserPasswordIn, ...) error
- func UndoAlterSharedUserPassword(ctx context.Context, in AlterSharedUserPasswordIn, ...) error
- func UndoAlterSuperuserPassword(ctx context.Context, in AlterSuperuserPasswordIn, ...) error
- func UndoBackfillSuperuserDiskName(ctx context.Context, in BackfillSuperuserDiskNameIn, ...) error
- func UndoBuildDedicatedResult(ctx context.Context, in BuildDedicatedResultIn, out BuildDedicatedResultOut) error
- func UndoBuildDedicatedRotationResult(ctx context.Context, in BuildDedicatedRotationResultIn, ...) error
- func UndoBuildSharedResult(ctx context.Context, in BuildSharedResultIn, out BuildSharedResultOut) error
- func UndoBuildUserRotationResult(ctx context.Context, in BuildUserRotationResultIn, ...) error
- func UndoCaptureDedicatedConnInfo(ctx context.Context, in CaptureDedicatedConnInfoIn, ...) error
- func UndoCaptureOldUserPassword(ctx context.Context, in CaptureOldUserPasswordIn, ...) error
- func UndoCaptureSuperuserResult(ctx context.Context, in CaptureSuperuserResultIn, ...) error
- func UndoCleanupSharedServer(ctx context.Context, in CleanupSharedServerIn, out CleanupSharedServerOut) error
- func UndoCreateDedicatedPool(ctx context.Context, in CreateDedicatedPoolIn, out CreateDedicatedPoolOut) error
- func UndoCreatePostgresServer(ctx context.Context, in CreatePostgresServerIn, out CreatePostgresServerOut) error
- func UndoCreateSharedDatabase(ctx context.Context, in CreateSharedDatabaseIn, out CreateSharedDatabaseOut) error
- func UndoCreateSharedPool(ctx context.Context, in CreateSharedPoolIn, out CreateSharedPoolOut) error
- func UndoCreateSharedServerEntity(ctx context.Context, in CreateSharedServerEntityIn, ...) error
- func UndoCreateSharedUser(ctx context.Context, in CreateSharedUserIn, out CreateSharedUserOut) error
- func UndoDecodeDedicatedAttrs(ctx context.Context, in DecodeDedicatedAttrsIn, out DecodeDedicatedAttrsOut) error
- func UndoDecodeSharedAttrs(ctx context.Context, in DecodeSharedAttrsIn, out DecodeSharedAttrsOut) error
- func UndoDeleteDedicatedServerEntity(ctx context.Context, in DeleteDedicatedServerEntityIn, ...) error
- func UndoDropSharedDatabase(ctx context.Context, in DropSharedDatabaseIn, out DropSharedDatabaseOut) error
- func UndoDropSharedUser(ctx context.Context, in DropSharedUserIn, out DropSharedUserOut) error
- func UndoFindOrCreateSharedServer(ctx context.Context, in FindOrCreateSharedServerIn, ...) error
- func UndoGenerateCredentials(ctx context.Context, in GenerateCredentialsIn, out GenerateCredentialsOut) error
- func UndoGenerateSharedCredentials(ctx context.Context, in GenerateSharedCredentialsIn, ...) error
- func UndoLoadDedicatedRotationState(ctx context.Context, in LoadDedicatedRotationStateIn, ...) error
- func UndoLookupDedicatedServer(ctx context.Context, in LookupDedicatedServerIn, out LookupDedicatedServerOut) error
- func UndoLookupSharedServer(ctx context.Context, in LookupSharedServerIn, out LookupSharedServerOut) error
- func UndoTerminateConnections(ctx context.Context, in TerminateConnectionsIn, out TerminateConnectionsOut) error
- func UndoUpdateDedicatedEntity(ctx context.Context, in UpdateDedicatedEntityIn, out UpdateDedicatedEntityOut) error
- func UndoUpdateDedicatedServer(ctx context.Context, in UpdateDedicatedServerIn, out UpdateDedicatedServerOut) error
- func UndoUpdateSuperuserEntity(ctx context.Context, in UpdateSuperuserEntityIn, out UpdateSuperuserEntityOut) error
- type ActivateSharedServerIn
- type ActivateSharedServerOut
- type AlterDedicatedUserPasswordIn
- type AlterDedicatedUserPasswordOut
- type AlterSharedUserPasswordIn
- type AlterSharedUserPasswordOut
- type AlterSuperuserPasswordIn
- type AlterSuperuserPasswordOut
- type BackfillSuperuserDiskNameIn
- type BackfillSuperuserDiskNameOut
- type BuildDedicatedResultIn
- type BuildDedicatedResultOut
- type BuildDedicatedRotationResultIn
- type BuildDedicatedRotationResultOut
- type BuildSharedResultIn
- type BuildSharedResultOut
- type BuildUserRotationResultIn
- type BuildUserRotationResultOut
- type CaptureDedicatedConnInfoIn
- type CaptureDedicatedConnInfoOut
- type CaptureOldUserPasswordIn
- type CaptureOldUserPasswordOut
- type CaptureSuperuserResultIn
- type CaptureSuperuserResultOut
- type CleanupSharedServerIn
- type CleanupSharedServerOut
- type CreateDedicatedPoolIn
- type CreateDedicatedPoolOut
- type CreatePostgresServerIn
- type CreatePostgresServerOut
- type CreateSharedDatabaseIn
- type CreateSharedDatabaseOut
- type CreateSharedPoolIn
- type CreateSharedPoolOut
- type CreateSharedServerEntityIn
- type CreateSharedServerEntityOut
- type CreateSharedUserIn
- type CreateSharedUserOut
- type DecodeDedicatedAttrsIn
- type DecodeDedicatedAttrsOut
- type DecodeSharedAttrsIn
- type DecodeSharedAttrsOut
- type DeleteDedicatedServerEntityIn
- type DeleteDedicatedServerEntityOut
- type DropSharedDatabaseIn
- type DropSharedDatabaseOut
- type DropSharedUserIn
- type DropSharedUserOut
- type FindOrCreateSharedServerIn
- type FindOrCreateSharedServerOut
- type GenerateCredentialsIn
- type GenerateCredentialsOut
- type GenerateSharedCredentialsIn
- type GenerateSharedCredentialsOut
- type LoadDedicatedRotationStateIn
- type LoadDedicatedRotationStateOut
- type LookupDedicatedServerIn
- type LookupDedicatedServerOut
- type LookupSharedServerIn
- type LookupSharedServerOut
- type Provider
- func (p *Provider) Deprovision(ctx context.Context, assoc addon.AddonAssociation) error
- func (p *Provider) Provision(ctx context.Context, app addon.App, variant addon.Variant) (*addon.ProvisionResult, error)
- func (p *Provider) RotateCredential(ctx context.Context, assoc addon.AddonAssociation, ...) (*addon.RotationResult, error)
- type TerminateConnectionsIn
- type TerminateConnectionsOut
- type UpdateDedicatedEntityIn
- type UpdateDedicatedEntityOut
- type UpdateDedicatedServerIn
- type UpdateDedicatedServerOut
- type UpdateSuperuserEntityIn
- type UpdateSuperuserEntityOut
Constants ¶
const ( AddonName = "miren-postgresql" BaseImage = "oci.miren.cloud/postgres" DefaultVersion = "18" )
const ( ConfigStorage = "storage" )
Variant configuration keys
Variables ¶
This section is empty.
Functions ¶
func Definition ¶
func Definition() addon.AddonDefinition
Definition returns the addon definition for PostgreSQL.
func IsSharedVariant ¶
IsSharedVariant returns true if the variant is a shared-server variant.
func RegisterDedicatedSaga ¶
func RegisterDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *resultCapture) error
RegisterDedicatedSaga registers the dedicated PostgreSQL provisioning saga.
func RegisterDeprovisionDedicatedSaga ¶
func RegisterDeprovisionDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework) error
RegisterDeprovisionDedicatedSaga registers the dedicated deprovisioning saga.
func RegisterDeprovisionSharedSaga ¶
func RegisterDeprovisionSharedSaga(registry *saga.Registry, fw *addon.ProviderFramework) error
RegisterDeprovisionSharedSaga registers the shared deprovisioning saga.
func RegisterEnsureSharedServerSaga ¶
func RegisterEnsureSharedServerSaga(registry *saga.Registry, fw *addon.ProviderFramework) error
RegisterEnsureSharedServerSaga registers the saga that creates the shared PostgreSQL server infrastructure (entity, pool, service).
func RegisterRotateDedicatedSaga ¶ added in v0.12.1
func RegisterRotateDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *rotateCapture) error
RegisterRotateDedicatedSaga registers the dedicated PostgreSQL rotation saga.
func RegisterRotateSharedSuperuserSaga ¶ added in v0.12.1
func RegisterRotateSharedSuperuserSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *rotateCapture) error
RegisterRotateSharedSuperuserSaga registers the superuser rotation saga.
func RegisterRotateSharedUserSaga ¶ added in v0.12.1
func RegisterRotateSharedUserSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *rotateCapture) error
RegisterRotateSharedUserSaga registers the per-app user rotation saga.
func RegisterSharedSaga ¶
func RegisterSharedSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *resultCapture) error
RegisterSharedSaga registers the shared PostgreSQL provisioning saga. This also registers the nested ensure-shared-server saga in the same registry.
func UndoActivateSharedServer ¶
func UndoActivateSharedServer(ctx context.Context, in ActivateSharedServerIn, out ActivateSharedServerOut) error
func UndoAlterDedicatedUserPassword ¶ added in v0.12.1
func UndoAlterDedicatedUserPassword(ctx context.Context, in AlterDedicatedUserPasswordIn, out AlterDedicatedUserPasswordOut) error
func UndoAlterSharedUserPassword ¶ added in v0.12.1
func UndoAlterSharedUserPassword(ctx context.Context, in AlterSharedUserPasswordIn, out AlterSharedUserPasswordOut) error
func UndoAlterSuperuserPassword ¶ added in v0.12.1
func UndoAlterSuperuserPassword(ctx context.Context, in AlterSuperuserPasswordIn, out AlterSuperuserPasswordOut) error
func UndoBackfillSuperuserDiskName ¶ added in v0.12.1
func UndoBackfillSuperuserDiskName(ctx context.Context, in BackfillSuperuserDiskNameIn, out BackfillSuperuserDiskNameOut) error
func UndoBuildDedicatedResult ¶
func UndoBuildDedicatedResult(ctx context.Context, in BuildDedicatedResultIn, out BuildDedicatedResultOut) error
func UndoBuildDedicatedRotationResult ¶ added in v0.12.1
func UndoBuildDedicatedRotationResult(ctx context.Context, in BuildDedicatedRotationResultIn, out BuildDedicatedRotationResultOut) error
func UndoBuildSharedResult ¶
func UndoBuildSharedResult(ctx context.Context, in BuildSharedResultIn, out BuildSharedResultOut) error
func UndoBuildUserRotationResult ¶ added in v0.12.1
func UndoBuildUserRotationResult(ctx context.Context, in BuildUserRotationResultIn, out BuildUserRotationResultOut) error
func UndoCaptureDedicatedConnInfo ¶ added in v0.12.1
func UndoCaptureDedicatedConnInfo(ctx context.Context, in CaptureDedicatedConnInfoIn, out CaptureDedicatedConnInfoOut) error
func UndoCaptureOldUserPassword ¶ added in v0.12.1
func UndoCaptureOldUserPassword(ctx context.Context, in CaptureOldUserPasswordIn, out CaptureOldUserPasswordOut) error
func UndoCaptureSuperuserResult ¶ added in v0.12.1
func UndoCaptureSuperuserResult(ctx context.Context, in CaptureSuperuserResultIn, out CaptureSuperuserResultOut) error
func UndoCleanupSharedServer ¶
func UndoCleanupSharedServer(ctx context.Context, in CleanupSharedServerIn, out CleanupSharedServerOut) error
func UndoCreateDedicatedPool ¶
func UndoCreateDedicatedPool(ctx context.Context, in CreateDedicatedPoolIn, out CreateDedicatedPoolOut) error
func UndoCreatePostgresServer ¶
func UndoCreatePostgresServer(ctx context.Context, in CreatePostgresServerIn, out CreatePostgresServerOut) error
func UndoCreateSharedDatabase ¶
func UndoCreateSharedDatabase(ctx context.Context, in CreateSharedDatabaseIn, out CreateSharedDatabaseOut) error
func UndoCreateSharedPool ¶
func UndoCreateSharedPool(ctx context.Context, in CreateSharedPoolIn, out CreateSharedPoolOut) error
func UndoCreateSharedServerEntity ¶
func UndoCreateSharedServerEntity(ctx context.Context, in CreateSharedServerEntityIn, out CreateSharedServerEntityOut) error
func UndoCreateSharedUser ¶
func UndoCreateSharedUser(ctx context.Context, in CreateSharedUserIn, out CreateSharedUserOut) error
func UndoDecodeDedicatedAttrs ¶
func UndoDecodeDedicatedAttrs(ctx context.Context, in DecodeDedicatedAttrsIn, out DecodeDedicatedAttrsOut) error
func UndoDecodeSharedAttrs ¶
func UndoDecodeSharedAttrs(ctx context.Context, in DecodeSharedAttrsIn, out DecodeSharedAttrsOut) error
func UndoDeleteDedicatedServerEntity ¶
func UndoDeleteDedicatedServerEntity(ctx context.Context, in DeleteDedicatedServerEntityIn, out DeleteDedicatedServerEntityOut) error
func UndoDropSharedDatabase ¶
func UndoDropSharedDatabase(ctx context.Context, in DropSharedDatabaseIn, out DropSharedDatabaseOut) error
func UndoDropSharedUser ¶
func UndoDropSharedUser(ctx context.Context, in DropSharedUserIn, out DropSharedUserOut) error
func UndoFindOrCreateSharedServer ¶
func UndoFindOrCreateSharedServer(ctx context.Context, in FindOrCreateSharedServerIn, out FindOrCreateSharedServerOut) error
func UndoGenerateCredentials ¶
func UndoGenerateCredentials(ctx context.Context, in GenerateCredentialsIn, out GenerateCredentialsOut) error
func UndoGenerateSharedCredentials ¶
func UndoGenerateSharedCredentials(ctx context.Context, in GenerateSharedCredentialsIn, out GenerateSharedCredentialsOut) error
func UndoLoadDedicatedRotationState ¶ added in v0.12.1
func UndoLoadDedicatedRotationState(ctx context.Context, in LoadDedicatedRotationStateIn, out LoadDedicatedRotationStateOut) error
func UndoLookupDedicatedServer ¶
func UndoLookupDedicatedServer(ctx context.Context, in LookupDedicatedServerIn, out LookupDedicatedServerOut) error
func UndoLookupSharedServer ¶
func UndoLookupSharedServer(ctx context.Context, in LookupSharedServerIn, out LookupSharedServerOut) error
func UndoTerminateConnections ¶
func UndoTerminateConnections(ctx context.Context, in TerminateConnectionsIn, out TerminateConnectionsOut) error
func UndoUpdateDedicatedEntity ¶ added in v0.12.1
func UndoUpdateDedicatedEntity(ctx context.Context, in UpdateDedicatedEntityIn, out UpdateDedicatedEntityOut) error
func UndoUpdateDedicatedServer ¶
func UndoUpdateDedicatedServer(ctx context.Context, in UpdateDedicatedServerIn, out UpdateDedicatedServerOut) error
func UndoUpdateSuperuserEntity ¶ added in v0.12.1
func UndoUpdateSuperuserEntity(ctx context.Context, in UpdateSuperuserEntityIn, out UpdateSuperuserEntityOut) error
Types ¶
type ActivateSharedServerIn ¶
type ActivateSharedServerIn struct {
}
type ActivateSharedServerOut ¶
type ActivateSharedServerOut struct {
}
func ActivateSharedServer ¶
func ActivateSharedServer(ctx context.Context, in ActivateSharedServerIn) (ActivateSharedServerOut, error)
type AlterDedicatedUserPasswordIn ¶ added in v0.12.1
type AlterDedicatedUserPasswordIn struct {
DedicatedServiceHost string `saga:"dedicatedservicehost"`
DedicatedUser string `saga:"dedicateduser"`
DedicatedDatabase string `saga:"dedicateddatabase"`
DedicatedOldPassword string `saga:"dedicatedoldpassword"`
DedicatedNewPassword string `saga:"dedicatednewpassword"`
}
type AlterDedicatedUserPasswordOut ¶ added in v0.12.1
type AlterDedicatedUserPasswordOut struct {
// Edge producer: gate the entity update on the engine actually changing.
DedicatedUserAltered bool `saga:"dedicated_user_altered"`
}
func AlterDedicatedUserPassword ¶ added in v0.12.1
func AlterDedicatedUserPassword(ctx context.Context, in AlterDedicatedUserPasswordIn) (AlterDedicatedUserPasswordOut, error)
type AlterSharedUserPasswordIn ¶ added in v0.12.1
type AlterSharedUserPasswordIn struct {
}
type AlterSharedUserPasswordOut ¶ added in v0.12.1
type AlterSharedUserPasswordOut struct {
}
func AlterSharedUserPassword ¶ added in v0.12.1
func AlterSharedUserPassword(ctx context.Context, in AlterSharedUserPasswordIn) (AlterSharedUserPasswordOut, error)
type AlterSuperuserPasswordIn ¶ added in v0.12.1
type AlterSuperuserPasswordOut ¶ added in v0.12.1
type AlterSuperuserPasswordOut struct {
// Edge producer: gate the entity update on the engine actually changing.
SuperuserAltered bool `saga:"superuser_altered"`
}
func AlterSuperuserPassword ¶ added in v0.12.1
func AlterSuperuserPassword(ctx context.Context, in AlterSuperuserPasswordIn) (AlterSuperuserPasswordOut, error)
type BackfillSuperuserDiskNameIn ¶ added in v0.12.1
type BackfillSuperuserDiskNameIn struct {
}
type BackfillSuperuserDiskNameOut ¶ added in v0.12.1
type BackfillSuperuserDiskNameOut struct {
// Edge producer: the disk name must be recorded before the password changes,
// or the legacy password-derived name would be lost.
SuperuserDiskEnsured bool `saga:"superuser_disk_ensured"`
}
func BackfillSuperuserDiskName ¶ added in v0.12.1
func BackfillSuperuserDiskName(ctx context.Context, in BackfillSuperuserDiskNameIn) (BackfillSuperuserDiskNameOut, error)
type BuildDedicatedResultIn ¶
type BuildDedicatedResultOut ¶
type BuildDedicatedResultOut struct {
Done bool
}
func BuildDedicatedResult ¶
func BuildDedicatedResult(ctx context.Context, in BuildDedicatedResultIn) (BuildDedicatedResultOut, error)
type BuildDedicatedRotationResultIn ¶ added in v0.12.1
type BuildDedicatedRotationResultOut ¶ added in v0.12.1
type BuildDedicatedRotationResultOut struct {
Done bool
}
func BuildDedicatedRotationResult ¶ added in v0.12.1
func BuildDedicatedRotationResult(ctx context.Context, in BuildDedicatedRotationResultIn) (BuildDedicatedRotationResultOut, error)
type BuildSharedResultIn ¶
type BuildSharedResultIn struct {
}
type BuildSharedResultOut ¶
type BuildSharedResultOut struct {
}
func BuildSharedResult ¶
func BuildSharedResult(ctx context.Context, in BuildSharedResultIn) (BuildSharedResultOut, error)
type BuildUserRotationResultIn ¶ added in v0.12.1
type BuildUserRotationResultIn struct {
UserNewPassword string `saga:"usernewpassword"`
}
type BuildUserRotationResultOut ¶ added in v0.12.1
type BuildUserRotationResultOut struct {
Done bool
}
func BuildUserRotationResult ¶ added in v0.12.1
func BuildUserRotationResult(ctx context.Context, in BuildUserRotationResultIn) (BuildUserRotationResultOut, error)
type CaptureDedicatedConnInfoIn ¶ added in v0.12.1
type CaptureDedicatedConnInfoOut ¶ added in v0.12.1
type CaptureDedicatedConnInfoOut struct {
DedicatedUser string `saga:"dedicateduser"`
DedicatedDatabase string `saga:"dedicateddatabase"`
}
func CaptureDedicatedConnInfo ¶ added in v0.12.1
func CaptureDedicatedConnInfo(ctx context.Context, in CaptureDedicatedConnInfoIn) (CaptureDedicatedConnInfoOut, error)
CaptureDedicatedConnInfo resolves the role name and database to connect to. Provisioning records both on the association attrs (see BuildDedicatedResult), so they read straight off the entity — no dependency on a deployed app. Associations created before those attrs existed fall back to the app's active ConfigVersion, the authoritative record of what the app connects as. The password is never read here: the durable current password lives on the server entity (see LoadDedicatedRotationState), which survives even a retry that already redeployed the app onto the new secret.
type CaptureOldUserPasswordIn ¶ added in v0.12.1
type CaptureOldUserPasswordOut ¶ added in v0.12.1
type CaptureOldUserPasswordOut struct {
UserOldPassword string `saga:"useroldpassword"`
}
func CaptureOldUserPassword ¶ added in v0.12.1
func CaptureOldUserPassword(ctx context.Context, in CaptureOldUserPasswordIn) (CaptureOldUserPasswordOut, error)
type CaptureSuperuserResultIn ¶ added in v0.12.1
type CaptureSuperuserResultOut ¶ added in v0.12.1
type CaptureSuperuserResultOut struct {
Done bool
}
func CaptureSuperuserResult ¶ added in v0.12.1
func CaptureSuperuserResult(ctx context.Context, in CaptureSuperuserResultIn) (CaptureSuperuserResultOut, error)
CaptureSuperuserResult records a non-nil, empty result: rotating the superuser touches no consumer variables, so there is nothing to redeploy.
type CleanupSharedServerIn ¶
type CleanupSharedServerIn struct {
}
type CleanupSharedServerOut ¶
type CleanupSharedServerOut struct {
}
func CleanupSharedServer ¶
func CleanupSharedServer(ctx context.Context, in CleanupSharedServerIn) (CleanupSharedServerOut, error)
type CreateDedicatedPoolIn ¶
type CreateDedicatedPoolOut ¶
func CreateDedicatedPool ¶
func CreateDedicatedPool(ctx context.Context, in CreateDedicatedPoolIn) (CreateDedicatedPoolOut, error)
type CreatePostgresServerIn ¶
type CreatePostgresServerOut ¶
func CreatePostgresServer ¶
func CreatePostgresServer(ctx context.Context, in CreatePostgresServerIn) (CreatePostgresServerOut, error)
type CreateSharedDatabaseIn ¶
type CreateSharedDatabaseIn struct {
}
type CreateSharedDatabaseOut ¶
type CreateSharedDatabaseOut struct {
}
func CreateSharedDatabase ¶
func CreateSharedDatabase(ctx context.Context, in CreateSharedDatabaseIn) (CreateSharedDatabaseOut, error)
type CreateSharedPoolIn ¶
type CreateSharedPoolIn struct {
}
type CreateSharedPoolOut ¶
type CreateSharedPoolOut struct {
}
func CreateSharedPool ¶
func CreateSharedPool(ctx context.Context, in CreateSharedPoolIn) (CreateSharedPoolOut, error)
type CreateSharedServerEntityIn ¶
type CreateSharedServerEntityIn struct {
}
type CreateSharedServerEntityOut ¶
type CreateSharedServerEntityOut struct {
}
func CreateSharedServerEntity ¶
func CreateSharedServerEntity(ctx context.Context, in CreateSharedServerEntityIn) (CreateSharedServerEntityOut, error)
type CreateSharedUserIn ¶
type CreateSharedUserIn struct {
}
type CreateSharedUserOut ¶
type CreateSharedUserOut struct {
}
func CreateSharedUser ¶
func CreateSharedUser(ctx context.Context, in CreateSharedUserIn) (CreateSharedUserOut, error)
type DecodeDedicatedAttrsIn ¶
type DecodeDedicatedAttrsOut ¶
func DecodeDedicatedAttrs ¶
func DecodeDedicatedAttrs(ctx context.Context, in DecodeDedicatedAttrsIn) (DecodeDedicatedAttrsOut, error)
type DecodeSharedAttrsIn ¶
type DecodeSharedAttrsIn struct {
}
type DecodeSharedAttrsOut ¶
type DecodeSharedAttrsOut struct {
}
func DecodeSharedAttrs ¶
func DecodeSharedAttrs(ctx context.Context, in DecodeSharedAttrsIn) (DecodeSharedAttrsOut, error)
type DeleteDedicatedServerEntityOut ¶
type DeleteDedicatedServerEntityOut struct {
ServerDeleted bool
}
func DeleteDedicatedServerEntity ¶
func DeleteDedicatedServerEntity(ctx context.Context, in DeleteDedicatedServerEntityIn) (DeleteDedicatedServerEntityOut, error)
type DropSharedDatabaseIn ¶
type DropSharedDatabaseIn struct {
}
type DropSharedDatabaseOut ¶
type DropSharedDatabaseOut struct {
}
func DropSharedDatabase ¶
func DropSharedDatabase(ctx context.Context, in DropSharedDatabaseIn) (DropSharedDatabaseOut, error)
type DropSharedUserIn ¶
type DropSharedUserIn struct {
}
type DropSharedUserOut ¶
type DropSharedUserOut struct {
}
func DropSharedUser ¶
func DropSharedUser(ctx context.Context, in DropSharedUserIn) (DropSharedUserOut, error)
type FindOrCreateSharedServerIn ¶
type FindOrCreateSharedServerIn struct {
}
type FindOrCreateSharedServerOut ¶
type FindOrCreateSharedServerOut struct {
}
func FindOrCreateSharedServer ¶
func FindOrCreateSharedServer(ctx context.Context, in FindOrCreateSharedServerIn) (FindOrCreateSharedServerOut, error)
type GenerateCredentialsIn ¶
type GenerateCredentialsIn struct {
AppName string
}
type GenerateCredentialsOut ¶
type GenerateCredentialsOut struct {
Password string
DatabaseName string
Username string
ServiceName string
ServerName string
}
func GenerateCredentials ¶
func GenerateCredentials(ctx context.Context, in GenerateCredentialsIn) (GenerateCredentialsOut, error)
type GenerateSharedCredentialsIn ¶
type GenerateSharedCredentialsIn struct {
}
type GenerateSharedCredentialsOut ¶
type GenerateSharedCredentialsOut struct {
}
func GenerateSharedCredentials ¶
func GenerateSharedCredentials(ctx context.Context, in GenerateSharedCredentialsIn) (GenerateSharedCredentialsOut, error)
type LoadDedicatedRotationStateIn ¶ added in v0.12.1
type LoadDedicatedRotationStateOut ¶ added in v0.12.1
type LoadDedicatedRotationStateOut struct {
DedicatedServiceHost string `saga:"dedicatedservicehost"`
DedicatedOldPassword string `saga:"dedicatedoldpassword"`
}
func LoadDedicatedRotationState ¶ added in v0.12.1
func LoadDedicatedRotationState(ctx context.Context, in LoadDedicatedRotationStateIn) (LoadDedicatedRotationStateOut, error)
type LookupDedicatedServerIn ¶
type LookupDedicatedServerOut ¶
type LookupDedicatedServerOut struct {
DedicatedServiceID entity.Id
DedicatedPoolID entity.Id
DedicatedServerName string
}
func LookupDedicatedServer ¶
func LookupDedicatedServer(ctx context.Context, in LookupDedicatedServerIn) (LookupDedicatedServerOut, error)
type LookupSharedServerIn ¶
type LookupSharedServerIn struct {
}
type LookupSharedServerOut ¶
type LookupSharedServerOut struct {
}
func LookupSharedServer ¶
func LookupSharedServer(ctx context.Context, in LookupSharedServerIn) (LookupSharedServerOut, error)
type Provider ¶
type Provider struct {
dbsaga.BaseProvider
}
Provider implements the AddonProvider interface for PostgreSQL.
func NewProvider ¶
func NewProvider(fw *addon.ProviderFramework) *Provider
NewProvider creates a new PostgreSQL addon provider.
func (*Provider) Deprovision ¶
func (*Provider) RotateCredential ¶ added in v0.12.1
func (p *Provider) RotateCredential(ctx context.Context, assoc addon.AddonAssociation, credential, newSecret string) (*addon.RotationResult, error)
RotateCredential implements addon.CredentialRotator for PostgreSQL. Shared servers expose two independently-rotatable credentials:
- "" / "user" — the association's per-app database user. Rotated live with ALTER USER; the new password flows to the consuming app, which is redeployed. (Class A: no restart, no disk coupling.)
- "superuser" — the shared server's admin password. Rotated live with ALTER ROLE and recorded on the server entity. Apps never receive it, so no consumer is redeployed. (Class C: safe now that the data disk name is decoupled from this password.)
Dedicated servers have a single credential: the app's own role, which is the instance's bootstrap superuser (POSTGRES_USER) and the value consumers embed. It rotates live with ALTER ROLE — the pool never relaunches, since the env password only seeds initdb — and the new secret both flows to the app and is recorded on the server entity. (Class A + entity update.)
type TerminateConnectionsIn ¶
type TerminateConnectionsIn struct {
}
type TerminateConnectionsOut ¶
type TerminateConnectionsOut struct {
ConnectionsTerminated bool
}
func TerminateConnections ¶
func TerminateConnections(ctx context.Context, in TerminateConnectionsIn) (TerminateConnectionsOut, error)
type UpdateDedicatedEntityIn ¶ added in v0.12.1
type UpdateDedicatedEntityOut ¶ added in v0.12.1
type UpdateDedicatedEntityOut struct {
DedicatedRecorded bool
}
func UpdateDedicatedEntity ¶ added in v0.12.1
func UpdateDedicatedEntity(ctx context.Context, in UpdateDedicatedEntityIn) (UpdateDedicatedEntityOut, error)
type UpdateDedicatedServerIn ¶
type UpdateDedicatedServerOut ¶
type UpdateDedicatedServerOut struct {
Updated bool
}
func UpdateDedicatedServer ¶
func UpdateDedicatedServer(ctx context.Context, in UpdateDedicatedServerIn) (UpdateDedicatedServerOut, error)
type UpdateSuperuserEntityIn ¶ added in v0.12.1
type UpdateSuperuserEntityOut ¶ added in v0.12.1
type UpdateSuperuserEntityOut struct {
SuperuserRecorded bool
}
func UpdateSuperuserEntity ¶ added in v0.12.1
func UpdateSuperuserEntity(ctx context.Context, in UpdateSuperuserEntityIn) (UpdateSuperuserEntityOut, error)