dbsession

package
v0.0.0-...-1c44903 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	NewReadSession() ReadSession
	NewWriteSession() WriteSession
	NewReadWriteSession() ReadWriteSession
	NewSessionWithinTransaction() (WriteSessionWithinTransaction, dberrors.Error)
}

func NewFactory

func NewFactory(connection *dbr.Connection) Factory

type ReadSession

type ReadSession interface {
	GetCluster(runtimeID string) (model.Cluster, dberrors.Error)
	GetOperation(operationID string) (model.Operation, dberrors.Error)
	GetLastOperation(runtimeID string) (model.Operation, dberrors.Error)
	GetGardenerClusterByName(name string) (model.Cluster, dberrors.Error)
	GetTenant(runtimeID string) (string, dberrors.Error)
	ListInProgressOperations() ([]model.Operation, dberrors.Error)
	GetRuntimeUpgrade(operationId string) (model.RuntimeUpgrade, dberrors.Error)
	GetTenantForOperation(operationID string) (string, dberrors.Error)
	InProgressOperationsCount() (model.OperationsCount, dberrors.Error)
}

type ReadWriteSession

type ReadWriteSession interface {
	ReadSession
	WriteSession
}

type Transaction

type Transaction interface {
	Commit() dberrors.Error
	RollbackUnlessCommitted()
}

type WriteSession

type WriteSession interface {
	InsertCluster(cluster model.Cluster) dberrors.Error
	InsertGardenerConfig(config model.GardenerConfig) dberrors.Error
	InsertKymaConfig(kymaConfig model.KymaConfig) dberrors.Error
	InsertOperation(operation model.Operation) dberrors.Error
	UpdateOperationState(operationID string, message string, state model.OperationState, endTime time.Time) dberrors.Error
	TransitionOperation(operationID string, message string, stage model.OperationStage, transitionTime time.Time) dberrors.Error
	UpdateKubeconfig(runtimeID string, kubeconfig string) dberrors.Error
	SetActiveKymaConfig(runtimeID string, kymaConfigId string) dberrors.Error
	UpdateUpgradeState(operationID string, upgradeState model.UpgradeState) dberrors.Error
	DeleteCluster(runtimeID string) dberrors.Error
	MarkClusterAsDeleted(runtimeID string) dberrors.Error
	InsertRuntimeUpgrade(runtimeUpgrade model.RuntimeUpgrade) dberrors.Error
	FixShootProvisioningStage(message string, newStage model.OperationStage, transitionTime time.Time) dberrors.Error
}

type WriteSessionWithinTransaction

type WriteSessionWithinTransaction interface {
	WriteSession
	Transaction
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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