db_service

package
v4.2.0-rc2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DbTypeMysql   = "mysql"
	DbTypeSqlite3 = "sqlite3"
)

Variables

View Source
var DbConnection *gorm.DB

Functions

func CheckDeletedPlanDetailsV1ById

func CheckDeletedPlanDetailsV1ById(ctx context.Context, id string) (bool, error)

CheckDeletedPlanDetailsV1ById checks to see if an instance of PlanDetailsV1 was soft deleted by its key (id).

func CheckDeletedPlanDetailsV1ByServiceIdAndName

func CheckDeletedPlanDetailsV1ByServiceIdAndName(ctx context.Context, serviceId string, name string) (bool, error)

CheckDeletedPlanDetailsV1ByServiceIdAndName checks to see if an instance of PlanDetailsV1 was soft deleted by its key (serviceId, name).

func CheckDeletedProvisionRequestDetailsById

func CheckDeletedProvisionRequestDetailsById(ctx context.Context, id uint) (bool, error)

CheckDeletedProvisionRequestDetailsById checks to see if an instance of ProvisionRequestDetails was soft deleted by its key (id).

func CheckDeletedServiceBindingCredentialsByBindingId

func CheckDeletedServiceBindingCredentialsByBindingId(ctx context.Context, bindingId string) (bool, error)

CheckDeletedServiceBindingCredentialsByBindingId checks to see if an instance of ServiceBindingCredentials was soft deleted by its key (bindingId).

func CheckDeletedServiceBindingCredentialsById

func CheckDeletedServiceBindingCredentialsById(ctx context.Context, id uint) (bool, error)

CheckDeletedServiceBindingCredentialsById checks to see if an instance of ServiceBindingCredentials was soft deleted by its key (id).

func CheckDeletedServiceBindingCredentialsByServiceInstanceIdAndBindingId

func CheckDeletedServiceBindingCredentialsByServiceInstanceIdAndBindingId(ctx context.Context, serviceInstanceId string, bindingId string) (bool, error)

CheckDeletedServiceBindingCredentialsByServiceInstanceIdAndBindingId checks to see if an instance of ServiceBindingCredentials was soft deleted by its key (serviceInstanceId, bindingId).

func CheckDeletedServiceInstanceDetailsById

func CheckDeletedServiceInstanceDetailsById(ctx context.Context, id string) (bool, error)

CheckDeletedServiceInstanceDetailsById checks to see if an instance of ServiceInstanceDetails was soft deleted by its key (id).

func CheckDeletedTerraformDeploymentById

func CheckDeletedTerraformDeploymentById(ctx context.Context, id string) (bool, error)

CheckDeletedTerraformDeploymentById checks to see if an instance of TerraformDeployment was soft deleted by its key (id).

func CountPlanDetailsV1ById

func CountPlanDetailsV1ById(ctx context.Context, id string) (int, error)

CountPlanDetailsV1ById gets the count of PlanDetailsV1 by its key (id) in the datastore (0 or 1)

func CountPlanDetailsV1ByServiceIdAndName

func CountPlanDetailsV1ByServiceIdAndName(ctx context.Context, serviceId string, name string) (int, error)

CountPlanDetailsV1ByServiceIdAndName gets the count of PlanDetailsV1 by its key (serviceId, name) in the datastore (0 or 1)

func CountProvisionRequestDetailsById

func CountProvisionRequestDetailsById(ctx context.Context, id uint) (int, error)

CountProvisionRequestDetailsById gets the count of ProvisionRequestDetails by its key (id) in the datastore (0 or 1)

func CountServiceBindingCredentialsByBindingId

func CountServiceBindingCredentialsByBindingId(ctx context.Context, bindingId string) (int, error)

CountServiceBindingCredentialsByBindingId gets the count of ServiceBindingCredentials by its key (bindingId) in the datastore (0 or 1)

func CountServiceBindingCredentialsById

func CountServiceBindingCredentialsById(ctx context.Context, id uint) (int, error)

CountServiceBindingCredentialsById gets the count of ServiceBindingCredentials by its key (id) in the datastore (0 or 1)

func CountServiceBindingCredentialsByServiceInstanceIdAndBindingId

func CountServiceBindingCredentialsByServiceInstanceIdAndBindingId(ctx context.Context, serviceInstanceId string, bindingId string) (int, error)

CountServiceBindingCredentialsByServiceInstanceIdAndBindingId gets the count of ServiceBindingCredentials by its key (serviceInstanceId, bindingId) in the datastore (0 or 1)

func CountServiceInstanceDetailsById

func CountServiceInstanceDetailsById(ctx context.Context, id string) (int, error)

CountServiceInstanceDetailsById gets the count of ServiceInstanceDetails by its key (id) in the datastore (0 or 1)

func CountTerraformDeploymentById

func CountTerraformDeploymentById(ctx context.Context, id string) (int, error)

CountTerraformDeploymentById gets the count of TerraformDeployment by its key (id) in the datastore (0 or 1)

func CreatePlanDetailsV1

func CreatePlanDetailsV1(ctx context.Context, object *models.PlanDetailsV1) error

CreatePlanDetailsV1 creates a new record in the database and assigns it a primary key.

func CreateProvisionRequestDetails

func CreateProvisionRequestDetails(ctx context.Context, object *models.ProvisionRequestDetails) error

CreateProvisionRequestDetails creates a new record in the database and assigns it a primary key.

func CreateServiceBindingCredentials

func CreateServiceBindingCredentials(ctx context.Context, object *models.ServiceBindingCredentials) error

CreateServiceBindingCredentials creates a new record in the database and assigns it a primary key.

func CreateServiceInstanceDetails

func CreateServiceInstanceDetails(ctx context.Context, object *models.ServiceInstanceDetails) error

CreateServiceInstanceDetails creates a new record in the database and assigns it a primary key.

func CreateTerraformDeployment

func CreateTerraformDeployment(ctx context.Context, object *models.TerraformDeployment) error

CreateTerraformDeployment creates a new record in the database and assigns it a primary key.

func DeletePlanDetailsV1

func DeletePlanDetailsV1(ctx context.Context, record *models.PlanDetailsV1) error

DeletePlanDetailsV1 soft-deletes the record.

func DeletePlanDetailsV1ById

func DeletePlanDetailsV1ById(ctx context.Context, id string) error

DeletePlanDetailsV1ById soft-deletes the record by its key (id).

func DeletePlanDetailsV1ByServiceIdAndName

func DeletePlanDetailsV1ByServiceIdAndName(ctx context.Context, serviceId string, name string) error

DeletePlanDetailsV1ByServiceIdAndName soft-deletes the record by its key (serviceId, name).

func DeleteProvisionRequestDetails

func DeleteProvisionRequestDetails(ctx context.Context, record *models.ProvisionRequestDetails) error

DeleteProvisionRequestDetails soft-deletes the record.

func DeleteProvisionRequestDetailsById

func DeleteProvisionRequestDetailsById(ctx context.Context, id uint) error

DeleteProvisionRequestDetailsById soft-deletes the record by its key (id).

func DeleteServiceBindingCredentials

func DeleteServiceBindingCredentials(ctx context.Context, record *models.ServiceBindingCredentials) error

DeleteServiceBindingCredentials soft-deletes the record.

func DeleteServiceBindingCredentialsByBindingId

func DeleteServiceBindingCredentialsByBindingId(ctx context.Context, bindingId string) error

DeleteServiceBindingCredentialsByBindingId soft-deletes the record by its key (bindingId).

func DeleteServiceBindingCredentialsById

func DeleteServiceBindingCredentialsById(ctx context.Context, id uint) error

DeleteServiceBindingCredentialsById soft-deletes the record by its key (id).

func DeleteServiceBindingCredentialsByServiceInstanceIdAndBindingId

func DeleteServiceBindingCredentialsByServiceInstanceIdAndBindingId(ctx context.Context, serviceInstanceId string, bindingId string) error

DeleteServiceBindingCredentialsByServiceInstanceIdAndBindingId soft-deletes the record by its key (serviceInstanceId, bindingId).

func DeleteServiceInstanceDetails

func DeleteServiceInstanceDetails(ctx context.Context, record *models.ServiceInstanceDetails) error

DeleteServiceInstanceDetails soft-deletes the record.

func DeleteServiceInstanceDetailsById

func DeleteServiceInstanceDetailsById(ctx context.Context, id string) error

DeleteServiceInstanceDetailsById soft-deletes the record by its key (id).

func DeleteTerraformDeployment

func DeleteTerraformDeployment(ctx context.Context, record *models.TerraformDeployment) error

DeleteTerraformDeployment soft-deletes the record.

func DeleteTerraformDeploymentById

func DeleteTerraformDeploymentById(ctx context.Context, id string) error

DeleteTerraformDeploymentById soft-deletes the record by its key (id).

func GetPlanDetailsV1ById

func GetPlanDetailsV1ById(ctx context.Context, id string) (*models.PlanDetailsV1, error)

GetPlanDetailsV1ById gets an instance of PlanDetailsV1 by its key (id).

func GetPlanDetailsV1ByServiceIdAndName

func GetPlanDetailsV1ByServiceIdAndName(ctx context.Context, serviceId string, name string) (*models.PlanDetailsV1, error)

GetPlanDetailsV1ByServiceIdAndName gets an instance of PlanDetailsV1 by its key (serviceId, name).

func GetProvisionRequestDetailsById

func GetProvisionRequestDetailsById(ctx context.Context, id uint) (*models.ProvisionRequestDetails, error)

GetProvisionRequestDetailsById gets an instance of ProvisionRequestDetails by its key (id).

func GetServiceBindingCredentialsByBindingId

func GetServiceBindingCredentialsByBindingId(ctx context.Context, bindingId string) (*models.ServiceBindingCredentials, error)

GetServiceBindingCredentialsByBindingId gets an instance of ServiceBindingCredentials by its key (bindingId).

func GetServiceBindingCredentialsById

func GetServiceBindingCredentialsById(ctx context.Context, id uint) (*models.ServiceBindingCredentials, error)

GetServiceBindingCredentialsById gets an instance of ServiceBindingCredentials by its key (id).

func GetServiceBindingCredentialsByServiceInstanceIdAndBindingId

func GetServiceBindingCredentialsByServiceInstanceIdAndBindingId(ctx context.Context, serviceInstanceId string, bindingId string) (*models.ServiceBindingCredentials, error)

GetServiceBindingCredentialsByServiceInstanceIdAndBindingId gets an instance of ServiceBindingCredentials by its key (serviceInstanceId, bindingId).

func GetServiceInstanceDetailsById

func GetServiceInstanceDetailsById(ctx context.Context, id string) (*models.ServiceInstanceDetails, error)

GetServiceInstanceDetailsById gets an instance of ServiceInstanceDetails by its key (id).

func GetTerraformDeploymentById

func GetTerraformDeploymentById(ctx context.Context, id string) (*models.TerraformDeployment, error)

GetTerraformDeploymentById gets an instance of TerraformDeployment by its key (id).

func New

func New(logger lager.Logger) *gorm.DB

Instantiates the db connection and runs migrations

func RunMigrations

func RunMigrations(db *gorm.DB) error

runs schema migrations on the provided service broker database to get it up to date

func SavePlanDetailsV1

func SavePlanDetailsV1(ctx context.Context, object *models.PlanDetailsV1) error

SavePlanDetailsV1 updates an existing record in the database.

func SaveProvisionRequestDetails

func SaveProvisionRequestDetails(ctx context.Context, object *models.ProvisionRequestDetails) error

SaveProvisionRequestDetails updates an existing record in the database.

func SaveServiceBindingCredentials

func SaveServiceBindingCredentials(ctx context.Context, object *models.ServiceBindingCredentials) error

SaveServiceBindingCredentials updates an existing record in the database.

func SaveServiceInstanceDetails

func SaveServiceInstanceDetails(ctx context.Context, object *models.ServiceInstanceDetails) error

SaveServiceInstanceDetails updates an existing record in the database.

func SaveTerraformDeployment

func SaveTerraformDeployment(ctx context.Context, object *models.TerraformDeployment) error

SaveTerraformDeployment updates an existing record in the database.

func SetupDb

func SetupDb(logger lager.Logger) *gorm.DB

pulls db credentials from the environment, connects to the db, and returns the db connection

Types

type SqlDatastore

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

func (*SqlDatastore) CheckDeletedPlanDetailsV1ById

func (ds *SqlDatastore) CheckDeletedPlanDetailsV1ById(ctx context.Context, id string) (bool, error)

func (*SqlDatastore) CheckDeletedPlanDetailsV1ByServiceIdAndName

func (ds *SqlDatastore) CheckDeletedPlanDetailsV1ByServiceIdAndName(ctx context.Context, serviceId string, name string) (bool, error)

func (*SqlDatastore) CheckDeletedProvisionRequestDetailsById

func (ds *SqlDatastore) CheckDeletedProvisionRequestDetailsById(ctx context.Context, id uint) (bool, error)

func (*SqlDatastore) CheckDeletedServiceBindingCredentialsByBindingId

func (ds *SqlDatastore) CheckDeletedServiceBindingCredentialsByBindingId(ctx context.Context, bindingId string) (bool, error)

func (*SqlDatastore) CheckDeletedServiceBindingCredentialsById

func (ds *SqlDatastore) CheckDeletedServiceBindingCredentialsById(ctx context.Context, id uint) (bool, error)

func (*SqlDatastore) CheckDeletedServiceBindingCredentialsByServiceInstanceIdAndBindingId

func (ds *SqlDatastore) CheckDeletedServiceBindingCredentialsByServiceInstanceIdAndBindingId(ctx context.Context, serviceInstanceId string, bindingId string) (bool, error)

func (*SqlDatastore) CheckDeletedServiceInstanceDetailsById

func (ds *SqlDatastore) CheckDeletedServiceInstanceDetailsById(ctx context.Context, id string) (bool, error)

func (*SqlDatastore) CheckDeletedTerraformDeploymentById

func (ds *SqlDatastore) CheckDeletedTerraformDeploymentById(ctx context.Context, id string) (bool, error)

func (*SqlDatastore) CountPlanDetailsV1ById

func (ds *SqlDatastore) CountPlanDetailsV1ById(ctx context.Context, id string) (int, error)

func (*SqlDatastore) CountPlanDetailsV1ByServiceIdAndName

func (ds *SqlDatastore) CountPlanDetailsV1ByServiceIdAndName(ctx context.Context, serviceId string, name string) (int, error)

func (*SqlDatastore) CountProvisionRequestDetailsById

func (ds *SqlDatastore) CountProvisionRequestDetailsById(ctx context.Context, id uint) (int, error)

func (*SqlDatastore) CountServiceBindingCredentialsByBindingId

func (ds *SqlDatastore) CountServiceBindingCredentialsByBindingId(ctx context.Context, bindingId string) (int, error)

func (*SqlDatastore) CountServiceBindingCredentialsById

func (ds *SqlDatastore) CountServiceBindingCredentialsById(ctx context.Context, id uint) (int, error)

func (*SqlDatastore) CountServiceBindingCredentialsByServiceInstanceIdAndBindingId

func (ds *SqlDatastore) CountServiceBindingCredentialsByServiceInstanceIdAndBindingId(ctx context.Context, serviceInstanceId string, bindingId string) (int, error)

func (*SqlDatastore) CountServiceInstanceDetailsById

func (ds *SqlDatastore) CountServiceInstanceDetailsById(ctx context.Context, id string) (int, error)

func (*SqlDatastore) CountTerraformDeploymentById

func (ds *SqlDatastore) CountTerraformDeploymentById(ctx context.Context, id string) (int, error)

func (*SqlDatastore) CreatePlanDetailsV1

func (ds *SqlDatastore) CreatePlanDetailsV1(ctx context.Context, object *models.PlanDetailsV1) error

func (*SqlDatastore) CreateProvisionRequestDetails

func (ds *SqlDatastore) CreateProvisionRequestDetails(ctx context.Context, object *models.ProvisionRequestDetails) error

func (*SqlDatastore) CreateServiceBindingCredentials

func (ds *SqlDatastore) CreateServiceBindingCredentials(ctx context.Context, object *models.ServiceBindingCredentials) error

func (*SqlDatastore) CreateServiceInstanceDetails

func (ds *SqlDatastore) CreateServiceInstanceDetails(ctx context.Context, object *models.ServiceInstanceDetails) error

func (*SqlDatastore) CreateTerraformDeployment

func (ds *SqlDatastore) CreateTerraformDeployment(ctx context.Context, object *models.TerraformDeployment) error

func (*SqlDatastore) DeletePlanDetailsV1

func (ds *SqlDatastore) DeletePlanDetailsV1(ctx context.Context, record *models.PlanDetailsV1) error

func (*SqlDatastore) DeletePlanDetailsV1ById

func (ds *SqlDatastore) DeletePlanDetailsV1ById(ctx context.Context, id string) error

func (*SqlDatastore) DeletePlanDetailsV1ByServiceIdAndName

func (ds *SqlDatastore) DeletePlanDetailsV1ByServiceIdAndName(ctx context.Context, serviceId string, name string) error

func (*SqlDatastore) DeleteProvisionRequestDetails

func (ds *SqlDatastore) DeleteProvisionRequestDetails(ctx context.Context, record *models.ProvisionRequestDetails) error

func (*SqlDatastore) DeleteProvisionRequestDetailsById

func (ds *SqlDatastore) DeleteProvisionRequestDetailsById(ctx context.Context, id uint) error

func (*SqlDatastore) DeleteServiceBindingCredentials

func (ds *SqlDatastore) DeleteServiceBindingCredentials(ctx context.Context, record *models.ServiceBindingCredentials) error

func (*SqlDatastore) DeleteServiceBindingCredentialsByBindingId

func (ds *SqlDatastore) DeleteServiceBindingCredentialsByBindingId(ctx context.Context, bindingId string) error

func (*SqlDatastore) DeleteServiceBindingCredentialsById

func (ds *SqlDatastore) DeleteServiceBindingCredentialsById(ctx context.Context, id uint) error

func (*SqlDatastore) DeleteServiceBindingCredentialsByServiceInstanceIdAndBindingId

func (ds *SqlDatastore) DeleteServiceBindingCredentialsByServiceInstanceIdAndBindingId(ctx context.Context, serviceInstanceId string, bindingId string) error

func (*SqlDatastore) DeleteServiceInstanceDetails

func (ds *SqlDatastore) DeleteServiceInstanceDetails(ctx context.Context, record *models.ServiceInstanceDetails) error

func (*SqlDatastore) DeleteServiceInstanceDetailsById

func (ds *SqlDatastore) DeleteServiceInstanceDetailsById(ctx context.Context, id string) error

func (*SqlDatastore) DeleteTerraformDeployment

func (ds *SqlDatastore) DeleteTerraformDeployment(ctx context.Context, record *models.TerraformDeployment) error

func (*SqlDatastore) DeleteTerraformDeploymentById

func (ds *SqlDatastore) DeleteTerraformDeploymentById(ctx context.Context, id string) error

func (*SqlDatastore) GetPlanDetailsV1ById

func (ds *SqlDatastore) GetPlanDetailsV1ById(ctx context.Context, id string) (*models.PlanDetailsV1, error)

func (*SqlDatastore) GetPlanDetailsV1ByServiceIdAndName

func (ds *SqlDatastore) GetPlanDetailsV1ByServiceIdAndName(ctx context.Context, serviceId string, name string) (*models.PlanDetailsV1, error)

func (*SqlDatastore) GetProvisionRequestDetailsById

func (ds *SqlDatastore) GetProvisionRequestDetailsById(ctx context.Context, id uint) (*models.ProvisionRequestDetails, error)

func (*SqlDatastore) GetServiceBindingCredentialsByBindingId

func (ds *SqlDatastore) GetServiceBindingCredentialsByBindingId(ctx context.Context, bindingId string) (*models.ServiceBindingCredentials, error)

func (*SqlDatastore) GetServiceBindingCredentialsById

func (ds *SqlDatastore) GetServiceBindingCredentialsById(ctx context.Context, id uint) (*models.ServiceBindingCredentials, error)

func (*SqlDatastore) GetServiceBindingCredentialsByServiceInstanceIdAndBindingId

func (ds *SqlDatastore) GetServiceBindingCredentialsByServiceInstanceIdAndBindingId(ctx context.Context, serviceInstanceId string, bindingId string) (*models.ServiceBindingCredentials, error)

func (*SqlDatastore) GetServiceInstanceDetailsById

func (ds *SqlDatastore) GetServiceInstanceDetailsById(ctx context.Context, id string) (*models.ServiceInstanceDetails, error)

func (*SqlDatastore) GetTerraformDeploymentById

func (ds *SqlDatastore) GetTerraformDeploymentById(ctx context.Context, id string) (*models.TerraformDeployment, error)

func (*SqlDatastore) SavePlanDetailsV1

func (ds *SqlDatastore) SavePlanDetailsV1(ctx context.Context, object *models.PlanDetailsV1) error

func (*SqlDatastore) SaveProvisionRequestDetails

func (ds *SqlDatastore) SaveProvisionRequestDetails(ctx context.Context, object *models.ProvisionRequestDetails) error

func (*SqlDatastore) SaveServiceBindingCredentials

func (ds *SqlDatastore) SaveServiceBindingCredentials(ctx context.Context, object *models.ServiceBindingCredentials) error

func (*SqlDatastore) SaveServiceInstanceDetails

func (ds *SqlDatastore) SaveServiceInstanceDetails(ctx context.Context, object *models.ServiceInstanceDetails) error

func (*SqlDatastore) SaveTerraformDeployment

func (ds *SqlDatastore) SaveTerraformDeployment(ctx context.Context, object *models.TerraformDeployment) error

Jump to

Keyboard shortcuts

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