sqldb

package
v0.0.0-...-81a4f0c Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppMetricSQLDB

type AppMetricSQLDB struct {
	// contains filtered or unexported fields
}

func NewAppMetricSQLDB

func NewAppMetricSQLDB(dbConfig db.DatabaseConfig, logger lager.Logger) (*AppMetricSQLDB, error)

func (*AppMetricSQLDB) Close

func (adb *AppMetricSQLDB) Close() error

func (*AppMetricSQLDB) GetDBStatus

func (adb *AppMetricSQLDB) GetDBStatus() sql.DBStats

func (*AppMetricSQLDB) PruneAppMetrics

func (adb *AppMetricSQLDB) PruneAppMetrics(before int64) error

func (*AppMetricSQLDB) RetrieveAppMetrics

func (adb *AppMetricSQLDB) RetrieveAppMetrics(appIdP string, metricTypeP string, startP int64, endP int64, orderType db.OrderType) ([]*models.AppMetric, error)

func (*AppMetricSQLDB) SaveAppMetric

func (adb *AppMetricSQLDB) SaveAppMetric(appMetric *models.AppMetric) error

func (*AppMetricSQLDB) SaveAppMetricsInBulk

func (adb *AppMetricSQLDB) SaveAppMetricsInBulk(appMetrics []*models.AppMetric) error

type BindingSQLDB

type BindingSQLDB struct {
	// contains filtered or unexported fields
}

func NewBindingSQLDB

func NewBindingSQLDB(dbConfig db.DatabaseConfig, logger lager.Logger) (*BindingSQLDB, error)

func (*BindingSQLDB) CheckServiceBinding

func (bdb *BindingSQLDB) CheckServiceBinding(appId string) bool

func (*BindingSQLDB) Close

func (bdb *BindingSQLDB) Close() error

func (*BindingSQLDB) CountServiceInstancesInOrg

func (bdb *BindingSQLDB) CountServiceInstancesInOrg(orgId string) (int, error)

func (*BindingSQLDB) CreateServiceBinding

func (bdb *BindingSQLDB) CreateServiceBinding(bindingId string, serviceInstanceId string, appId string) error

func (*BindingSQLDB) CreateServiceInstance

func (bdb *BindingSQLDB) CreateServiceInstance(serviceInstance models.ServiceInstance) error

func (*BindingSQLDB) DeleteServiceBinding

func (bdb *BindingSQLDB) DeleteServiceBinding(bindingId string) error

func (*BindingSQLDB) DeleteServiceBindingByAppId

func (bdb *BindingSQLDB) DeleteServiceBindingByAppId(appId string) error

func (*BindingSQLDB) DeleteServiceInstance

func (bdb *BindingSQLDB) DeleteServiceInstance(serviceInstanceId string) error

func (*BindingSQLDB) GetAppIdByBindingId

func (bdb *BindingSQLDB) GetAppIdByBindingId(bindingId string) (string, error)

func (*BindingSQLDB) GetAppIdsByInstanceId

func (bdb *BindingSQLDB) GetAppIdsByInstanceId(instanceId string) ([]string, error)

func (*BindingSQLDB) GetBindingIdsByInstanceId

func (bdb *BindingSQLDB) GetBindingIdsByInstanceId(instanceId string) ([]string, error)

func (*BindingSQLDB) GetDBStatus

func (bdb *BindingSQLDB) GetDBStatus() sql.DBStats

func (*BindingSQLDB) GetServiceInstance

func (bdb *BindingSQLDB) GetServiceInstance(serviceInstanceId string) (*models.ServiceInstance, error)

func (*BindingSQLDB) GetServiceInstanceByAppId

func (bdb *BindingSQLDB) GetServiceInstanceByAppId(appId string) (*models.ServiceInstance, error)

func (*BindingSQLDB) UpdateServiceInstance

func (bdb *BindingSQLDB) UpdateServiceInstance(serviceInstance models.ServiceInstance) error

type InstanceMetricsSQLDB

type InstanceMetricsSQLDB struct {
	// contains filtered or unexported fields
}

func NewInstanceMetricsSQLDB

func NewInstanceMetricsSQLDB(dbConfig db.DatabaseConfig, logger lager.Logger) (*InstanceMetricsSQLDB, error)

func (*InstanceMetricsSQLDB) Close

func (idb *InstanceMetricsSQLDB) Close() error

func (*InstanceMetricsSQLDB) GetDBStatus

func (idb *InstanceMetricsSQLDB) GetDBStatus() sql.DBStats

func (*InstanceMetricsSQLDB) PruneInstanceMetrics

func (idb *InstanceMetricsSQLDB) PruneInstanceMetrics(before int64) error

func (*InstanceMetricsSQLDB) RetrieveInstanceMetrics

func (idb *InstanceMetricsSQLDB) RetrieveInstanceMetrics(appid string, instanceIndex int, name string, start int64, end int64, orderType db.OrderType) ([]*models.AppInstanceMetric, error)

func (*InstanceMetricsSQLDB) SaveMetric

func (idb *InstanceMetricsSQLDB) SaveMetric(metric *models.AppInstanceMetric) error

func (*InstanceMetricsSQLDB) SaveMetricsInBulk

func (idb *InstanceMetricsSQLDB) SaveMetricsInBulk(metrics []*models.AppInstanceMetric) error

type LockSQLDB

type LockSQLDB struct {
	// contains filtered or unexported fields
}

func NewLockSQLDB

func NewLockSQLDB(dbConfig db.DatabaseConfig, table string, logger lager.Logger) (*LockSQLDB, error)

func (*LockSQLDB) Close

func (ldb *LockSQLDB) Close() error

func (*LockSQLDB) Lock

func (ldb *LockSQLDB) Lock(lock *models.Lock) (bool, error)

func (*LockSQLDB) Release

func (ldb *LockSQLDB) Release(owner string) error

type PolicySQLDB

type PolicySQLDB struct {
	// contains filtered or unexported fields
}

func NewPolicySQLDB

func NewPolicySQLDB(dbConfig db.DatabaseConfig, logger lager.Logger) (*PolicySQLDB, error)

func (*PolicySQLDB) Close

func (pdb *PolicySQLDB) Close() error

func (*PolicySQLDB) DeleteCredential

func (pdb *PolicySQLDB) DeleteCredential(appId string) error

func (*PolicySQLDB) DeletePoliciesByPolicyGuid

func (pdb *PolicySQLDB) DeletePoliciesByPolicyGuid(policyGuid string) ([]string, error)

func (*PolicySQLDB) DeletePolicy

func (pdb *PolicySQLDB) DeletePolicy(appId string) error

func (*PolicySQLDB) GetAppIds

func (pdb *PolicySQLDB) GetAppIds() (map[string]bool, error)

func (*PolicySQLDB) GetAppPolicy

func (pdb *PolicySQLDB) GetAppPolicy(appId string) (*models.ScalingPolicy, error)

func (*PolicySQLDB) GetCredential

func (pdb *PolicySQLDB) GetCredential(appId string) (*models.Credential, error)

func (*PolicySQLDB) GetDBStatus

func (pdb *PolicySQLDB) GetDBStatus() sql.DBStats

func (*PolicySQLDB) RetrievePolicies

func (pdb *PolicySQLDB) RetrievePolicies() ([]*models.PolicyJson, error)

func (*PolicySQLDB) SaveAppPolicy

func (pdb *PolicySQLDB) SaveAppPolicy(appId string, policyJSON string, policyGuid string) error

func (*PolicySQLDB) SaveCredential

func (pdb *PolicySQLDB) SaveCredential(appId string, cred models.Credential) error

func (*PolicySQLDB) SetOrUpdateDefaultAppPolicy

func (pdb *PolicySQLDB) SetOrUpdateDefaultAppPolicy(boundApps []string, oldPolicyGuid string, newPolicy string, newPolicyGuid string) ([]string, error)

type ScalingEngineSQLDB

type ScalingEngineSQLDB struct {
	// contains filtered or unexported fields
}

func NewScalingEngineSQLDB

func NewScalingEngineSQLDB(dbConfig db.DatabaseConfig, logger lager.Logger) (*ScalingEngineSQLDB, error)

func (*ScalingEngineSQLDB) CanScaleApp

func (sdb *ScalingEngineSQLDB) CanScaleApp(appId string) (bool, int64, error)

func (*ScalingEngineSQLDB) Close

func (sdb *ScalingEngineSQLDB) Close() error

func (*ScalingEngineSQLDB) GetActiveSchedule

func (sdb *ScalingEngineSQLDB) GetActiveSchedule(appId string) (*models.ActiveSchedule, error)

func (*ScalingEngineSQLDB) GetActiveSchedules

func (sdb *ScalingEngineSQLDB) GetActiveSchedules() (map[string]string, error)

func (*ScalingEngineSQLDB) GetDBStatus

func (sdb *ScalingEngineSQLDB) GetDBStatus() sql.DBStats

func (*ScalingEngineSQLDB) PruneScalingHistories

func (sdb *ScalingEngineSQLDB) PruneScalingHistories(before int64) error

func (*ScalingEngineSQLDB) RemoveActiveSchedule

func (sdb *ScalingEngineSQLDB) RemoveActiveSchedule(appId string) error

func (*ScalingEngineSQLDB) RetrieveScalingHistories

func (sdb *ScalingEngineSQLDB) RetrieveScalingHistories(appId string, start int64, end int64, orderType db.OrderType, includeAll bool) ([]*models.AppScalingHistory, error)

func (*ScalingEngineSQLDB) SaveScalingHistory

func (sdb *ScalingEngineSQLDB) SaveScalingHistory(history *models.AppScalingHistory) error

func (*ScalingEngineSQLDB) SetActiveSchedule

func (sdb *ScalingEngineSQLDB) SetActiveSchedule(appId string, schedule *models.ActiveSchedule) error

func (*ScalingEngineSQLDB) UpdateScalingCooldownExpireTime

func (sdb *ScalingEngineSQLDB) UpdateScalingCooldownExpireTime(appId string, expireAt int64) error

type SchedulerSQLDB

type SchedulerSQLDB struct {
	// contains filtered or unexported fields
}

func NewSchedulerSQLDB

func NewSchedulerSQLDB(dbConfig db.DatabaseConfig, logger lager.Logger) (*SchedulerSQLDB, error)

func (*SchedulerSQLDB) Close

func (sdb *SchedulerSQLDB) Close() error

func (*SchedulerSQLDB) GetActiveSchedules

func (sdb *SchedulerSQLDB) GetActiveSchedules() (map[string]*models.ActiveSchedule, error)

func (*SchedulerSQLDB) GetDBStatus

func (sdb *SchedulerSQLDB) GetDBStatus() sql.DBStats

type StoredProcedureSQLDb

type StoredProcedureSQLDb struct {
	// contains filtered or unexported fields
}

func NewStoredProcedureSQLDb

func NewStoredProcedureSQLDb(config models.StoredProcedureConfig, dbConfig db.DatabaseConfig, logger lager.Logger) (*StoredProcedureSQLDb, error)

func (*StoredProcedureSQLDb) Close

func (sdb *StoredProcedureSQLDb) Close() error

func (*StoredProcedureSQLDb) CreateCredentials

func (sdb *StoredProcedureSQLDb) CreateCredentials(credOptions models.CredentialsOptions) (*models.Credential, error)

func (*StoredProcedureSQLDb) DeleteAllInstanceCredentials

func (sdb *StoredProcedureSQLDb) DeleteAllInstanceCredentials(instanceId string) error

func (*StoredProcedureSQLDb) DeleteCredentials

func (sdb *StoredProcedureSQLDb) DeleteCredentials(credOptions models.CredentialsOptions) error

func (*StoredProcedureSQLDb) ValidateCredentials

func (sdb *StoredProcedureSQLDb) ValidateCredentials(creds models.Credential) (*models.CredentialsOptions, error)

Jump to

Keyboard shortcuts

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