mysql

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddonName      = "miren-mysql"
	BaseImage      = "oci.miren.cloud/mysql"
	DefaultVersion = "9"
)
View Source
const (
	ConfigStorage = "storage"
	ConfigShared  = "shared"
)

Variables

This section is empty.

Functions

func Definition

func Definition() addon.AddonDefinition

func IsSharedVariant

func IsSharedVariant(variantName string) bool

func RegisterDedicatedSaga

func RegisterDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *resultCapture) error

func RegisterDeprovisionDedicatedSaga

func RegisterDeprovisionDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework) error

func RegisterDeprovisionSharedSaga

func RegisterDeprovisionSharedSaga(registry *saga.Registry, fw *addon.ProviderFramework) error

func RegisterEnsureSharedServerSaga

func RegisterEnsureSharedServerSaga(registry *saga.Registry, fw *addon.ProviderFramework) error

func RegisterSharedSaga

func RegisterSharedSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *resultCapture) error

func UndoBuildSharedResult

func UndoBuildSharedResult(ctx context.Context, in BuildSharedResultIn, out BuildSharedResultOut) error

func UndoCreateMysqlServer

func UndoCreateMysqlServer(ctx context.Context, in CreateMysqlServerIn, out CreateMysqlServerOut) error

func UndoCreateSharedPool

func UndoCreateSharedPool(ctx context.Context, in CreateSharedPoolIn, out CreateSharedPoolOut) error

func UndoCreateSharedUser

func UndoCreateSharedUser(ctx context.Context, in CreateSharedUserIn, out CreateSharedUserOut) error

func UndoDecodeSharedAttrs

func UndoDecodeSharedAttrs(ctx context.Context, in DecodeSharedAttrsIn, out DecodeSharedAttrsOut) error

func UndoDropSharedUser

func UndoDropSharedUser(ctx context.Context, in DropSharedUserIn, out DropSharedUserOut) error

Types

type ActivateSharedServerIn

type ActivateSharedServerIn struct {
	ServerID     entity.Id
	PoolID       entity.Id
	ServiceID    entity.Id
	RootPassword string
	ServiceHost  string
}

type ActivateSharedServerOut

type ActivateSharedServerOut struct {
	Activated bool
}

type BuildDedicatedResultIn

type BuildDedicatedResultIn struct {
	ServiceHost  string    `saga:"servicehost"`
	Username     string    `saga:"username"`
	Password     string    `saga:"password"`
	DatabaseName string    `saga:"databasename"`
	ServerID     entity.Id `saga:"serverid"`
}

type BuildDedicatedResultOut

type BuildDedicatedResultOut struct {
	Done bool
}

type BuildSharedResultIn

type BuildSharedResultIn struct {
	ServerID           entity.Id
	ServiceHost        string
	SharedDatabaseName string
	SharedUsername     string
	SharedPassword     string
}

type BuildSharedResultOut

type BuildSharedResultOut struct {
	Done bool
}

type CleanupSharedServerIn

type CleanupSharedServerIn struct {
	SharedServerRef    entity.Id
	SharedServiceRef   entity.Id
	SharedPoolRef      entity.Id
	SharedRootPassword string
	RemainingCount     int64
}

type CleanupSharedServerOut

type CleanupSharedServerOut struct {
	CleanedUp bool
}

type CreateDedicatedPoolIn

type CreateDedicatedPoolIn struct {
	ServerName    string            `saga:"servername"`
	AppName       string            `saga:"appname"`
	DatabaseName  string            `saga:"databasename"`
	Username      string            `saga:"username"`
	Password      string            `saga:"password"`
	RootPassword  string            `saga:"rootpassword"`
	VariantConfig map[string]string `saga:"variantconfig"`
}

type CreateDedicatedPoolOut

type CreateDedicatedPoolOut struct {
	PoolID entity.Id `saga:"poolid"`
}

type CreateMysqlServerIn

type CreateMysqlServerIn struct {
	ServerName   string `saga:"servername"`
	VariantName  string `saga:"variantname"`
	RootPassword string `saga:"rootpassword"`
}

type CreateMysqlServerOut

type CreateMysqlServerOut struct {
	ServerID entity.Id `saga:"serverid"`
}

type CreateSharedDatabaseIn

type CreateSharedDatabaseIn struct {
	ServiceHost        string
	RootPassword       string
	SharedDatabaseName string
	SharedUsername     string
}

type CreateSharedDatabaseOut

type CreateSharedDatabaseOut struct {
	DatabaseCreated bool
}

type CreateSharedPoolIn

type CreateSharedPoolIn struct {
	RootPassword  string
	VariantConfig map[string]string
}

type CreateSharedPoolOut

type CreateSharedPoolOut struct {
	PoolID entity.Id
}

type CreateSharedServerEntityIn

type CreateSharedServerEntityIn struct {
	RootPassword  string
	VariantConfig map[string]string
}

type CreateSharedServerEntityOut

type CreateSharedServerEntityOut struct {
	ServerID entity.Id
}

type CreateSharedUserIn

type CreateSharedUserIn struct {
	ServiceHost             string
	RootPassword            string
	GeneratedSharedUsername string
	SharedPassword          string
}

type CreateSharedUserOut

type CreateSharedUserOut struct {
	SharedUsername string
}

type DecodeDedicatedAttrsIn

type DecodeDedicatedAttrsIn struct {
	AssocEntity *entity.Entity `saga:"assocentity"`
}

type DecodeDedicatedAttrsOut

type DecodeDedicatedAttrsOut struct {
	DedicatedServerID entity.Id `saga:"dedicatedserverid"`
}

type DecodeSharedAttrsIn

type DecodeSharedAttrsIn struct {
	AssocEntity *entity.Entity `saga:"assocentity"`
}

type DecodeSharedAttrsOut

type DecodeSharedAttrsOut struct {
	SharedServerRef entity.Id
	SharedDbName    string
	SharedUserName  string
}

type DeleteDedicatedServerEntityIn

type DeleteDedicatedServerEntityIn struct {
	DedicatedServerID   entity.Id `saga:"dedicatedserverid"`
	DedicatedServerName string    `saga:"dedicatedservername"`

	PoolCleanedUp saga.Edge `saga:"dedicated_pool_deleted"`
}

type DeleteDedicatedServerEntityOut

type DeleteDedicatedServerEntityOut struct {
	ServerDeleted bool
}

type DropSharedDatabaseIn

type DropSharedDatabaseIn struct {
	SharedServiceHost     string
	SharedRootPassword    string
	SharedDbName          string
	ConnectionsTerminated bool
}

type DropSharedDatabaseOut

type DropSharedDatabaseOut struct {
	DatabaseDropped bool
}

type DropSharedUserIn

type DropSharedUserIn struct {
	SharedServiceHost     string
	SharedRootPassword    string
	SharedUserName        string
	ConnectionsTerminated bool
}

type DropSharedUserOut

type DropSharedUserOut struct {
	UserDropped bool
}

type FindOrCreateSharedServerIn

type FindOrCreateSharedServerIn struct {
	AppName       string
	VariantConfig map[string]string
}

type FindOrCreateSharedServerOut

type FindOrCreateSharedServerOut struct {
	ServerID     entity.Id
	RootPassword string
	ServiceHost  string
}

type GenerateCredentialsIn

type GenerateCredentialsIn struct {
	AppName string
}

type GenerateCredentialsOut

type GenerateCredentialsOut struct {
	Password     string `saga:"password"`
	RootPassword string `saga:"rootpassword"`
	DatabaseName string `saga:"databasename"`
	Username     string `saga:"username"`
	ServiceName  string `saga:"servicename"`
	ServerName   string `saga:"servername"`
}

type GenerateSharedCredentialsIn

type GenerateSharedCredentialsIn struct {
	AppName string
}

type GenerateSharedCredentialsOut

type GenerateSharedCredentialsOut struct {
	SharedPassword          string
	SharedDatabaseName      string
	GeneratedSharedUsername string
}

type LookupDedicatedServerIn

type LookupDedicatedServerIn struct {
	DedicatedServerID entity.Id `saga:"dedicatedserverid"`
}

type LookupDedicatedServerOut

type LookupDedicatedServerOut struct {
	DedicatedServiceID  entity.Id `saga:"dedicatedserviceid"`
	DedicatedPoolID     entity.Id `saga:"dedicatedpoolid"`
	DedicatedServerName string    `saga:"dedicatedservername"`
}

type LookupSharedServerIn

type LookupSharedServerIn struct {
	SharedServerRef entity.Id
}

type LookupSharedServerOut

type LookupSharedServerOut struct {
	SharedRootPassword string
	SharedServiceRef   entity.Id
	SharedPoolRef      entity.Id
	SharedAssocCount   int64
	SharedServiceHost  string
}

type Provider

type Provider struct {
	dbsaga.BaseProvider
}

func NewProvider

func NewProvider(fw *addon.ProviderFramework) *Provider

func (*Provider) Deprovision

func (p *Provider) Deprovision(ctx context.Context, assoc addon.AddonAssociation) error

func (*Provider) Provision

func (p *Provider) Provision(ctx context.Context, app addon.App, variant addon.Variant) (*addon.ProvisionResult, error)

type TerminateConnectionsIn

type TerminateConnectionsIn struct {
	SharedServiceHost  string
	SharedRootPassword string
	SharedDbName       string
}

type TerminateConnectionsOut

type TerminateConnectionsOut struct {
	ConnectionsTerminated bool
}

type UpdateDedicatedServerIn

type UpdateDedicatedServerIn struct {
	ServerID     entity.Id `saga:"serverid"`
	PoolID       entity.Id `saga:"poolid"`
	ServiceID    entity.Id `saga:"serviceid"`
	ServiceHost  string    `saga:"servicehost"`
	VariantName  string    `saga:"variantname"`
	RootPassword string    `saga:"rootpassword"`
}

type UpdateDedicatedServerOut

type UpdateDedicatedServerOut struct {
	Updated bool
}

Jump to

Keyboard shortcuts

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